aboutsummaryrefslogtreecommitdiff
path: root/m
diff options
context:
space:
mode:
authorhinder <hinder@4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843>2010-09-13 11:16:27 +0000
committerhinder <hinder@4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843>2010-09-13 11:16:27 +0000
commit279e8c54fa0e13c5f460739aa723bb26e1461b74 (patch)
treecfd7f1d8bcbec8da774373b0e78a752e579fd2b8 /m
parent653514294786522d16e9a098e5a31b9d968772db (diff)
Schedule calculation automatically including boundary conditions
Newer versions of Kranc default to scheduling calculations in MoL_PseudoEvolution and applying the boundary conditions if no Schedule string is supplied. Here WeylScal4 is updated to use this feature, which removes the need for manual patching. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/WeylScal4/trunk@60 4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843
Diffstat (limited to 'm')
-rw-r--r--m/Makefile1
-rw-r--r--m/WeylScal4.m28
-rw-r--r--m/WeylScal4.patch181
3 files changed, 2 insertions, 208 deletions
diff --git a/m/Makefile b/m/Makefile
index e9bf163..18bf492 100644
--- a/m/Makefile
+++ b/m/Makefile
@@ -8,7 +8,6 @@ all: WeylScal4.out
WeylScal4.out: WeylScal4.m
rm -rf WeylScal4
./runmath.sh $^
- patch -p1 -d WeylScal4 <WeylScal4.patch
for thorn in WeylScal4; do \
./copy-if-changed.sh $$thorn/configuration.ccl ../../$$thorn/configuration.ccl && \
./copy-if-changed.sh $$thorn/interface.ccl ../../$$thorn/interface.ccl && \
diff --git a/m/WeylScal4.m b/m/WeylScal4.m
index 4c373ec..ecf62db 100644
--- a/m/WeylScal4.m
+++ b/m/WeylScal4.m
@@ -124,7 +124,6 @@ realParameters = {{Name -> offset, Default -> 10^(-15)},xorig,yorig,zorig};
PsisCalc[fdOrder_, PD_] :=
{
Name -> "psis_calc_" <> fdOrder,
- Schedule -> {"in WeylScal4_Calculate as calc_np"},
Where -> Interior,
ConditionalOnKeyword -> {"fd_order", fdOrder},
Shorthands -> shorthands,
@@ -270,28 +269,6 @@ PsisCalc[fdOrder_, PD_] :=
}
};
-(* Dummy calculation routine to fool Kranc into thinking that the Weyl scalars
- are evolved quantities. This way we get code to register boundary conditions.
- Unfortunately it also registers with MoL so we have to remove that code by hand.
-*)
-DummyCalc :=
-{
- Name -> "dummycalc",
- Schedule -> {"in Nowhere_Nevertoberun"},
- Equations ->
- {
- dot[Psi4r] -> 0,
- dot[Psi4i] -> 0 (*,
- dot[Psi3r] -> 0,
- dot[Psi3i] -> 0,
- dot[Psi2r] -> 0,
- dot[Psi2i] -> 0,
- dot[Psi1r] -> 0,
- dot[Psi1i] -> 0,
- dot[Psi0r] -> 0,
- dot[Psi0i] -> 0 *)
- }
-}
(****************************************************************************
Construct the thorn
@@ -312,8 +289,7 @@ keywordParameters =
calculations =
{
PsisCalc["2nd", PDstandard2nd],
- PsisCalc["4th", PDstandard4th],
- DummyCalc
+ PsisCalc["4th", PDstandard4th]
};
CreateKrancThornTT[groups, ".", "WeylScal4",
@@ -322,4 +298,4 @@ CreateKrancThornTT[groups, ".", "WeylScal4",
PartialDerivatives -> derivatives,
KeywordParameters -> keywordParameters,
RealParameters -> realParameters,
- InheritedImplementations -> {"admbase"}];
+ InheritedImplementations -> {"admbase", "methodoflines"}];
diff --git a/m/WeylScal4.patch b/m/WeylScal4.patch
index e76d198..e69de29 100644
--- a/m/WeylScal4.patch
+++ b/m/WeylScal4.patch
@@ -1,181 +0,0 @@
-diff -r -c a/interface.ccl b/interface.ccl
-*** a/interface.ccl 2010-05-03 23:48:16.810592882 -0400
---- b/interface.ccl 2010-05-03 23:51:37.206592882 -0400
-***************
-*** 34,48 ****
- {
- Psi4r
- } "Psi4r_group"
--
-- public:
-- CCTK_REAL Psi4i_grouprhs type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1 tensorparity=-1'
-- {
-- Psi4irhs
-- } "Psi4i_grouprhs"
--
-- public:
-- CCTK_REAL Psi4r_grouprhs type=GF timelevels=3 tags='tensortypealias="Scalar" tensorweight=1 tensorparity=1'
-- {
-- Psi4rrhs
-- } "Psi4r_grouprhs"
---- 34,36 ----
-diff -r -c a/param.ccl b/param.ccl
-*** a/param.ccl 2010-05-03 23:48:16.811592882 -0400
---- b/param.ccl 2010-05-03 23:51:37.207592882 -0400
-***************
-*** 52,75 ****
- } "2nd"
-
- restricted:
-- CCTK_INT WeylScal4_MaxNumEvolvedVars "Number of evolved variables used by this thorn" ACCUMULATOR-BASE=MethodofLines::MoL_Num_Evolved_Vars
-- {
-- 2:2 :: "Number of evolved variables used by this thorn"
-- } 2
--
-- restricted:
- CCTK_INT timelevels "Number of active timelevels"
- {
- 0:3 :: ""
- } 3
-
- restricted:
-- CCTK_INT rhs_timelevels "Number of active RHS timelevels"
-- {
-- 0:3 :: ""
-- } 1
--
-- restricted:
- CCTK_INT psis_calc_2nd_calc_every "psis_calc_2nd_calc_every"
- {
- *:* :: ""
---- 52,63 ----
-diff -r -c a/schedule.ccl b/schedule.ccl
-*** a/schedule.ccl 2010-05-03 23:48:16.811592882 -0400
---- b/schedule.ccl 2010-05-03 23:51:37.206592882 -0400
-***************
-*** 27,58 ****
- STORAGE: Psi4r_group[3]
- }
-
-- if (rhs_timelevels == 1)
-- {
-- STORAGE: Psi4i_grouprhs[1]
-- }
-- if (rhs_timelevels == 2)
-- {
-- STORAGE: Psi4i_grouprhs[2]
-- }
-- if (rhs_timelevels == 3)
-- {
-- STORAGE: Psi4i_grouprhs[3]
-- }
--
-- if (rhs_timelevels == 1)
-- {
-- STORAGE: Psi4r_grouprhs[1]
-- }
-- if (rhs_timelevels == 2)
-- {
-- STORAGE: Psi4r_grouprhs[2]
-- }
-- if (rhs_timelevels == 3)
-- {
-- STORAGE: Psi4r_grouprhs[3]
-- }
--
- schedule WeylScal4_Startup at STARTUP
- {
- LANG: C
---- 27,32 ----
-***************
-*** 72,77 ****
---- 46,55 ----
- } "register symmetries"
-
-
-+ schedule group WeylScal4_Calculate in MoL_PseudoEvolution
-+ {
-+ } "Calculate the Newman-Penrose quantities"
-+
- if (CCTK_EQUALS(fd_order, "2nd"))
- {
- schedule psis_calc_2nd in WeylScal4_Calculate as calc_np
-***************
-*** 93,104 ****
- } "psis_calc_4th"
- }
-
-! schedule dummycalc in Nowhere_Nevertoberun
-! {
-! LANG: C
-! } "dummycalc"
-!
-! schedule WeylScal4_SelectBoundConds in MoL_PostStep
- {
- LANG: C
- OPTIONS: level
---- 70,76 ----
- } "psis_calc_4th"
- }
-
-! schedule WeylScal4_SelectBoundConds in WeylScal4_Boundaries
- {
- LANG: C
- OPTIONS: level
-***************
-*** 112,118 ****
- OPTIONS: meta
- } "check boundaries treatment"
-
-! schedule group ApplyBCs as WeylScal4_ApplyBCs in MoL_PostStep after WeylScal4_SelectBoundConds
- {
- # no language specified
- } "Apply boundary conditions controlled by thorn Boundary"
---- 84,105 ----
- OPTIONS: meta
- } "check boundaries treatment"
-
-! schedule group ApplyBCs as WeylScal4_ApplyBCs in WeylScal4_Boundaries after WeylScal4_SelectBoundConds
-! {
-! # no language specified
-! } "Apply boundary conditions controlled by thorn Boundary"
-!
-! schedule group WeylScal4_Boundaries in WeylScal4_Calculate after calc_np
-! {
-! # no language specified
-! } "Apply boundary conditions controlled by thorn Boundary"
-!
-! schedule group WeylScal4_Boundaries in CCTK_POSTRESTRICTINITIAL
-! {
-! # no language specified
-! } "Apply boundary conditions controlled by thorn Boundary"
-!
-! schedule group WeylScal4_Boundaries in CCTK_POSTRESTRICT
- {
- # no language specified
- } "Apply boundary conditions controlled by thorn Boundary"
-diff -r -c a/src/RegisterMoL.c b/src/RegisterMoL.c
-*** a/src/RegisterMoL.c 2010-05-03 23:48:16.811592882 -0400
---- b/src/RegisterMoL.c 2010-05-03 23:51:37.206592882 -0400
-***************
-*** 12,18 ****
- CCTK_INT ierr = 0;
-
- /* Register all the evolved grid functions with MoL */
-- ierr += MoLRegisterEvolved(CCTK_VarIndex("WeylScal4::Psi4i"), CCTK_VarIndex("WeylScal4::Psi4irhs"));
-- ierr += MoLRegisterEvolved(CCTK_VarIndex("WeylScal4::Psi4r"), CCTK_VarIndex("WeylScal4::Psi4rrhs"));
- return;
- }
---- 12,16 ----
-diff -r -c a/src/make.code.defn b/src/make.code.defn
-*** a/src/make.code.defn 2010-05-03 23:48:16.811592882 -0400
---- b/src/make.code.defn 2010-05-03 23:51:37.206592882 -0400
-***************
-*** 1,3 ****
- # File produced by Kranc
-
-! SRCS = Startup.c RegisterMoL.c RegisterSymmetries.c psis_calc_2nd.c psis_calc_4th.c dummycalc.c Boundaries.c
---- 1,3 ----
- # File produced by Kranc
-
-! SRCS = Startup.c RegisterMoL.c RegisterSymmetries.c psis_calc_2nd.c psis_calc_4th.c Boundaries.c