Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gyacomo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Cyril David Hoffmann
Gyacomo
Commits
c073039d
Commit
c073039d
authored
4 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
add functions bare, bari, rabe, rabi to handle p,j to p*j indices
parent
5b8351e4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/diagnostics_par_mod.F90
+1
-9
1 addition, 9 deletions
src/diagnostics_par_mod.F90
src/fourier_grid_mod.F90
+20
-19
20 additions, 19 deletions
src/fourier_grid_mod.F90
with
21 additions
and
28 deletions
src/diagnostics_par_mod.F90
+
1
−
9
View file @
c073039d
...
@@ -5,10 +5,6 @@ MODULE diagnostics_par
...
@@ -5,10 +5,6 @@ MODULE diagnostics_par
IMPLICIT
NONE
IMPLICIT
NONE
PRIVATE
PRIVATE
LOGICAL
,
PUBLIC
,
PROTECTED
::
write_theta
=
.TRUE.
LOGICAL
,
PUBLIC
,
PROTECTED
::
write_temp
=
.TRUE.
LOGICAL
,
PUBLIC
,
PROTECTED
::
write_vpar
=
.TRUE.
LOGICAL
,
PUBLIC
,
PROTECTED
::
write_moments
=
.TRUE.
LOGICAL
,
PUBLIC
,
PROTECTED
::
write_moments
=
.TRUE.
LOGICAL
,
PUBLIC
,
PROTECTED
::
write_phi
=
.TRUE.
LOGICAL
,
PUBLIC
,
PROTECTED
::
write_phi
=
.TRUE.
LOGICAL
,
PUBLIC
,
PROTECTED
::
write_doubleprecision
=
.FALSE.
LOGICAL
,
PUBLIC
,
PROTECTED
::
write_doubleprecision
=
.FALSE.
...
@@ -38,8 +34,7 @@ CONTAINS
...
@@ -38,8 +34,7 @@ CONTAINS
IMPLICIT
NONE
IMPLICIT
NONE
NAMELIST
/
OUTPUT_PAR
/
nsave_0d
,
nsave_1d
,
nsave_2d
,
nsave_3d
NAMELIST
/
OUTPUT_PAR
/
nsave_0d
,
nsave_1d
,
nsave_2d
,
nsave_3d
NAMELIST
/
OUTPUT_PAR
/
write_theta
,
write_temp
NAMELIST
/
OUTPUT_PAR
/
write_moments
,
write_phi
,
write_doubleprecision
NAMELIST
/
OUTPUT_PAR
/
write_vpar
,
write_moments
,
write_phi
,
write_doubleprecision
NAMELIST
/
OUTPUT_PAR
/
resfile0
!, rstfile0
NAMELIST
/
OUTPUT_PAR
/
resfile0
!, rstfile0
READ
(
lu_in
,
output_par
)
READ
(
lu_in
,
output_par
)
...
@@ -58,9 +53,6 @@ CONTAINS
...
@@ -58,9 +53,6 @@ CONTAINS
INTEGER
,
INTENT
(
in
)
::
fidres
INTEGER
,
INTENT
(
in
)
::
fidres
CHARACTER
(
len
=
256
),
INTENT
(
in
)
::
str
CHARACTER
(
len
=
256
),
INTENT
(
in
)
::
str
CALL
attach
(
fidres
,
TRIM
(
str
),
"write_theta"
,
write_theta
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"write_temp"
,
write_temp
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"write_vpar"
,
write_vpar
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"write_moments"
,
write_moments
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"write_moments"
,
write_moments
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"write_phi"
,
write_phi
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"write_phi"
,
write_phi
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"write_doubleprecision"
,
write_doubleprecision
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"write_doubleprecision"
,
write_doubleprecision
)
...
...
This diff is collapsed.
Click to expand it.
src/fourier_grid_mod.F90
+
20
−
19
View file @
c073039d
...
@@ -131,36 +131,37 @@ contains
...
@@ -131,36 +131,37 @@ contains
CALL
attach
(
fidres
,
TRIM
(
str
),
"kzmax"
,
kzmax
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"kzmax"
,
kzmax
)
END
SUBROUTINE
fourier_grid_outputinputs
END
SUBROUTINE
fourier_grid_outputinputs
SUBROUTINE
bare
(
p
,
j
,
idx
)
!============To handle p,j coefficients efficiently
FUNCTION
bare
(
p
,
j
)
RESULT
(
idx
)
USE
prec_const
USE
prec_const
IMPLICIT
NONE
IMPLICIT
NONE
INTEGER
,
INTENT
(
in
)
::
p
,
j
INTEGER
,
INTENT
(
in
)
::
p
,
j
INTEGER
,
INTENT
(
out
)
::
idx
INTEGER
::
idx
idx
=
(
jmaxe
+
1
)
*
p
+
j
+
1
idx
=
(
jmaxe
+
1
)
*
p
+
j
+
1
END
SUBROUTINE
bare
END
FUNCTION
bare
SUBROUTINE
bari
(
p
,
j
,
idx
)
FUNCTION
bari
(
p
,
j
)
RESULT
(
idx
)
INTEGER
,
INTENT
(
in
)
::
p
,
j
INTEGER
,
INTENT
(
in
)
::
p
,
j
INTEGER
,
INTENT
(
out
)
::
idx
INTEGER
::
idx
idx
=
(
jmaxi
+
1
)
*
p
+
j
+
1
idx
=
Nmome
+
(
jmaxi
+
1
)
*
p
+
j
+
1
END
SUBROUTINE
bari
END
FUNCTION
bari
SUBROUTINE
rabe
(
idx
,
p
,
j
)
FUNCTION
rabe
(
idx
)
RESULT
(
p
j
)
INTEGER
,
INTENT
(
in
)
::
idx
INTEGER
,
INTENT
(
in
)
::
idx
INTEGER
,
INTENT
(
out
)
::
p
,
j
INTEGER
,
DIMENSION
(
2
)
::
pj
p
=
FLOOR
(
real
(
(
idx
-1
)
/
(
jmaxe
+
1
)))
p
j
(
1
)
=
int
(
FLOOR
(
real
(
idx
-1
)
/
(
jmaxe
+
1
)))
j
=
idx
-
p
*
(
jmaxe
+1
)
pj
(
2
)
=
idx
-
1
-
pj
(
1
)
*
(
jmaxe
+1
)
END
SUBROUTINE
rabe
END
FUNCTION
rabe
SUBROUTINE
rabi
(
idx
,
p
,
j
)
FUNCTION
rabi
(
idx
)
RESULT
(
p
j
)
INTEGER
,
INTENT
(
in
)::
idx
INTEGER
,
INTENT
(
in
)::
idx
INTEGER
,
INTENT
(
out
)
::
p
,
j
INTEGER
,
DIMENSION
(
2
)
::
pj
p
=
FLOOR
(
real
((
idx
-
Nmome
-
1
)
/
(
jmaxi
+
1
)))
p
j
(
1
)
=
FLOOR
(
real
((
idx
-
Nmome
-
1
)
/
(
jmaxi
+
1
)))
j
=
(
idx
-
Nmome
)
-
p
*
(
jmaxi
+1
)
pj
(
2
)
=
(
idx
-
Nmome
)
-
1
-
pj
(
1
)
*
(
jmaxi
+1
)
END
SUBROUTINE
rabi
END
FUNCTION
rabi
END
MODULE
fourier_grid
END
MODULE
fourier_grid
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment