diff options
author | rideout <rideout@b7a48df3-cbbf-4440-997f-b4b717c9f7fc> | 2003-04-28 22:24:17 +0000 |
---|---|---|
committer | rideout <rideout@b7a48df3-cbbf-4440-997f-b4b717c9f7fc> | 2003-04-28 22:24:17 +0000 |
commit | 48e3fb88387d2d08cebbad4c0d7eefb677179d81 (patch) | |
tree | d58aaab2b2ee5bbd5cfec3da660d759b0f264157 | |
parent | 37ecaa15d029f7ca274b2db95c6aced9e63b3992 (diff) |
Split hamnormalized into its own variable group, so that it will work
properly with Cartoon.
Cartoon is now properly called by selecting variables for 'None'
boundary condition, and defining their proper tensortypealias in
interface.ccl. Note that this illustrates how to trigger an entire
schedule group in the ANALYSIS time bin.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/ADMConstraints/trunk@84 b7a48df3-cbbf-4440-997f-b4b717c9f7fc
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | interface.ccl | 19 | ||||
-rw-r--r-- | schedule.ccl | 26 | ||||
-rw-r--r-- | src/ADMConstraints.F | 25 |
4 files changed, 47 insertions, 26 deletions
@@ -15,6 +15,5 @@ aware. Matter is included with the CalcTmunu mechanism. 3. Output -Hamiltonian constraint: ham +Hamiltonian constraint: ham, hamnormalized Momentum constraints: momx, momy, momz - diff --git a/interface.ccl b/interface.ccl index 8516ed7..023a1b4 100644 --- a/interface.ccl +++ b/interface.ccl @@ -8,15 +8,28 @@ friend: ADMCoupling USES INCLUDE: CalcTmunu.inc USES INCLUDE: CalcTmunu_temps.inc +# Function aliases +CCTK_INT FUNCTION Boundary_SelectVarForBC(CCTK_POINTER GH, CCTK_INT faces, \ + CCTK_INT table_handle, CCTK_STRING var_name, CCTK_STRING bc_name) +CCTK_INT FUNCTION Boundary_SelectGroupForBC(CCTK_POINTER GH, CCTK_INT faces, \ + CCTK_INT table_handle, CCTK_STRING group_name, CCTK_STRING bc_name) + +USES FUNCTION Boundary_SelectVarForBC +USES FUNCTION Boundary_SelectGroupForBC + private: -real hamiltonian type=GF +real hamiltonian type=GF tags='tensortypealias="Scalar"' { ham +} "Hamiltonian constraint" + +real normalized_hamiltonian type=GF tags='tensortypealias="Scalar"' +{ hamnormalized -} "Hamiltonian constraint" +} "Normalized hamiltonian constraint"" -real momentum type=GF +real momentum type=GF tags='tensortypealias="U"' { momx, momy, diff --git a/schedule.ccl b/schedule.ccl index 7a33dd3..5e34880 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -1,4 +1,3 @@ - # Make sure there is storage for the conformal state flag # so we can use it irrespective of metric_type storage: conformal_state @@ -20,21 +19,30 @@ schedule ADMConstraint_InitSymBound at CCTK_BASEGRID if (constraints_persist) { - STORAGE: hamiltonian,momentum + STORAGE: hamiltonian, normalized_hamiltonian, momentum schedule ADMConstraints at CCTK_POSTSTEP { LANG: Fortran } "Evaluate ADM constraints for use in other routines" + + schedule GROUP ApplyBCs at CCTK_POSTSTEP after ADMConstraints + { + } "Apply (symmetry) boundary conditions" } else { - schedule ADMConstraints at CCTK_ANALYSIS + schedule GROUP ADMConstraintsGroup at CCTK_ANALYSIS + { + STORAGE: hamiltonian, normalized_hamiltonian, momentum + TRIGGERS: hamiltonian, normalized_hamiltonian, momentum + } "Evaluate ADM constraints, and perform symmetry boundary conditions" + + schedule ADMConstraints in ADMConstraintsGroup { LANG: Fortran - STORAGE: hamiltonian,momentum - TRIGGERS: hamiltonian,momentum - } "Evaluate ADM constraints" -} - - + } "Evaluate ADM constraints" + schedule GROUP ApplyBCs in ADMConstraintsGroup after ADMConstraints + { + } "Apply (symmetry) boundary conditions" +} diff --git a/src/ADMConstraints.F b/src/ADMConstraints.F index 9c30b1b..a4423b9 100644 --- a/src/ADMConstraints.F +++ b/src/ADMConstraints.F @@ -20,11 +20,7 @@ #include "cctk_Parameters.h" #include "cctk_Arguments.h" -#include "cctk_DefineThorn.h" - -#ifdef BETATHORNS_CARTOON2D -#include "BetaThorns/Cartoon2D/src/Cartoon2D_tensors.h" -#endif +#include "cctk_Faces.h" subroutine ADMConstraints(CCTK_ARGUMENTS) @@ -34,6 +30,10 @@ DECLARE_CCTK_PARAMETERS DECLARE_CCTK_FUNCTIONS +c Function aliases. + + CCTK_INT :: Boundary_SelectVarForBC, Boundary_SelectGroupForBC + integer i,j,k integer nx,ny,nz @@ -278,17 +278,18 @@ c Cartoon. if (cartoon==1) then -#ifdef BETATHORNS_CARTOON2D if (CCTK_IsThornActive("Cartoon2D")==1) then - call BndCartoon2DGN(ierr,cctkGH,TENSORTYPE_SCALAR,"admconstraints::hamiltonian") - call BndCartoon2DGN(ierr,cctkGH,TENSORTYPE_U,"admconstraints::momentum") + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, + $ "admconstraints::ham", "None") + ierr = Boundary_SelectVarForBC(cctkGH, CCTK_ALL_FACES, + $ "admconstraints::hamnormalized", "None") + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, + $ "admconstraints::momentum", "None") + else + call CCTK_WARN(0,"You have not activated Cartoon2D") end if -#else - call CCTK_WARN(0,"You have not compiled with Cartoon2D") -#endif end if return end - |