aboutsummaryrefslogtreecommitdiff
path: root/src/EHFinder_Init.F90
diff options
context:
space:
mode:
authordiener <diener@2a26948c-0e4f-0410-aee8-f1d3e353619c>2003-04-15 07:30:49 +0000
committerdiener <diener@2a26948c-0e4f-0410-aee8-f1d3e353619c>2003-04-15 07:30:49 +0000
commit5479bc97e8ff7cc60c6ac74ba133b4ff47f874b5 (patch)
tree6cadd3b49f26573cd2f4fcf3473eff45b06a54b6 /src/EHFinder_Init.F90
parent83db3e09b07ed199cbd629307a26cb9d9c08f3f7 (diff)
Divided the initialisation routines into two parts. One that sets up
local variables and another that sets up the initial level set function. Schedule some routines at CCTK_POST_RECOVER to be able to restart from a checkpoint. Still need testing, though. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/EHFinder/trunk@97 2a26948c-0e4f-0410-aee8-f1d3e353619c
Diffstat (limited to 'src/EHFinder_Init.F90')
-rw-r--r--src/EHFinder_Init.F9076
1 files changed, 44 insertions, 32 deletions
diff --git a/src/EHFinder_Init.F90 b/src/EHFinder_Init.F90
index c8e2f19..cf700f3 100644
--- a/src/EHFinder_Init.F90
+++ b/src/EHFinder_Init.F90
@@ -5,7 +5,7 @@
#include "cctk_Parameters.h"
#include "cctk_Arguments.h"
-subroutine EHFinder_Init(CCTK_ARGUMENTS)
+subroutine EHFinder_Init_F(CCTK_ARGUMENTS)
use EHFinder_mod
@@ -16,13 +16,10 @@ subroutine EHFinder_Init(CCTK_ARGUMENTS)
DECLARE_CCTK_FUNCTIONS
CCTK_INT :: i, j, k
- CCTK_REAL :: last_time
CCTK_REAL, dimension(3) :: xp, xpt
CCTK_REAL, dimension(3,3) :: txyz
CCTK_REAL :: cosa, sina, cosb, sinb, cosc, sinc
-
- ! Set up the value used in interiour inactive cells.
- ex_value = - ( one + shell_width ) * maxval(cctk_delta_space)
+ CCTK_REAL :: last_time
! Initialize the current_iteration variable.
current_iteration = last_iteration_number
@@ -36,13 +33,6 @@ subroutine EHFinder_Init(CCTK_ARGUMENTS)
cctk_time = last_time
- ! Initialize nx, ny and nz based on the local gris size. They are defined
- ! in the module EHFinder_mod and will therefore be known from now on by all
- ! routine that uses this module.
- nx = cctk_lsh(1)
- ny = cctk_lsh(2)
- nz = cctk_lsh(3)
-
! If a sphere is requested...
if ( CCTK_EQUALS( initial_f, 'sphere' ) ) then
@@ -104,6 +94,29 @@ subroutine EHFinder_Init(CCTK_ARGUMENTS)
! Initialise the internal mask.
eh_mask = 0
+ return
+end subroutine EHFinder_Init_F
+
+subroutine EHFinder_Init(CCTK_ARGUMENTS)
+
+ use EHFinder_mod
+
+ implicit none
+
+ DECLARE_CCTK_PARAMETERS
+ DECLARE_CCTK_ARGUMENTS
+ DECLARE_CCTK_FUNCTIONS
+
+ ! Set up the value used in interiour inactive cells.
+ ex_value = - ( one + shell_width ) * maxval(cctk_delta_space)
+
+ ! Initialize nx, ny and nz based on the local gris size. They are defined
+ ! in the module EHFinder_mod and will therefore be known from now on by all
+ ! routine that uses this module.
+ nx = cctk_lsh(1)
+ ny = cctk_lsh(2)
+ nz = cctk_lsh(3)
+
! Find the maximal grid spacing.
delta = maxval ( cctk_delta_space )
@@ -127,25 +140,24 @@ subroutine EHFinder_Init(CCTK_ARGUMENTS)
call CCTK_WARN(0,'Could not obtain a handle for sum reduction')
end if
- ! Register a coodinatsystem for the 2D surface grid arrays. This has no
- ! effect yet, but should do something useful, when TAGS can be used to
- ! assign coordinates to grid arrays.
- call CCTK_CoordRegisterSystem ( ierr, 2, 'cart2d' )
- if ( ierr .lt. 0 ) then
- call CCTK_WARN(0,'Could not register a 2D coordinate system as "cart2d"')
- end if
- call CCTK_CoordRegisterData ( ierr, 1, 'ehfinder::ctheta', &
- 'x', 'cart2d' )
- if ( ierr .lt. 0 ) then
- call CCTK_WARN(0,'Could not register ctheta as the 1st coordinate for "cart2d"')
- end if
- call CCTK_CoordRegisterData ( ierr, 2, 'ehfinder::cphi', &
- 'y', 'cart2d' )
- if ( ierr .lt. 0 ) then
- call CCTK_WARN(0,'Could not register cphi as the 2nd coordinate for "cart2d"')
- end if
+! ! Register a coodinatsystem for the 2D surface grid arrays. This has no
+! ! effect yet, but should do something useful, when TAGS can be used to
+! ! assign coordinates to grid arrays.
+! call CCTK_CoordRegisterSystem ( ierr, 2, 'cart2d' )
+! if ( ierr .lt. 0 ) then
+! call CCTK_WARN(1,'Could not register a 2D coordinate system as "cart2d"')
+! end if
+! call CCTK_CoordRegisterData ( ierr, 1, 'ehfinder::ctheta', &
+! 'x', 'cart2d' )
+! if ( ierr .lt. 0 ) then
+! call CCTK_WARN(1,'Could not register ctheta as the 1st coordinate for "cart2d"')
+! end if
+! call CCTK_CoordRegisterData ( ierr, 2, 'ehfinder::cphi', &
+! 'y', 'cart2d' )
+! if ( ierr .lt. 0 ) then
+! call CCTK_WARN(1,'Could not register cphi as the 2nd coordinate for "cart2d"')
+! end if
+!
+! call CCTK_INFO('2d coordinate system registered')
- call CCTK_INFO('2d coordinate system registered')
-
- return
end subroutine EHFinder_Init