From ce0c967c4a69aa35aa3ce2acd3e8e8d00f75a45c Mon Sep 17 00:00:00 2001 From: schnetter Date: Tue, 20 Jan 2004 12:26:16 +0000 Subject: Add routines to copy the three-metric into other variables, so that more than one timelevels can be accessed. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/CalcK/trunk@4 f47d718b-0e4f-0410-8445-f2f96c8ccefb --- par/calck.par | 7 ++++-- par/copy_to_next.par | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ par/copy_to_prev.par | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ param.ccl | 19 +++++++++++++++ schedule.ccl | 43 ++++++++++++++++++++++++++------- src/copy.F90 | 48 +++++++++++++++++++++++++++++++++++++ src/make.code.defn | 2 +- 7 files changed, 243 insertions(+), 12 deletions(-) create mode 100644 par/copy_to_next.par create mode 100644 par/copy_to_prev.par create mode 100644 src/copy.F90 diff --git a/par/calck.par b/par/calck.par index fc2446a..bb3934f 100644 --- a/par/calck.par +++ b/par/calck.par @@ -22,13 +22,15 @@ IO::filereader_ID_files = " gxx_3d gxy_3d gxz_3d gyy_3d gyz_3d gzz_3d alp_3d betax_3d betay_3d betaz_3d + gxx_prev_3d gxy_prev_3d gxz_prev_3d gyy_prev_3d gyz_prev_3d gzz_prev_3d + gxx_next_3d gxy_next_3d gxz_next_3d gyy_next_3d gyz_next_3d gzz_next_3d " IO::filereader_ID_vars = " ADMBase::lapse[cctk_iteration=101] ADMBase::shift[cctk_iteration=101] ADMBase::metric[cctk_iteration=101] - CalcK::metric_prev[cctk_iteration=100] - CalcK::metric_next[cctk_iteration=102] + CalcK::metric_prev + CalcK::metric_next " ActiveThorns = "IOHDF5 IOHDF5Util" @@ -44,6 +46,7 @@ ActiveThorns = "ADMBase ADMCoupling ADMMacros CoordGauge SpaceMask StaticConform ADMBase::initial_shift = "zero" ActiveThorns = "CalcK" +CalcK::calc_extcurv = yes ActiveThorns = "IOBasic" IOBasic::outInfo_every = 1 diff --git a/par/copy_to_next.par b/par/copy_to_next.par new file mode 100644 index 0000000..ec68881 --- /dev/null +++ b/par/copy_to_next.par @@ -0,0 +1,68 @@ +# $Header$ + +Cactus::cctk_run_title = "Copy to next" +Cactus::cctk_full_warnings = yes +Cactus::cctk_timer_output = full + +Cactus::cctk_itlast = 0 + +ActiveThorns = "always" + +ActiveThorns = "PUGH PUGHInterp PUGHReduce PUGHSlab" +driver::global_nx = 80 +driver::global_ny = 80 +driver::global_nz = 40 + +ActiveThorns = "NaNChecker" + +ActiveThorns = "IOUtil" +IO::out_dir = $parfile + +IO::filereader_ID_files = " + gxx_3d gxy_3d gxz_3d gyy_3d gyz_3d gzz_3d +" +IO::filereader_ID_vars = " + ADMBase::metric[cctk_iteration=102] +" + +ActiveThorns = "IOHDF5 IOHDF5Util" + +ActiveThorns = "Boundary CartGrid3D CoordBase" +CartGrid3D::type = byspacing +CartGrid3D::domain = bitant +CartGrid3D::dxyz = 0.08 +CartGrid3D::avoid_origin = no + +ActiveThorns = "ADMBase ADMCoupling ADMMacros CoordGauge SpaceMask StaticConformal" + +ADMBase::initial_shift = "zero" + +ActiveThorns = "CalcK" +CalcK::copy_to_next = yes + +ActiveThorns = "IOBasic" +IOBasic::outInfo_every = 1 +IOBasic::outInfo_reductions = "minimum maximum" +IOBasic::outInfo_vars = " + ADMBase::gxx + CalcK::gxx_next +" + +IOBasic::outScalar_every = 1 +IOBasic::outScalar_reductions = "minimum maximum mean norm1 norm2 norm_inf" +IOBasic::outScalar_style = gnuplot +IOBasic::outScalar_vars = " + ADMBase::metric +" + +ActiveThorns = "IOASCII" +IOASCII::out1D_every = 1 +IOASCII::out1D_style = "gnuplot f(x)" +IOASCII::out1D_vars = " + ADMBase::metric +" + +IOHDF5::out_every = 1 +IOHDF5::out_vars = " + CalcK::metric_next +" diff --git a/par/copy_to_prev.par b/par/copy_to_prev.par new file mode 100644 index 0000000..85113f0 --- /dev/null +++ b/par/copy_to_prev.par @@ -0,0 +1,68 @@ +# $Header$ + +Cactus::cctk_run_title = "Copy to prev" +Cactus::cctk_full_warnings = yes +Cactus::cctk_timer_output = full + +Cactus::cctk_itlast = 0 + +ActiveThorns = "always" + +ActiveThorns = "PUGH PUGHInterp PUGHReduce PUGHSlab" +driver::global_nx = 80 +driver::global_ny = 80 +driver::global_nz = 40 + +ActiveThorns = "NaNChecker" + +ActiveThorns = "IOUtil" +IO::out_dir = $parfile + +IO::filereader_ID_files = " + gxx_3d gxy_3d gxz_3d gyy_3d gyz_3d gzz_3d +" +IO::filereader_ID_vars = " + ADMBase::metric[cctk_iteration=100] +" + +ActiveThorns = "IOHDF5 IOHDF5Util" + +ActiveThorns = "Boundary CartGrid3D CoordBase" +CartGrid3D::type = byspacing +CartGrid3D::domain = bitant +CartGrid3D::dxyz = 0.08 +CartGrid3D::avoid_origin = no + +ActiveThorns = "ADMBase ADMCoupling ADMMacros CoordGauge SpaceMask StaticConformal" + +ADMBase::initial_shift = "zero" + +ActiveThorns = "CalcK" +CalcK::copy_to_prev = yes + +ActiveThorns = "IOBasic" +IOBasic::outInfo_every = 1 +IOBasic::outInfo_reductions = "minimum maximum" +IOBasic::outInfo_vars = " + ADMBase::gxx + CalcK::gxx_prev +" + +IOBasic::outScalar_every = 1 +IOBasic::outScalar_reductions = "minimum maximum mean norm1 norm2 norm_inf" +IOBasic::outScalar_style = gnuplot +IOBasic::outScalar_vars = " + ADMBase::metric +" + +ActiveThorns = "IOASCII" +IOASCII::out1D_every = 1 +IOASCII::out1D_style = "gnuplot f(x)" +IOASCII::out1D_vars = " + ADMBase::metric +" + +IOHDF5::out_every = 1 +IOHDF5::out_vars = " + CalcK::metric_prev +" diff --git a/param.ccl b/param.ccl index 5003af5..71918e4 100644 --- a/param.ccl +++ b/param.ccl @@ -1,6 +1,25 @@ # Parameter definitions for thorn CalcK # $Header$ +BOOLEAN copy_to_prev "Copy ADMBase::metric to CalcK::metric_prev" +{ +} "no" + +BOOLEAN copy_to_prev2 "Copy ADMBase::metric to CalcK::metric_prev2" +{ +} "no" + +BOOLEAN copy_to_next "Copy ADMBase::metric to CalcK::metric_next" +{ +} "no" + +BOOLEAN calc_extcurv "Calculate extrinsic curvature" +{ +} "no" + + + + STRING extcurv_boundary "Boundary condition for the extrinsic curvature" { ".*" :: "must be a registered boundary condition" diff --git a/schedule.ccl b/schedule.ccl index abd1eb2..53ac01c 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -3,12 +3,37 @@ STORAGE: metric_prev metric_prev2 metric_next -SCHEDULE CalcK AT postinitial -{ - LANG: Fortran - SYNC: ADMBase::curv -} "Calculate K_ij from gamma_ij, alpha, and beta^i" - -SCHEDULE GROUP ApplyBCs as CalcK_ApplyBCs AT postinitial AFTER CalcK -{ -} "Apply boundary conditions" +if (copy_to_prev) { + SCHEDULE CalcK_copy_to_prev AT postinitial + { + LANG: Fortran + } "Copy ADMBase::metric to CalcK::metric_prev" +} + +if (copy_to_prev2) { + SCHEDULE CalcK_copy_to_prev2 AT postinitial + { + LANG: Fortran + } "Copy ADMBase::metric to CalcK::metric_prev2" +} + +if (copy_to_next) { + SCHEDULE CalcK_copy_to_next AT postinitial + { + LANG: Fortran + } "Copy ADMBase::metric to CalcK::metric_next" +} + +if (calc_extcurv) { + + SCHEDULE CalcK AT postinitial + { + LANG: Fortran + SYNC: ADMBase::curv + } "Calculate K_ij from gamma_ij, alpha, and beta^i" + + SCHEDULE GROUP ApplyBCs as CalcK_ApplyBCs AT postinitial AFTER CalcK + { + } "Apply boundary conditions" + +} diff --git a/src/copy.F90 b/src/copy.F90 new file mode 100644 index 0000000..78ea694 --- /dev/null +++ b/src/copy.F90 @@ -0,0 +1,48 @@ +! $Header$ + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Functions.h" +#include "cctk_Parameters.h" + +subroutine CalcK_copy_to_prev (CCTK_ARGUMENTS) + implicit none + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_FUNCTIONS + DECLARE_CCTK_PARAMETERS + + gxx_prev = gxx + gxy_prev = gxy + gxz_prev = gxz + gyy_prev = gyy + gyz_prev = gyz + gzz_prev = gzz +end subroutine CalcK_copy_to_prev + +subroutine CalcK_copy_to_prev2 (CCTK_ARGUMENTS) + implicit none + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_FUNCTIONS + DECLARE_CCTK_PARAMETERS + + gxx_prev2 = gxx + gxy_prev2 = gxy + gxz_prev2 = gxz + gyy_prev2 = gyy + gyz_prev2 = gyz + gzz_prev2 = gzz +end subroutine CalcK_copy_to_prev2 + +subroutine CalcK_copy_to_next (CCTK_ARGUMENTS) + implicit none + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_FUNCTIONS + DECLARE_CCTK_PARAMETERS + + gxx_next = gxx + gxy_next = gxy + gxz_next = gxz + gyy_next = gyy + gyz_next = gyz + gzz_next = gzz +end subroutine CalcK_copy_to_next diff --git a/src/make.code.defn b/src/make.code.defn index 147f54e..1324938 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -2,7 +2,7 @@ # $Header$ # Source files in this directory -SRCS = CalcK.F90 +SRCS = CalcK.F90 copy.F90 # Subdirectories containing source files SUBDIRS = -- cgit v1.2.3