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
c9b8f1a9
Commit
c9b8f1a9
authored
2 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
put coherent default values
parent
5636a3ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/grid_mod.F90
+13
-17
13 additions, 17 deletions
src/grid_mod.F90
with
13 additions
and
17 deletions
src/grid_mod.F90
+
13
−
17
View file @
c9b8f1a9
...
...
@@ -14,18 +14,16 @@ MODULE grid
INTEGER
,
PUBLIC
,
PROTECTED
::
maxj
=
1
! The maximal Laguerre-moment
INTEGER
,
PUBLIC
,
PROTECTED
::
dmaxe
=
1
! The maximal full GF set of e-moments v^dmax
INTEGER
,
PUBLIC
,
PROTECTED
::
dmaxi
=
1
! The maximal full GF set of i-moments v^dmax
INTEGER
,
PUBLIC
,
PROTECTED
::
Nx
=
16
! Number of total internal grid points in x
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
Lx
=
1
.
_dp
! horizontal length of the spatial box
INTEGER
,
PUBLIC
,
PROTECTED
::
Nx
=
4
! Number of total internal grid points in x
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
Lx
=
1
20
_dp
! horizontal length of the spatial box
INTEGER
,
PUBLIC
,
PROTECTED
::
Nexc
=
1
! factor to increase Lx when shear>0 (Lx = Nexc/kymin/shear)
INTEGER
,
PUBLIC
,
PROTECTED
::
Ny
=
16
! Number of total internal grid points in y
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
Ly
=
1
.
_dp
! vertical length of the spatial box
INTEGER
,
PUBLIC
,
PROTECTED
::
Nz
=
1
! Number of total perpendicular planes
INTEGER
,
PUBLIC
,
PROTECTED
::
Ny
=
4
! Number of total internal grid points in y
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
Ly
=
1
20
_dp
! vertical length of the spatial box
INTEGER
,
PUBLIC
,
PROTECTED
::
Nz
=
4
! Number of total perpendicular planes
INTEGER
,
PUBLIC
,
PROTECTED
::
Npol
=
1
! number of poloidal turns
INTEGER
,
PUBLIC
,
PROTECTED
::
Odz
=
4
! order of z interp and derivative schemes
INTEGER
,
PUBLIC
,
PROTECTED
::
Nkx
=
8
! Number of total internal grid points in kx
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
Lkx
=
1._dp
! horizontal length of the fourier box
INTEGER
,
PUBLIC
,
PROTECTED
::
Nky
=
16
! Number of total internal grid points in ky
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
Lky
=
1._dp
! vertical length of the fourier box
INTEGER
,
PUBLIC
,
PROTECTED
::
Nkx
=
4
! Number of total internal grid points in kx
INTEGER
,
PUBLIC
,
PROTECTED
::
Nky
=
4
! Number of total internal grid points in ky
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
kpar
=
0_dp
! parallel wave vector component
! For Orszag filter
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
two_third_kxmax
...
...
@@ -245,8 +243,8 @@ CONTAINS
! Precomputations
pmaxe_dp
=
real
(
pmaxe
,
dp
)
pmaxi_dp
=
real
(
pmaxi
,
dp
)
diff_pe_coeff
=
(
1._dp
/
pmaxe_dp
)
**
4
diff_pi_coeff
=
(
1._dp
/
pmaxi_dp
)
**
4
diff_pe_coeff
=
pmaxe_dp
*
(
1._dp
/
pmaxe_dp
)
**
6
diff_pi_coeff
=
pmaxi_dp
*
(
1._dp
/
pmaxi_dp
)
**
6
! Overwrite SOLVE_AMPERE flag if beta is zero
IF
(
beta
.EQ.
0._dp
)
THEN
...
...
@@ -284,8 +282,8 @@ CONTAINS
maxj
=
MAX
(
jmaxi
,
jmaxe
)
jmaxe_dp
=
real
(
jmaxe
,
dp
)
jmaxi_dp
=
real
(
jmaxi
,
dp
)
diff_je_coeff
=
(
1._dp
/
jmaxe_dp
)
**
4
diff_ji_coeff
=
(
1._dp
/
jmaxi_dp
)
**
4
diff_je_coeff
=
jmaxe_dp
*
(
1._dp
/
jmaxe_dp
)
**
6
diff_ji_coeff
=
jmaxi_dp
*
(
1._dp
/
jmaxi_dp
)
**
6
! j=0 indices
DO
ij
=
ijs_e
,
ije_e
;
IF
(
jarray_e
(
ij
)
.EQ.
0
)
ij0_e
=
ij
;
END
DO
...
...
@@ -505,9 +503,9 @@ CONTAINS
inv_deltaz
=
1._dp
/
deltaz
! Parallel hyperdiffusion coefficient
IF
(
mu_z
.GT.
0
)
THEN
diff_dz_coeff
=
REAL
((
imagu
*
deltaz
/
2._dp
)
**
4
)
! adaptive fourth derivative (~GENE)
diff_dz_coeff
=
(
deltaz
/
2._dp
)
**
4
! adaptive fourth derivative (~GENE)
ELSE
diff_dz_coeff
=
1._dp
! non adaptive (
posi
tive sign to compensate mu_z neg)
diff_dz_coeff
=
-
1._dp
! non adaptive (
nega
tive sign to compensate mu_z neg)
ENDIF
IF
(
SG
)
THEN
grid_shift
=
deltaz
/
2._dp
...
...
@@ -602,9 +600,7 @@ CONTAINS
CALL
attach
(
fidres
,
TRIM
(
str
),
"Ly"
,
Ly
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"Nz"
,
Nz
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"Nkx"
,
Nkx
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"Lkx"
,
Lkx
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"Nky"
,
Nky
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"Lky"
,
Lky
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"SG"
,
SG
)
END
SUBROUTINE
grid_outputinputs
...
...
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