From a5f32fbd5bdd6794a8eab5cd19b5a4ef953ab58f Mon Sep 17 00:00:00 2001 From: diener Date: Tue, 30 Apr 2002 12:50:27 +0000 Subject: AHFinder converted to the changes in Einstein. Passes the testsuites on the xeon. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinder/trunk@295 89daf98e-ef62-4674-b946-b8ff9de2216c --- interface.ccl | 2 +- param.ccl | 16 ++++++++++++---- schedule.ccl | 4 ++++ src/AHFinder.F | 15 +++++++++------ src/AHFinder_dis.F | 12 ++++++------ src/AHFinder_gau.F | 12 ++++++------ src/AHFinder_int.F | 12 ++++++------ src/AHFinder_mask.F | 2 +- src/AHFinder_shift.F | 4 ++-- src/make.code.defn | 1 + test/test_AHF_1.par | 14 +++++++++----- test/test_AHF_2.par | 14 +++++++++----- 12 files changed, 66 insertions(+), 42 deletions(-) diff --git a/interface.ccl b/interface.ccl index 8ccbd3d..772862e 100644 --- a/interface.ccl +++ b/interface.ccl @@ -3,7 +3,7 @@ implements: ahfinder -inherits: interp einstein grid IO +inherits: interp admbase staticconformal spacemask grid IO ################################ diff --git a/param.ccl b/param.ccl index e700480..31e63a8 100644 --- a/param.ccl +++ b/param.ccl @@ -504,11 +504,19 @@ USES KEYWORD quadrant_direction "" USES KEYWORD bitant_plane "" -##################### -### FROM EINSTEIN ### -##################### +#################### +### FROM ADMBase ### +#################### -shares: einstein +shares: admbase + +USES KEYWORD metric_type "" + +###################### +### FROM SpaceMask ### +###################### + +shares: spacemask USES BOOLEAN use_mask "" diff --git a/schedule.ccl b/schedule.ccl index ac927bd..4cbf7e7 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -15,6 +15,10 @@ schedule AHFinder_Startup at CCTK_STARTUP LANG: C } "Register AHFinder as an IO Method" +schedule AHFinder_ParamCheck at PARAMCHECK +{ + LANG: Fortran +} "Check for physical or conformal metric" if (ahf_active) { diff --git a/src/AHFinder.F b/src/AHFinder.F index 9ead22e..d01cd04 100644 --- a/src/AHFinder.F +++ b/src/AHFinder.F @@ -54,6 +54,7 @@ CCTK_REAL, parameter :: one = 1.0D0 CCTK_REAL, dimension (1:3) :: ahfmass + CCTK_INT :: save_conformal_state character*200 logf @@ -190,12 +191,13 @@ ! I need to remember the original value of the flag to change ! it back at the end if necesary. - if (conformal_state == CONFORMAL_METRIC) then - + if ( CCTK_Equals(metric_type,"static conformal") ) then ahfconformal = .true. - conformal_state = NOCONFORMAL_METRIC + save_conformal_state = conformal_state + conformal_state = 0 - call ConfToPhys(nx,ny,nz,psi,gxx,gxy,gxz,gyy,gyz,gzz) + call StaticConformal_ConfToPhysInPlace (nx,ny,nz,psi, + & gxx,gxy,gxz,gyy,gyz,gzz) end if @@ -1604,9 +1606,10 @@ if (ahfconformal) then - conformal_state = CONFORMAL_METRIC + conformal_state = save_conformal_state - call PhysToConf(nx,ny,nz,psi,gxx,gxy,gxz,gyy,gyz,gzz) + call StaticConformal_PhysToConfInPlace (nx,ny,nz,psi, + & gxx,gxy,gxz,gyy,gyz,gzz) end if diff --git a/src/AHFinder_dis.F b/src/AHFinder_dis.F index 51451d0..c15b62b 100644 --- a/src/AHFinder_dis.F +++ b/src/AHFinder_dis.F @@ -506,12 +506,12 @@ ! Interpolation. - call CCTK_VarIndex(in_array_indices(1), "einstein::gxx") - call CCTK_VarIndex(in_array_indices(2), "einstein::gyy") - call CCTK_VarIndex(in_array_indices(3), "einstein::gzz") - call CCTK_VarIndex(in_array_indices(4), "einstein::gxy") - call CCTK_VarIndex(in_array_indices(5), "einstein::gxz") - call CCTK_VarIndex(in_array_indices(6), "einstein::gyz") + call CCTK_VarIndex(in_array_indices(1), "admbase::gxx") + call CCTK_VarIndex(in_array_indices(2), "admbase::gyy") + call CCTK_VarIndex(in_array_indices(3), "admbase::gzz") + call CCTK_VarIndex(in_array_indices(4), "admbase::gxy") + call CCTK_VarIndex(in_array_indices(5), "admbase::gxz") + call CCTK_VarIndex(in_array_indices(6), "admbase::gyz") num_arrays = 6 call CCTK_InterpGV(ierror, cctkGH, interp_handle, coord_system_handle, diff --git a/src/AHFinder_gau.F b/src/AHFinder_gau.F index 4790baa..daaff09 100644 --- a/src/AHFinder_gau.F +++ b/src/AHFinder_gau.F @@ -680,12 +680,12 @@ ! Interpolation. - call CCTK_VarIndex (in_array_indices(1), "einstein::gxx") - call CCTK_VarIndex (in_array_indices(2), "einstein::gyy") - call CCTK_VarIndex (in_array_indices(3), "einstein::gzz") - call CCTK_VarIndex (in_array_indices(4), "einstein::gxy") - call CCTK_VarIndex (in_array_indices(5), "einstein::gxz") - call CCTK_VarIndex (in_array_indices(6), "einstein::gyz") + call CCTK_VarIndex (in_array_indices(1), "admbase::gxx") + call CCTK_VarIndex (in_array_indices(2), "admbase::gyy") + call CCTK_VarIndex (in_array_indices(3), "admbase::gzz") + call CCTK_VarIndex (in_array_indices(4), "admbase::gxy") + call CCTK_VarIndex (in_array_indices(5), "admbase::gxz") + call CCTK_VarIndex (in_array_indices(6), "admbase::gyz") call CCTK_VarIndex (in_array_indices(7), "ahfinder::ahfgauss") num_arrays = 7 diff --git a/src/AHFinder_int.F b/src/AHFinder_int.F index 1878630..b3feabe 100644 --- a/src/AHFinder_int.F +++ b/src/AHFinder_int.F @@ -631,12 +631,12 @@ call CCTK_WARN(0,"Cannot get handle for interpolation ! Forgot to activate an implementation providing interpolation operators ??") endif - call CCTK_VarIndex (in_array_indices(1), "einstein::gxx") - call CCTK_VarIndex (in_array_indices(2), "einstein::gyy") - call CCTK_VarIndex (in_array_indices(3), "einstein::gzz") - call CCTK_VarIndex (in_array_indices(4), "einstein::gxy") - call CCTK_VarIndex (in_array_indices(5), "einstein::gxz") - call CCTK_VarIndex (in_array_indices(6), "einstein::gyz") + call CCTK_VarIndex (in_array_indices(1), "admbase::gxx") + call CCTK_VarIndex (in_array_indices(2), "admbase::gyy") + call CCTK_VarIndex (in_array_indices(3), "admbase::gzz") + call CCTK_VarIndex (in_array_indices(4), "admbase::gxy") + call CCTK_VarIndex (in_array_indices(5), "admbase::gxz") + call CCTK_VarIndex (in_array_indices(6), "admbase::gyz") call CCTK_VarIndex (in_array_indices(7), "ahfinder::ahf_exp") call CCTK_VarIndex (in_array_indices(8), "ahfinder::ahmask") call CCTK_VarIndex (in_array_indices(9), "ahfinder::ahfgradn") diff --git a/src/AHFinder_mask.F b/src/AHFinder_mask.F index a7cb626..194f13c 100644 --- a/src/AHFinder_mask.F +++ b/src/AHFinder_mask.F @@ -225,7 +225,7 @@ call CCTK_SyncGroup(ierr,cctkGH,"ahfinder::ahfmask") call CartSymGN(ierr,cctkGH,"ahfinder::ahfmask") -! If desired, copy ahf_mask to einstein mask (emask). +! If desired, copy ahf_mask to spacemask mask (emask). if (use_mask.eq.1) then emask = ahmask diff --git a/src/AHFinder_shift.F b/src/AHFinder_shift.F index 5d5fc70..ea698c2 100644 --- a/src/AHFinder_shift.F +++ b/src/AHFinder_shift.F @@ -348,8 +348,8 @@ ! *** APPLY SYMMETRIES AND SYNCHRONIZE *** ! ******************************************** - call CartSymGN(ierr,cctkGH,"einstein::shift") - call CCTK_SyncGroup(ierr,cctkGH,"einstein::shift") + call CartSymGN(ierr,cctkGH,"admbase::shift") + call CCTK_SyncGroup(ierr,cctkGH,"admbase::shift") ! *************** diff --git a/src/make.code.defn b/src/make.code.defn index 5c7e669..e78f94e 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -7,4 +7,5 @@ SRCS += AHFinder_dat.F AHFinder.F \ AHFinder_flow.F AHFinder_mask.F AHFinder_output.F \ AHFinder_find3.F AHFinder_calcsigma.F \ AHFinder_initguess.F AHFinder_gau.F SetSym.F \ + AHFinder_ParamCheck.F90 \ Startup.c Output.c diff --git a/test/test_AHF_1.par b/test/test_AHF_1.par index 77e874b..6bab2d5 100644 --- a/test/test_AHF_1.par +++ b/test/test_AHF_1.par @@ -2,7 +2,7 @@ # Active thorns. -activethorns = "Time CartGrid3D Einstein boundary adm IDAnalyticBH IOBasic IOUtil IOASCII PUGH PUGHSlab PUGHreduce PUGHInterp AHFinder" +activethorns = "Time CartGrid3D ADMBase StaticConformal SpaceMask CoordGauge ADMMacros Boundary ADM IDAnalyticBH IOBasic IOUtil IOASCII PUGH PUGHSlab PUGHreduce PUGHInterp AHFinder" # Grid. @@ -16,23 +16,27 @@ driver::global_nz = 25 cactus::cctk_itlast = 0 +# conformal state + +ADMBase::metric_type = "static conformal" + # Initial data. -einstein::initial_data = "schwarzschild" +ADMBase::initial_data = "schwarzschild" IDAnalyticBH::mass = 2.0 # Evolution. -einstein::evolution_system = "ADM" +ADMBase::evolution_method = "ADM" adm::bound = "flat" adm::verbose = "yes" # Gauge. -einstein::initial_lapse = "one" -einstein::slicing = "geodesic" +ADMBase::initial_lapse = "one" +ADMBase::lapse_evolution_method = "geodesic" # AHFinder. diff --git a/test/test_AHF_2.par b/test/test_AHF_2.par index 39e2c0c..8f488fb 100644 --- a/test/test_AHF_2.par +++ b/test/test_AHF_2.par @@ -2,7 +2,7 @@ # Active thorns. -activethorns = "Time CartGrid3D Einstein boundary adm IDAnalyticBH IOBasic IOUtil IOASCII PUGH PUGHSlab PUGHReduce PUGHInterp AHFinder" +activethorns = "Time CartGrid3D AdmBase StaticConformal SpaceMask CoordGauge ADMMacros Boundary ADM IDAnalyticBH IOBasic IOUtil IOASCII PUGH PUGHSlab PUGHReduce PUGHInterp AHFinder" # Grid. @@ -16,23 +16,27 @@ driver::global_nz = 25 cactus::cctk_itlast = 0 +# conformal state + +ADMBase::metric_type = "static conformal" + # Initial data. -einstein::initial_data = "schwarzschild" +ADMBase::initial_data = "schwarzschild" IDAnalyticBH::mass = 2.0 # Evolution. -einstein::evolution_system = "ADM" +ADMBase::evolution_method = "ADM" adm::bound = "flat" adm::verbose = "yes" # Gauge. -einstein::initial_lapse = "one" -einstein::slicing = "geodesic" +ADMBase::initial_lapse = "one" +ADMBase::lapse_evolution_method = "geodesic" # AHFinder. -- cgit v1.2.3