aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README3
-rw-r--r--interface.ccl19
-rw-r--r--schedule.ccl26
-rw-r--r--src/ADMConstraints.F25
4 files changed, 47 insertions, 26 deletions
diff --git a/README b/README
index 1497e56..862e7c6 100644
--- a/README
+++ b/README
@@ -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
-