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
4934cae2
Commit
4934cae2
authored
1 year ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
improve multi mode initialization
parent
c48bbce0
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/initial_mod.F90
+6
-9
6 additions, 9 deletions
src/initial_mod.F90
with
6 additions
and
9 deletions
src/initial_mod.F90
+
6
−
9
View file @
4934cae2
...
@@ -289,8 +289,8 @@ CONTAINS
...
@@ -289,8 +289,8 @@ CONTAINS
USE
fields
,
ONLY
:
moments
USE
fields
,
ONLY
:
moments
USE
prec_const
,
ONLY
:
xp
USE
prec_const
,
ONLY
:
xp
USE
model
,
ONLY
:
LINEARITY
USE
model
,
ONLY
:
LINEARITY
USE
grid
,
ONLY
:
total_nkx
,
local_nkx_offset
,
local_nky
,
local_nky_offset
,&
USE
grid
,
ONLY
:
total_nkx
,
local_nkx_offset
,
local_nky
,
local_nky_offset
,
iky0
,
&
kxarray_full
,
kyarray_full
,
kx_max
,
kx_min
,
ky_max
kxarray_full
,
kyarray_full
,
kx_max
,
kx_min
,
ky_max
,
deltakx
,
deltaky
IMPLICIT
NONE
IMPLICIT
NONE
INTEGER
::
ikx
,
iky
,
im
,
I_
,
J_
INTEGER
::
ikx
,
iky
,
im
,
I_
,
J_
REAL
(
xp
)::
maxkx
,
minkx
,
maxky
,
kx_
,
ky_
,
A_
REAL
(
xp
)::
maxkx
,
minkx
,
maxky
,
kx_
,
ky_
,
A_
...
@@ -314,19 +314,16 @@ CONTAINS
...
@@ -314,19 +314,16 @@ CONTAINS
IF
(
I_
.LT.
0
)
THEN
IF
(
I_
.LT.
0
)
THEN
I_
=
I_
+
total_nkx
I_
=
I_
+
total_nkx
ENDIF
ENDIF
I_
=
I_
+
1
! array indices start at 1
J_
=
J_
+
1
! Check the validity of the modes
! Check the validity of the modes
kx_
=
kxarray_full
(
I_
)
kx_
=
I_
*
deltakx
ky_
=
kyarray_full
(
J_
)
ky_
=
J_
*
deltaky
IF
(
((
kx_
.GE.
minkx
)
.AND.
(
kx_
.LE.
maxkx
))
.AND.
&
IF
(
((
kx_
.GE.
minkx
)
.AND.
(
kx_
.LE.
maxkx
))
.AND.
&
((
ky_
.GE.
0._xp
)
.AND.
(
ky_
.LE.
maxky
))
)
THEN
((
ky_
.GE.
0._xp
)
.AND.
(
ky_
.LE.
maxky
))
)
THEN
! Init the mode
! Init the mode
DO
ikx
=
1
,
total_nkx
DO
ikx
=
1
,
total_nkx
DO
iky
=
1
,
local_nky
DO
iky
=
1
,
local_nky
IF
(
(
ikx
+
local_nkx_offset
.EQ.
I_
)
.AND.
&
IF
(
(
kxarray_full
(
ikx
+
local_nkx_offset
)
.EQ.
kx_
)
.AND.
&
(
iky
+
local_nky_offset
.EQ.
J_
)
)
THEN
(
kyarray_full
(
iky
+
local_nky_offset
)
.EQ.
ky_
)
)
THEN
! WRITE(*,'(A10,F4.2,A,F4.2,A,F4.2)') '-init (kx=',kx_,',ky=',ky_,') at Amp=',A_
WRITE
(
*
,
'(A,F5.3,A,F5.3,A,G9.2)'
)
'-init (kx='
,
kx_
,
',ky='
,
ky_
,
') with Amp= '
,
A_
WRITE
(
*
,
'(A,F5.3,A,F5.3,A,G9.2)'
)
'-init (kx='
,
kx_
,
',ky='
,
ky_
,
') with Amp= '
,
A_
moments
(:,:,:,
iky
,
ikx
,:,:)
=
A_
moments
(:,:,:,
iky
,
ikx
,:,:)
=
A_
ENDIF
ENDIF
...
...
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