[Commits] [svn:einsteintoolkit] WeylScal4/trunk/m/ (Rev. 60)

ian.hinder at aei.mpg.de ian.hinder at aei.mpg.de
Mon Sep 13 06:16:28 CDT 2010


User: hinder
Date: 2010/09/13 06:16 AM

Modified:
 /trunk/m/
  Makefile, WeylScal4.m, WeylScal4.patch

Log:
 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.

File Changes:

Directory: /trunk/m/
====================

File [modified]: Makefile
Delta lines: +0 -1
===================================================================
--- trunk/m/Makefile	2010-09-13 11:13:03 UTC (rev 59)
+++ trunk/m/Makefile	2010-09-13 11:16:27 UTC (rev 60)
@@ -8,7 +8,6 @@
 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     && \

File [modified]: WeylScal4.m
Delta lines: +2 -26
===================================================================
--- trunk/m/WeylScal4.m	2010-09-13 11:13:03 UTC (rev 59)
+++ trunk/m/WeylScal4.m	2010-09-13 11:16:27 UTC (rev 60)
@@ -124,7 +124,6 @@
 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 @@
   }
 };
 
-(* 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 @@
 calculations = 
 {
   PsisCalc["2nd", PDstandard2nd],
-  PsisCalc["4th", PDstandard4th],
-  DummyCalc
+  PsisCalc["4th", PDstandard4th]
 };
 
 CreateKrancThornTT[groups, ".", "WeylScal4", 
@@ -322,4 +298,4 @@
   PartialDerivatives -> derivatives,
   KeywordParameters -> keywordParameters,
   RealParameters -> realParameters,
-  InheritedImplementations -> {"admbase"}];
+  InheritedImplementations -> {"admbase", "methodoflines"}];

File [modified]: WeylScal4.patch
Delta lines: +0 -181
===================================================================
--- trunk/m/WeylScal4.patch	2010-09-13 11:13:03 UTC (rev 59)
+++ trunk/m/WeylScal4.patch	2010-09-13 11:16:27 UTC (rev 60)
@@ -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 



More information about the Commits mailing list