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
a5564278
Commit
a5564278
authored
3 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
writing simplification
parent
01dcbfc3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/advance_field.F90
+23
-41
23 additions, 41 deletions
src/advance_field.F90
src/initial_par_mod.F90
+1
-1
1 addition, 1 deletion
src/initial_par_mod.F90
src/model_mod.F90
+0
-2
0 additions, 2 deletions
src/model_mod.F90
with
24 additions
and
44 deletions
src/advance_field.F90
+
23
−
41
View file @
a5564278
...
@@ -24,35 +24,16 @@ CONTAINS
...
@@ -24,35 +24,16 @@ CONTAINS
use
array
,
ONLY
:
moments_rhs_e
,
moments_rhs_i
use
array
,
ONLY
:
moments_rhs_e
,
moments_rhs_i
IMPLICIT
NONE
IMPLICIT
NONE
INTEGER
::
istage
DO
ip
=
ips_i
,
ipe_i
! Execution time start
DO
ij
=
ijs_i
,
ije_i
CALL
cpu_time
(
t0_adv_field
)
CALL
advance_field
(
moments_i
(
ip
,
ij
,:,:,:,:),
moments_rhs_i
(
ip
,
ij
,:,:,:,:))
SELECT
CASE
(
updatetlevel
)
ENDDO
CASE
(
1
)
ENDDO
DO
istage
=
1
,
ntimelevel
DO
ip
=
ips_e
,
ipe_e
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,:,:,:,
1
)
=
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,:,:,:,
1
)
&
DO
ij
=
ijs_e
,
ije_e
+
dt
*
b_E
(
istage
)
*
moments_rhs_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,:,:,:,
istage
)
CALL
advance_field
(
moments_e
(
ip
,
ij
,:,:,:,:),
moments_rhs_e
(
ip
,
ij
,:,:,:,:))
END
DO
ENDDO
! Advance ions
ENDDO
DO
istage
=
1
,
ntimelevel
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,:,:,:,
1
)
=
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,:,:,:,
1
)
&
+
dt
*
b_E
(
istage
)
*
moments_rhs_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,:,:,:,
istage
)
END
DO
CASE
DEFAULT
! Advance electrons
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,:,:,:,
updatetlevel
)
=
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,:,:,:,
1
);
DO
istage
=
1
,
updatetlevel
-1
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,:,:,:,
updatetlevel
)
=
moments_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,:,:,:,
updatetlevel
)
&
+
dt
*
A_E
(
updatetlevel
,
istage
)
*
moments_rhs_e
(
ips_e
:
ipe_e
,
ijs_e
:
ije_e
,:,:,:,
istage
)
END
DO
! Advance ions
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,:,:,:,
updatetlevel
)
=
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,:,:,:,
1
);
DO
istage
=
1
,
updatetlevel
-1
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,:,:,:,
updatetlevel
)
=
moments_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,:,:,:,
updatetlevel
)
&
+
dt
*
A_E
(
updatetlevel
,
istage
)
*
moments_rhs_i
(
ips_i
:
ipe_i
,
ijs_i
:
ije_i
,:,:,:,
istage
)
END
DO
END
SELECT
! Execution time end
! Execution time end
CALL
cpu_time
(
t1_adv_field
)
CALL
cpu_time
(
t1_adv_field
)
tc_adv_field
=
tc_adv_field
+
(
t1_adv_field
-
t0_adv_field
)
tc_adv_field
=
tc_adv_field
+
(
t1_adv_field
-
t0_adv_field
)
...
@@ -66,6 +47,7 @@ CONTAINS
...
@@ -66,6 +47,7 @@ CONTAINS
USE
array
USE
array
USE
grid
USE
grid
use
prec_const
use
prec_const
use
initial_par
,
ONLY
:
WIPE_ZF
IMPLICIT
NONE
IMPLICIT
NONE
COMPLEX
(
dp
),
DIMENSION
(
ikxs
:
ikxe
,
ikys
:
ikye
,
izs
:
ize
,
ntimelevel
)
::
f
COMPLEX
(
dp
),
DIMENSION
(
ikxs
:
ikxe
,
ikys
:
ikye
,
izs
:
ize
,
ntimelevel
)
::
f
...
@@ -75,25 +57,25 @@ CONTAINS
...
@@ -75,25 +57,25 @@ CONTAINS
SELECT
CASE
(
updatetlevel
)
SELECT
CASE
(
updatetlevel
)
CASE
(
1
)
CASE
(
1
)
DO
iky
=
ikys
,
ikye
DO
iky
=
ikys
,
ikye
DO
ikx
=
ikxs
,
ikxe
DO
ikx
=
ikxs
,
ikxe
DO
iz
=
izs
,
ize
DO
iz
=
izs
,
ize
DO
istage
=
1
,
ntimelevel
DO
istage
=
1
,
ntimelevel
f
(
ikx
,
iky
,
iz
,
1
)
=
f
(
ikx
,
iky
,
iz
,
1
)
+
dt
*
b_E
(
istage
)
*
f_rhs
(
ikx
,
iky
,
iz
,
istage
)
f
(
ikx
,
iky
,
iz
,
1
)
=
f
(
ikx
,
iky
,
iz
,
1
)
+
dt
*
b_E
(
istage
)
*
f_rhs
(
ikx
,
iky
,
iz
,
istage
)
END
DO
END
DO
END
DO
END
DO
END
DO
END
DO
END
DO
END
DO
CASE
DEFAULT
CASE
DEFAULT
DO
iky
=
ikys
,
ikye
DO
iky
=
ikys
,
ikye
DO
ikx
=
ikxs
,
ikxe
DO
ikx
=
ikxs
,
ikxe
DO
iz
=
izs
,
ize
DO
iz
=
izs
,
ize
f
(
ikx
,
iky
,
iz
,
updatetlevel
)
=
f
(
ikx
,
iky
,
iz
,
1
);
f
(
ikx
,
iky
,
iz
,
updatetlevel
)
=
f
(
ikx
,
iky
,
iz
,
1
);
DO
istage
=
1
,
updatetlevel
-1
DO
istage
=
1
,
updatetlevel
-1
f
(
ikx
,
iky
,
iz
,
updatetlevel
)
=
f
(
ikx
,
iky
,
iz
,
updatetlevel
)
+
&
f
(
ikx
,
iky
,
iz
,
updatetlevel
)
=
f
(
ikx
,
iky
,
iz
,
updatetlevel
)
+
&
dt
*
A_E
(
updatetlevel
,
istage
)
*
f_rhs
(
ikx
,
iky
,
iz
,
istage
)
dt
*
A_E
(
updatetlevel
,
istage
)
*
f_rhs
(
ikx
,
iky
,
iz
,
istage
)
END
DO
END
DO
END
DO
END
DO
END
DO
END
DO
END
DO
END
DO
END
SELECT
END
SELECT
END
SUBROUTINE
advance_field
END
SUBROUTINE
advance_field
...
...
This diff is collapsed.
Click to expand it.
src/initial_par_mod.F90
+
1
−
1
View file @
a5564278
...
@@ -10,7 +10,7 @@ MODULE initial_par
...
@@ -10,7 +10,7 @@ MODULE initial_par
! Initialization through a zonal flow phi
! Initialization through a zonal flow phi
INTEGER
,
PUBLIC
,
PROTECTED
::
INIT_ZF
=
0
INTEGER
,
PUBLIC
,
PROTECTED
::
INIT_ZF
=
0
REAL
(
DP
),
PUBLIC
,
PROTECTED
::
ZF_AMP
=
1E+3_dp
REAL
(
DP
),
PUBLIC
,
PROTECTED
::
ZF_AMP
=
1E+3_dp
! Wipe zonal flow in the restart (=1) or at each step (=2)
! Wipe zonal flow in the restart (=1) or at each step (=2)
, maintain (=-1)
INTEGER
,
PUBLIC
,
PROTECTED
::
WIPE_ZF
=
0
INTEGER
,
PUBLIC
,
PROTECTED
::
WIPE_ZF
=
0
! Wipe turbulence in the restart (=1) or at each step (=2)
! Wipe turbulence in the restart (=1) or at each step (=2)
INTEGER
,
PUBLIC
,
PROTECTED
::
WIPE_TURB
=
0
INTEGER
,
PUBLIC
,
PROTECTED
::
WIPE_TURB
=
0
...
...
This diff is collapsed.
Click to expand it.
src/model_mod.F90
+
0
−
2
View file @
a5564278
...
@@ -39,8 +39,6 @@ MODULE model
...
@@ -39,8 +39,6 @@ MODULE model
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
nu_ee
,
nu_ie
! e-e, i-e coll. frequ.
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
nu_ee
,
nu_ie
! e-e, i-e coll. frequ.
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
qe2_taue
,
qi2_taui
! factor of the gammaD sum
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
qe2_taue
,
qi2_taui
! factor of the gammaD sum
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
INV_LIN_SYS
=
1._dp
! Invert the sign of the linear RHS (for measuring damped eigenvalues)
PUBLIC
::
model_readinputs
,
model_outputinputs
PUBLIC
::
model_readinputs
,
model_outputinputs
CONTAINS
CONTAINS
...
...
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