From 3c22ef6066de0a1bfc7af1bd46159157c37146e9 Mon Sep 17 00:00:00 2001 From: goodale Date: Fri, 26 Apr 2002 13:17:57 +0000 Subject: Have the old slicing stuff working, with new param names. Tom git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinBase/CoordGauge/trunk@45 edbb7e70-9571-45d5-a481-0a560a9b4751 --- interface.ccl | 6 ++++++ param.ccl | 31 +++++++++++++++++++++++++++++++ schedule.ccl | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/Slicing.c | 38 +++++++++++--------------------------- src/make.code.defn | 2 +- 5 files changed, 93 insertions(+), 28 deletions(-) diff --git a/interface.ccl b/interface.ccl index 262ffb0..da5f044 100644 --- a/interface.ccl +++ b/interface.ccl @@ -16,3 +16,9 @@ INT slicing_flags TYPE = SCALAR # selected_lapse # selected_shift #} "Slicing Handles" + + +# FIXME: This will be removed when new slicing stuff is there + +INCLUDE HEADER: Slicing.h in Slicing.h + diff --git a/param.ccl b/param.ccl index 343d3e0..62a3aae 100644 --- a/param.ccl +++ b/param.ccl @@ -1,3 +1,34 @@ # Parameter definitions for thorn CoordGauge # $Header$ +shares: ADMBase + +EXTENDS KEYWORD lapse_evolution_method +{ + "coordgauge" :: "Use dynamic stuff from CoordGauge" +} + +EXTENDS KEYWORD shift_evolution_method +{ + "coordgauge" :: "Use dynamic stuff from CoordGauge" +} + +restricted: + +STRING lapse_list "List of allowed lapses to use" +{ + ".*" :: "Any string" +} "" + +STRING shift_list "List of allowed shifts to use" +{ + ".*" :: "Any string" +} "" + +private: + +KEYWORD slicing_verbose "Print information on current slicing" +{ + "yes" :: "print slicing info" + "no" :: "do not print slicing info" +} "no" diff --git a/schedule.ccl b/schedule.ccl index 468d827..b80be63 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -1,2 +1,46 @@ # Schedule definitions for thorn CoordGauge # $Header$ + +# Old stuff +schedule Einstein_ActivateSlicing at CCTK_BASEGRID +{ + LANG: C +} "Initialize slicing, setup priorities for mixed slicings" + +schedule Einstein_SetNextSlicing at CCTK_PRESTEP +{ + LANG: C +} "Identify the slicing for the next iteration" + +#New stuff + +if(CCTK_Equals(lapse_evolution_method, "coordgauge")|| + CCTK_Equals(shift_evolution_method, "coordgauge")) +{ + SCHEDULE GROUP CoordGauge AT CCTK_PRESTEP + { + } "Coordinate Gauge group" + + + if(CCTK_Equals(lapse_evolution_method, "coordgauge")) + { + SCHEDULE GROUP LapseSelect IN CoordGauge BEFORE PickCoordGauge + { + } "Lapse Selection Group" + + SCHEDULE GROUP LapseApply IN CoordGauge AFTER PickCoordGauge + { + } "Lapse Application Group" + } + + if(CCTK_Equals(shift_evolution_method, "coordgauge")) + { + SCHEDULE GROUP ShiftSelect IN CoordGauge BEFORE PickCoordGauge + { + } "Shift Selection Group" + + SCHEDULE GROUP ShiftApply IN CoordGauge AFTER PickCoordGauge + { + } "Shift Application Group" + } +} diff --git a/src/Slicing.c b/src/Slicing.c index 4df0739..7868ab1 100644 --- a/src/Slicing.c +++ b/src/Slicing.c @@ -236,7 +236,7 @@ void Einstein_ActivateSlicing(cGH *GH) char *item=NULL, *after=NULL; /* Get our grid scalar pointer: initialize with -1*/ - i = CCTK_VarIndex("Einstein::active_slicing_handle"); + i = CCTK_VarIndex("CoordGauge::active_slicing_handle"); if (i<0) { CCTK_WARN(0,"Cannot find grid scalar: active_slicing_handle"); @@ -246,19 +246,14 @@ void Einstein_ActivateSlicing(cGH *GH) /* we have a clearly defined slicing - no "mixed" */ - if (!CCTK_Equals(slicing,"mixed")) + if (!CCTK_Equals(lapse_evolution_method,"coordgauge")) { - handle= Util_GetHandle(Eslicings,slicing,NULL); + handle= Util_GetHandle(Eslicings,lapse_evolution_method,NULL); if (handle<0) { - /* If slicing is set to "none", only warn level 2 (could be initial data only) */ - if (CCTK_Equals(slicing,"none")) - { - CCTK_WARN(2,"No slicing set. Probably fatal for evolution"); - } - else if (CCTK_Equals(slicing,"static")) + if (CCTK_Equals(lapse_evolution_method,"static")) { handle2=Einstein_RegisterSlicing("static"); if (handle2<0) @@ -266,7 +261,7 @@ void Einstein_ActivateSlicing(cGH *GH) CCTK_WARN(1,"Cannot register static slicing"); } } - else if (CCTK_Equals(slicing,"geodesic")) + else if (CCTK_Equals(lapse_evolution_method,"geodesic")) { handle2=Einstein_RegisterSlicing("geodesic"); if (handle2<0) @@ -277,7 +272,7 @@ void Einstein_ActivateSlicing(cGH *GH) else { CCTK_VWarn(1,__LINE__,__FILE__,CCTK_THORNSTRING, - "Cannot get handle for slicing %s",slicing); + "Cannot get handle for slicing %s",lapse_evolution_method); } return; } @@ -312,8 +307,8 @@ void Einstein_ActivateSlicing(cGH *GH) */ /* we attach an additional space for string splitting */ - split_string= (char*)malloc(strlen(mixed_slicing)*sizeof(char)+2); - sprintf(split_string,"%s ",mixed_slicing); + split_string= (char*)malloc(strlen(lapse_list)*sizeof(char)+2); + sprintf(split_string,"%s ",lapse_list); /* Here we take the string appart */ Util_SplitString(&item,&after,split_string," "); @@ -471,16 +466,16 @@ void Einstein_SetNextSlicing(cGH *GH) /* Get our grid scalar pointer */ - i = CCTK_VarIndex("Einstein::active_slicing_handle"); + i = CCTK_VarIndex("CoordGauge::active_slicing_handle"); if (i<0) { CCTK_WARN(0,"Cannot find grid scalar: active_slicing_handle"); } active_slicing_handle = (CCTK_INT *)CCTK_VarDataPtrI(GH,0,i); - if (!CCTK_Equals(slicing,"mixed")) + if (!CCTK_Equals(lapse_evolution_method,"coordgauge")) { - h = Util_GetHandle(Eslicings,slicing,NULL); + h = Util_GetHandle(Eslicings,lapse_evolution_method,NULL); if (h<0) { CCTK_WARN(0,"Slicing parameter specifies non-activated/registered slicing!"); @@ -591,14 +586,3 @@ void Einstein_SetNextSlicing(cGH *GH) } - - - - - - - - - - - diff --git a/src/make.code.defn b/src/make.code.defn index 38048cf..ed11ed6 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -2,7 +2,7 @@ # $Header$ # Source files in this directory -SRCS = +SRCS = Slicing.c # Subdirectories containing source files SUBDIRS = -- cgit v1.2.3