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
629a0a27
Commit
629a0a27
authored
4 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
Option to skip p=odd computation since odds are 0. + typo
parent
5ed2781d
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/compute_Sapj.F90
+26
-12
26 additions, 12 deletions
src/compute_Sapj.F90
with
26 additions
and
12 deletions
src/compute_Sapj.F90
+
26
−
12
View file @
629a0a27
...
...
@@ -21,13 +21,17 @@ SUBROUTINE compute_Sapj
INTEGER
::
in
,
is
REAL
(
dp
)::
kr
,
kz
,
kerneln
LOGICAL
::
COMPUTE_ONLY_ODD_P
=
.true.
! Execution time start
CALL
cpu_time
(
t0_Sapj
)
!!!!!!!!!!!!!!!!!!!! ELECTRON non linear term computation (Sepj)!!!!!!!!!!
ploope
:
DO
ip
=
ips_e
,
ipe_e
! Loop over Hermite moments
! we check if poly degree is even (eq to index is odd) to spare computation
IF
(
MODULO
(
ip
,
2
)
.EQ.
1
.OR.
(
.NOT.
COMPUTE_ONLY_ODD_P
))
THEN
jloope
:
DO
ij
=
ijs_e
,
ije_e
! Loop over Laguerre moments
real_data_c
=
0._dp
! initialize sum over real nonlinear term
nloope
:
DO
in
=
1
,
jmaxe
+1
! Loop over laguerre for the sum
...
...
@@ -44,12 +48,11 @@ SUBROUTINE compute_Sapj
! Second convolution terms
Gz_cmpx
(
ikr
,
ikz
)
=
0._dp
! initialization of the sum
Gr_cmpx
(
ikr
,
ikz
)
=
0._dp
! initialization of the sum
! DO is = 1, MIN( in+ij-1, jmaxe+1 ) ! sum truncation on number of moments
DO
is
=
1
,
MIN
(
in
+
ij
-1
,
2
)
! sum truncation on number of moments
Gz_cmpx
(
ikr
,
ikz
)
=
Gz_cmpx
(
ikr
,
ikz
)
+
&
dnjs
(
in
,
ij
,
is
)
*
moments_e
(
ip
,
is
,
ikr
,
ikz
,
updatetlevel
)
DO
is
=
1
,
MIN
(
in
+
ij
-1
,
jmaxe
+1
)
! sum truncation on number of moments
Gz_cmpx
(
ikr
,
ikz
)
=
Gz_cmpx
(
ikr
,
ikz
)
+
&
dnjs
(
in
,
ij
,
is
)
*
moments_e
(
ip
,
is
,
ikr
,
ikz
,
updatetlevel
)
Gr_cmpx
(
ikr
,
ikz
)
=
Gr_cmpx
(
ikr
,
ikz
)
+
&
dnjs
(
in
,
ij
,
is
)
*
moments_e
(
ip
,
is
,
ikr
,
ikz
,
updatetlevel
)
dnjs
(
in
,
ij
,
is
)
*
moments_e
(
ip
,
is
,
ikr
,
ikz
,
updatetlevel
)
ENDDO
Gz_cmpx
(
ikr
,
ikz
)
=
imagu
*
kz
*
Gz_cmpx
(
ikr
,
ikz
)
Gr_cmpx
(
ikr
,
ikz
)
=
imagu
*
kr
*
Gr_cmpx
(
ikr
,
ikz
)
...
...
@@ -93,13 +96,21 @@ SUBROUTINE compute_Sapj
Sepj
(
ip
,
ij
,
ikr
,
ikz
)
=
cmpx_data_c
(
ikz
,
ikr
-
local_nkr_offset
)
*
AA_r
(
ikr
)
*
AA_z
(
ikz
)
!Anti aliasing filter
ENDDO
ENDDO
ENDDO
jloope
ELSE
! Cancel the non lin term if we are dealing with odd Hermite degree
Sepj
(
ip
,:,:,:)
=
0._dp
ENDIF
ENDDO
ploope
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!! ION non linear term computation (Sipj)!!!!!!!!!!
ploopi
:
DO
ip
=
ips_i
,
ipe_i
! Loop over Hermite moments
! we check if poly degree is even (eq to index is odd) to spare computation
IF
(
MODULO
(
ip
,
2
)
.EQ.
1
.OR.
(
.NOT.
COMPUTE_ONLY_ODD_P
))
THEN
jloopi
:
DO
ij
=
ijs_i
,
ije_i
! Loop over Laguerre moments
real_data_c
=
0._dp
! initialize sum over real nonlinear term
...
...
@@ -117,12 +128,11 @@ SUBROUTINE compute_Sapj
! Second convolution terms
Gz_cmpx
(
ikr
,
ikz
)
=
0._dp
! initialization of the sum
Gr_cmpx
(
ikr
,
ikz
)
=
0._dp
! initialization of the sum
! DO is = 1, MIN( in+ij-1, jmaxi+1 ) ! sum truncation on number of moments
DO
is
=
1
,
MIN
(
in
+
ij
-1
,
2
)
! sum truncation on number of moments
Gz_cmpx
(
ikr
,
ikz
)
=
Gz_cmpx
(
ikr
,
ikz
)
+
&
dnjs
(
in
,
ij
,
is
)
*
moments_i
(
ip
,
is
,
ikr
,
ikz
,
updatetlevel
)
DO
is
=
1
,
MIN
(
in
+
ij
-1
,
jmaxi
+1
)
! sum truncation on number of moments
Gz_cmpx
(
ikr
,
ikz
)
=
Gz_cmpx
(
ikr
,
ikz
)
+
&
dnjs
(
in
,
ij
,
is
)
*
moments_i
(
ip
,
is
,
ikr
,
ikz
,
updatetlevel
)
Gr_cmpx
(
ikr
,
ikz
)
=
Gr_cmpx
(
ikr
,
ikz
)
+
&
dnjs
(
in
,
ij
,
is
)
*
moments_i
(
ip
,
is
,
ikr
,
ikz
,
updatetlevel
)
dnjs
(
in
,
ij
,
is
)
*
moments_i
(
ip
,
is
,
ikr
,
ikz
,
updatetlevel
)
ENDDO
Gz_cmpx
(
ikr
,
ikz
)
=
imagu
*
kz
*
Gz_cmpx
(
ikr
,
ikz
)
Gr_cmpx
(
ikr
,
ikz
)
=
imagu
*
kr
*
Gr_cmpx
(
ikr
,
ikz
)
...
...
@@ -168,6 +178,10 @@ SUBROUTINE compute_Sapj
ENDDO
ENDDO
jloopi
ELSE
! Cancel the non lin term if we are dealing with odd Hermite degree
Sipj
(
ip
,:,:,:)
=
0._dp
ENDIF
ENDDO
ploopi
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
...
...
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