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
4b618ae3
Commit
4b618ae3
authored
2 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
flags for storing logical computations
parent
a31d7666
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
+7
-13
7 additions, 13 deletions
src/grid_mod.F90
with
7 additions
and
13 deletions
src/grid_mod.F90
+
7
−
13
View file @
4b618ae3
...
@@ -203,15 +203,11 @@ CONTAINS
...
@@ -203,15 +203,11 @@ CONTAINS
dsp_p_i
(
in
+1
)
=
istart
-1
dsp_p_i
(
in
+1
)
=
istart
-1
ENDDO
ENDDO
! local grid computation
!! local grid computations
CONTAINS_ip0_e
=
.FALSE.
! Flag to avoid unnecessary logical operations
CONTAINS_ip1_e
=
.FALSE.
CONTAINS_ip0_e
=
.FALSE.
;
CONTAINS_ip1_e
=
.FALSE.
;
CONTAINS_ip2_e
=
.FALSE.
CONTAINS_ip2_e
=
.FALSE.
CONTAINS_ip0_i
=
.FALSE.
;
CONTAINS_ip1_i
=
.FALSE.
;
CONTAINS_ip2_i
=
.FALSE.
CONTAINS_ip0_i
=
.FALSE.
SOLVE_POISSON
=
.FALSE.
;
SOLVE_AMPERE
=
.FALSE.
CONTAINS_ip1_i
=
.FALSE.
CONTAINS_ip2_i
=
.FALSE.
SOLVE_POISSON
=
.FALSE.
SOLVE_AMPERE
=
.FALSE.
ALLOCATE
(
parray_e
(
ipgs_e
:
ipge_e
))
ALLOCATE
(
parray_e
(
ipgs_e
:
ipge_e
))
ALLOCATE
(
parray_i
(
ipgs_i
:
ipge_i
))
ALLOCATE
(
parray_i
(
ipgs_i
:
ipge_i
))
DO
ip
=
ipgs_e
,
ipge_e
DO
ip
=
ipgs_e
,
ipge_e
...
@@ -220,12 +216,10 @@ CONTAINS
...
@@ -220,12 +216,10 @@ CONTAINS
IF
(
parray_e
(
ip
)
.EQ.
0
)
THEN
IF
(
parray_e
(
ip
)
.EQ.
0
)
THEN
ip0_e
=
ip
ip0_e
=
ip
CONTAINS_ip0_e
=
.TRUE.
CONTAINS_ip0_e
=
.TRUE.
SOLVE_POISSON
=
.TRUE.
ENDIF
ENDIF
IF
(
parray_e
(
ip
)
.EQ.
1
)
THEN
IF
(
parray_e
(
ip
)
.EQ.
1
)
THEN
ip1_e
=
ip
ip1_e
=
ip
CONTAINS_ip1_e
=
.TRUE.
CONTAINS_ip1_e
=
.TRUE.
SOLVE_AMPERE
=
.TRUE.
ENDIF
ENDIF
IF
(
parray_e
(
ip
)
.EQ.
2
)
THEN
IF
(
parray_e
(
ip
)
.EQ.
2
)
THEN
ip2_e
=
ip
ip2_e
=
ip
...
@@ -238,18 +232,18 @@ CONTAINS
...
@@ -238,18 +232,18 @@ CONTAINS
IF
(
parray_i
(
ip
)
.EQ.
0
)
THEN
IF
(
parray_i
(
ip
)
.EQ.
0
)
THEN
ip0_i
=
ip
ip0_i
=
ip
CONTAINS_ip0_i
=
.TRUE.
CONTAINS_ip0_i
=
.TRUE.
SOLVE_POISSON
=
.TRUE.
ENDIF
ENDIF
IF
(
parray_i
(
ip
)
.EQ.
1
)
THEN
IF
(
parray_i
(
ip
)
.EQ.
1
)
THEN
ip1_i
=
ip
ip1_i
=
ip
CONTAINS_ip1_i
=
.TRUE.
CONTAINS_ip1_i
=
.TRUE.
SOLVE_AMPERE
=
.TRUE.
ENDIF
ENDIF
IF
(
parray_i
(
ip
)
.EQ.
2
)
THEN
IF
(
parray_i
(
ip
)
.EQ.
2
)
THEN
ip2_i
=
ip
ip2_i
=
ip
CONTAINS_ip2_i
=
.TRUE.
CONTAINS_ip2_i
=
.TRUE.
ENDIF
ENDIF
END
DO
END
DO
IF
(
CONTAINS_ip0_e
.AND.
CONTAINS_ip0_i
)
SOLVE_POISSON
=
.TRUE.
IF
(
CONTAINS_ip1_e
.AND.
CONTAINS_ip1_i
)
SOLVE_AMPERE
=
.TRUE.
!DGGK operator uses moments at index p=2 (ip=3) for the p=0 term so the
!DGGK operator uses moments at index p=2 (ip=3) for the p=0 term so the
! process that contains ip=1 MUST contain ip=3 as well for both e and i.
! process that contains ip=1 MUST contain ip=3 as well for both e and i.
IF
(((
ips_e
.EQ.
ip0_e
)
.OR.
(
ips_i
.EQ.
ip0_e
))
.AND.
((
ipe_e
.LT.
ip2_e
)
.OR.
(
ipe_i
.LT.
ip2_i
)))&
IF
(((
ips_e
.EQ.
ip0_e
)
.OR.
(
ips_i
.EQ.
ip0_e
))
.AND.
((
ipe_e
.LT.
ip2_e
)
.OR.
(
ipe_i
.LT.
ip2_i
)))&
...
...
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