From ccc455f2aed927d6f55c79e0662a25c6ad0f8694 Mon Sep 17 00:00:00 2001
From: Antoine Cyril David Hoffmann <ahoffman@spcpc606.epfl.ch>
Date: Tue, 20 Apr 2021 10:22:24 +0200
Subject: [PATCH] changed the writing in advancing the moments

---
 src/advance_field.F90 |  4 ++--
 src/stepon.F90        | 43 ++++++++++++++++++++++---------------------
 2 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/src/advance_field.F90 b/src/advance_field.F90
index f8ee34c8..b5429068 100644
--- a/src/advance_field.F90
+++ b/src/advance_field.F90
@@ -14,7 +14,7 @@ CONTAINS
     CALL set_updatetlevel(mod(updatetlevel,ntimelevel)+1)
   END SUBROUTINE advance_time_level
 
-  SUBROUTINE advance_moments_explicit
+  SUBROUTINE advance_moments
 
     USE basic
     USE time_integration
@@ -56,7 +56,7 @@ CONTAINS
     ! Execution time end
     CALL cpu_time(t1_adv_field)
     tc_adv_field = tc_adv_field + (t1_adv_field - t0_adv_field)
-  END SUBROUTINE advance_moments_explicit
+  END SUBROUTINE advance_moments
 
 
   SUBROUTINE advance_field( f, f_rhs )
diff --git a/src/stepon.F90 b/src/stepon.F90
index 190faf56..da14bfa0 100644
--- a/src/stepon.F90
+++ b/src/stepon.F90
@@ -1,6 +1,6 @@
 SUBROUTINE stepon
   !   Advance one time step, (num_step=4 for Runge Kutta 4 scheme)
-  USE advance_field_routine, ONLY: advance_time_level, advance_field
+  USE advance_field_routine, ONLY: advance_time_level, advance_field, advance_moments_explicit
   USE array , ONLY: moments_rhs_e, moments_rhs_i, Sepj, Sipj
   USE basic
   USE closure
@@ -31,7 +31,8 @@ SUBROUTINE stepon
       CALL advance_time_level
       ! Update moments with the hierarchy RHS (step by step)
       ! N_n+1 = N_n + N_rhs(n)
-      CALL advance_moments
+      ! CALL advance_moments
+      CALL advance_moments_explicit
       ! Closure enforcement of N_n+1
       CALL apply_closure_model
       ! Exchanges the ghosts values of N_n+1
@@ -59,25 +60,25 @@ SUBROUTINE stepon
 
    CONTAINS
 
-      SUBROUTINE advance_moments
-        ! Execution time start
-        CALL cpu_time(t0_adv_field)
-
-        DO ip=ips_e,ipe_e
-          DO ij=ijs_e,ije_e
-            CALL advance_field(moments_e(ip,ij,:,:,:),moments_rhs_e(ip,ij,:,:,:))
-          ENDDO
-        ENDDO
-        DO ip=ips_i,ipe_i
-          DO ij=ijs_i,ije_i
-            CALL advance_field(moments_i(ip,ij,:,:,:),moments_rhs_i(ip,ij,:,:,:))
-          ENDDO
-        ENDDO
-
-        ! Execution time end
-        CALL cpu_time(t1_adv_field)
-        tc_adv_field = tc_adv_field + (t1_adv_field - t0_adv_field)
-      END SUBROUTINE advance_moments
+      ! SUBROUTINE advance_moments
+      !   ! Execution time start
+      !   CALL cpu_time(t0_adv_field)
+      !
+      !   DO ip=ips_e,ipe_e
+      !     DO ij=ijs_e,ije_e
+      !       CALL advance_field(moments_e(ip,ij,:,:,:),moments_rhs_e(ip,ij,:,:,:))
+      !     ENDDO
+      !   ENDDO
+      !   DO ip=ips_i,ipe_i
+      !     DO ij=ijs_i,ije_i
+      !       CALL advance_field(moments_i(ip,ij,:,:,:),moments_rhs_i(ip,ij,:,:,:))
+      !     ENDDO
+      !   ENDDO
+      !
+      !   ! Execution time end
+      !   CALL cpu_time(t1_adv_field)
+      !   tc_adv_field = tc_adv_field + (t1_adv_field - t0_adv_field)
+      ! END SUBROUTINE advance_moments
 
 
       SUBROUTINE checkfield_all ! Check all the fields for inf or nan
-- 
GitLab