diff options
-rw-r--r-- | schedule.ccl | 56 | ||||
-rw-r--r-- | src/EHFinder_ReParametrize.F90 | 14 |
2 files changed, 44 insertions, 26 deletions
diff --git a/schedule.ccl b/schedule.ccl index 067004d..fa555bd 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -41,7 +41,7 @@ schedule EHFinder_SetSym at CCTK_BASEGRID } "Register the symmetries for the level set function" -# set the initial eh_mask to at the physical outer boundaries. +# Set the initial eh_mask to at the physical outer boundaries. schedule EHFinder_MaskInit at CCTK_POSTINITIAL after EHFinder_Init { @@ -49,35 +49,57 @@ schedule EHFinder_MaskInit at CCTK_POSTINITIAL after EHFinder_Init } "Setup the initial mask" -# Schedule the euler re-parametrization +# Schedule the normal mode of operation -if (!CCTK_Equals(mode,"test_reparam")) +if (CCTK_Equals(mode,"normal")) { + + # Schedule the calculation of the source terms + + schedule EHFinder_Sources in MoL_CalcRHS + { + LANG: Fortran + } "Calculate the source terms" + + + # Set up the schedule group for re-parametrization + schedule GROUP EHFinder_ReParametrize at CCTK_POSTSTEP { -# LANG: Fortran } "Re-parametrize the level set function" if (CCTK_Equals(re_param_method,"pde")) { - schedule EHFinder_ReParametrize1 in EHFinder_ReParametrize + + # Schedule the control routine, that initialises re_param_control if + # it is time for re-parametrization + + schedule EHFinder_ReParametrizeControl in EHFinder_ReParametrize { LANG: Fortran } "Initializes the re-parametrization control" if (CCTK_Equals(re_param_int_method,"euler")) { + + # Set up the schedule group for euler re-parametrization using + # re_param_control to control the exit from the while loop. + schedule GROUP Euler_ReParametrize in EHFinder_ReParametrize AFTER EHFinder_ReParametrize1 WHILE ehfinder::re_param_control { } "Schedule group for Euler re-parametrization" - schedule EHFinder_ReParametrize4 in Euler_ReParametrize + # Schedule the routine that does one Euler step + + schedule EHFinder_ReParametrizeEuler in Euler_ReParametrize { LANG: Fortran - SYNC: level_set +# SYNC: level_set } "Euler scheme" - schedule EHFinder_ApplySym in Euler_ReParametrize after EHFinder_ReParametrize4 + # Then synchronize the level set and apply symmetry boundary conditions. + + schedule EHFinder_ApplySym in Euler_ReParametrize after EHFinder_ReParametrizeEuler { LANG: Fortran SYNC: level_set @@ -90,9 +112,10 @@ if (!CCTK_Equals(mode,"test_reparam")) schedule GROUP EHFinder_SetMask at CCTK_POSTSTEP after EHFinder_ReParametrize { -# LANG: Fortran } "Set the mask" + # First schedule the routine that adds or removes cells from the mask + schedule EHFinder_SetMask1 in EHFinder_SetMask { LANG: Fortran @@ -100,11 +123,16 @@ if (!CCTK_Equals(mode,"test_reparam")) SYNC: eh_mask_all } "Start modifying the mask" + # Then apply the symmetry boundary conditions. + schedule EHFinder_ApplySym in EHFinder_SetMask after EHFinder_SetMask1 { LANG: Fortran } "apply symmetry boundaries" + # Finally locate the mask boundary and add values to distinguish different + # directions. + schedule EHFinder_SetMask2 in EHFinder_SetMask after EHFinder_ApplySym { LANG: Fortran @@ -114,16 +142,6 @@ if (!CCTK_Equals(mode,"test_reparam")) } -# Schedule the calculation of the source terms - -if (CCTK_Equals(mode,"normal")) -{ - schedule EHFinder_Sources in MoL_CalcRHS - { - LANG: Fortran - } "Calculate the source terms" -} - #schedule EHFinder_ApplySym at CCTK_POSTINITIAL after EHFinder_MaskInit #{ diff --git a/src/EHFinder_ReParametrize.F90 b/src/EHFinder_ReParametrize.F90 index db82ab3..e43675e 100644 --- a/src/EHFinder_ReParametrize.F90 +++ b/src/EHFinder_ReParametrize.F90 @@ -5,7 +5,7 @@ #include "cctk_Parameters.h" #include "cctk_Arguments.h" -subroutine EHFinder_ReParametrize1(CCTK_ARGUMENTS) +subroutine EHFinder_ReParametrizeControl(CCTK_ARGUMENTS) use EHFinder_mod @@ -62,9 +62,9 @@ subroutine EHFinder_ReParametrize1(CCTK_ARGUMENTS) end if end if end if -! print*,'EHFinder_ReParametrize1 Exited' +! print*,'EHFinder_ReParametrizeControl Exited' -end subroutine EHFinder_ReParametrize1 +end subroutine EHFinder_ReParametrizeControl subroutine EHFinder_ReParametrize2(CCTK_ARGUMENTS) @@ -208,7 +208,7 @@ subroutine EHFinder_ReParametrize3(CCTK_ARGUMENTS) end subroutine EHFinder_ReParametrize3 -subroutine EHFinder_ReParametrize4(CCTK_ARGUMENTS) +subroutine EHFinder_ReParametrizeEuler(CCTK_ARGUMENTS) use EHFinder_mod @@ -224,7 +224,7 @@ subroutine EHFinder_ReParametrize4(CCTK_ARGUMENTS) CCTK_REAL :: alminus, alplus, blminus, blplus, clminus, clplus CCTK_REAL :: arminus, arplus, brminus, brplus, crminus, crplus -! print*,'EHFinder_ReParametrize4 Entered' +! print*,'EHFinder_ReParametrizeEuler Entered' h = hfac*minval(cctk_delta_space) if ( CCTK_Equals(pde_differences,'centered') .eq. 1 ) then @@ -290,9 +290,9 @@ subroutine EHFinder_ReParametrize4(CCTK_ARGUMENTS) call CCTK_INFO('Re-parametrization complete') end if ! print*,ncalls,maxdf,mindf -! print*,'EHFinder_ReParametrize4 Exited' +! print*,'EHFinder_ReParametrizeEuler Exited' -end subroutine EHFinder_ReParametrize4 +end subroutine EHFinder_ReParametrizeEuler subroutine EHFinder_ReParametrize5(CCTK_ARGUMENTS) |