aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryye00 <yye00@c78560ca-4b45-4335-b268-5f3340f3cb52>2008-05-25 19:46:50 +0000
committeryye00 <yye00@c78560ca-4b45-4335-b268-5f3340f3cb52>2008-05-25 19:46:50 +0000
commit382883cb71ff327ec582f293941ccc97038a86c9 (patch)
treea9610db2bebd936339e2059e282562ad23512ff3
parent20123e142659c01c6d51f4dd8b6b90e0b4f5ee52 (diff)
need this thorn to be update to date for funwave
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/CartGrid3D/trunk@240 c78560ca-4b45-4335-b268-5f3340f3cb52
-rw-r--r--configuration.ccl4
-rw-r--r--interface.ccl49
-rw-r--r--param.ccl165
-rw-r--r--schedule.ccl63
-rw-r--r--src/Startup.c139
-rw-r--r--src/make.code.defn3
6 files changed, 27 insertions, 396 deletions
diff --git a/configuration.ccl b/configuration.ccl
index 6a14089..a450c37 100644
--- a/configuration.ccl
+++ b/configuration.ccl
@@ -1,8 +1,8 @@
-# Configuration definitions for thorn CartGrid3D
+# Configuration definitions for thorn CartGrid2D
# $Header$
# This will disappear once no-one calls anything from this thorn
-PROVIDES CartGrid3D
+PROVIDES CartGrid2D
{
SCRIPT
LANG
diff --git a/interface.ccl b/interface.ccl
index f494d3a..655fa55 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -1,10 +1,10 @@
-# Interface definition for thorn CartGrid3D
+# Interface definition for thorn CartGrid2D
# $Header$
implements: grid
inherits: coordbase
-INCLUDE HEADER: Symmetry.h in Symmetry.h
+#INCLUDE HEADER: Symmetry.h in Symmetry.h
uses include header: CoordBase.h
# The overall size of the domain
@@ -30,41 +30,6 @@ CCTK_INT FUNCTION ConvertFromPhysicalBoundary \
CCTK_REAL IN ARRAY spacing)
USES FUNCTION ConvertFromPhysicalBoundary
-
-
-CCTK_INT FUNCTION \
- MultiPatch_GetMap \
- (CCTK_POINTER_TO_CONST IN cctkGH)
-USES FUNCTION MultiPatch_GetMap
-
-CCTK_INT FUNCTION \
- MultiPatch_GetDomainSpecification \
- (CCTK_INT IN map, \
- CCTK_INT IN size, \
- CCTK_REAL OUT ARRAY physical_min, \
- CCTK_REAL OUT ARRAY physical_max, \
- CCTK_REAL OUT ARRAY interior_min, \
- CCTK_REAL OUT ARRAY interior_max, \
- CCTK_REAL OUT ARRAY exterior_min, \
- CCTK_REAL OUT ARRAY exterior_max, \
- CCTK_REAL OUT ARRAY spacing)
-USES FUNCTION MultiPatch_GetDomainSpecification
-
-CCTK_INT FUNCTION \
- MultiPatch_ConvertFromPhysicalBoundary \
- (CCTK_INT IN map, \
- CCTK_INT IN size, \
- CCTK_REAL IN ARRAY physical_min, \
- CCTK_REAL IN ARRAY physical_max, \
- CCTK_REAL OUT ARRAY interior_min, \
- CCTK_REAL OUT ARRAY interior_max, \
- CCTK_REAL OUT ARRAY exterior_min, \
- CCTK_REAL OUT ARRAY exterior_max, \
- CCTK_REAL IN ARRAY spacing)
-USES FUNCTION MultiPatch_ConvertFromPhysicalBoundary
-
-
-
# Register the symmetry boundaries
CCTK_INT FUNCTION SymmetryRegister (CCTK_STRING IN sym_name)
USES FUNCTION SymmetryRegister
@@ -96,12 +61,10 @@ public:
REAL gridspacings type=SCALAR tags='Checkpoint="no"'
{
- coarse_dx, coarse_dy, coarse_dz
-} "3D Cartesian grid spacings"
+ coarse_dx, coarse_dy
+} "2D Cartesian grid spacings"
REAL coordinates type=GF tags='Prolongation="None" Checkpoint="no"'
{
- x, y, z, r
-# will become:
-# coord_x, coord_y, coord_z
-} "3D Cartesian grid coordinates"
+ x, y, r
+} "2D Cartesian grid coordinates"
diff --git a/param.ccl b/param.ccl
index ef99355..7ab90f5 100644
--- a/param.ccl
+++ b/param.ccl
@@ -6,92 +6,19 @@ shares: driver
USES BOOLEAN periodic
USES BOOLEAN periodic_x
USES BOOLEAN periodic_y
-USES BOOLEAN periodic_z
-
private:
-BOOLEAN no_origin "DEPRECATED: Don't place grid points on the coordinate origin/axes"
-{
- : :: ""
-} "yes"
-
-BOOLEAN no_originx "DEPRECATED: Don't place grid points on the x-coordinate origin/axes"
-{
- : :: ""
-} "yes"
-
-BOOLEAN no_originy "DEPRECATED: Don't place grid points on the y-coordinate origin/axes"
-{
- : :: ""
-} "yes"
-
-BOOLEAN no_originz "DEPRECATED: Don't place grid points on the z-coordinate origin/axes"
-{
- : :: ""
-} "yes"
-
-BOOLEAN avoid_originx "Don't place grid points on the x-coordinate origin/axes"
-{
- : :: ""
-} "yes"
-
-BOOLEAN avoid_originy "Don't place grid points on the y-coordinate origin/axes"
-{
- : :: ""
-} "yes"
-
-BOOLEAN avoid_originz "Don't place grid points on the z-coordinate origin/axes"
-{
- : :: ""
-} "yes"
-
-BOOLEAN avoid_origin "Don't place grid points on the coordinate origin/axes"
-{
- : :: ""
-} "yes"
-
-BOOLEAN register_default_coordinate_systems "register cartnd as the default coordinate systems"
-{
-} "yes"
-
restricted:
-REAL dx "Coarse grid spacing in x-direction"
-{
- 0:* :: "Positive"
-} 0.3
-REAL dy "Coarse grid spacing in y-direction"
-{
- 0:* :: "Positive"
-} 0.3
-REAL dz "Coarse grid spacing in z-direction"
-{
- 0:* :: "Positive"
-} 0.3
-REAL dxyz "Coarse grid spacing in x,y,z-directions"
-{
- 0:* :: "Positive"
-} 0.0
-
-
REAL xmin "Coordinate minimum in x-direction"
{
: :: "Anything"
-} -1.0
+} 0.0
REAL ymin "Coordinate minimum in y-direction"
{
: :: "Anything"
-} -1.0
-REAL zmin "Coordinate minimum in z-direction"
-{
- : :: "Anything"
-} -1.0
-REAL xyzmin "Coordinate minimum in x,y,z-directions"
-{
- : :: "Anything"
-} -424242
-
+} 0.0
REAL xmax "Coordinate maximum in x-direction"
{
@@ -101,92 +28,4 @@ REAL ymax "Coordinate maximum in y-direction"
{
: :: "Anything"
} 1.0
-REAL zmax "Coordinate maximum in z-direction"
-{
- : :: "Anything"
-} 1.0
-REAL xyzmax "Coordinate maximum in xyz-directions"
-{
- : :: "Anything"
-} -424242
-
-
-KEYWORD type "Grid type"
-{
- "box" :: "Box grid from -0.5 to 0.5"
- "byrange" :: "Specify min and max values"
- "byspacing" :: "Specify grid spacings"
- "coordbase" :: "Get specification from CoordBase"
- "multipatch" :: "Get specification from MultiPatch"
-} "box"
-
-KEYWORD domain "Domain type"
-{
- "octant" :: "Use an octant about the origin"
- "quadrant" :: "Use a quadrant in x-y plane"
- "quadrant_reflect_rotate" :: "Use a quadrant with rotation symmetry about an axis"
- "bitant" :: "Use a bitant about the x-y plane"
- "bitant_rotate" :: "Use a bitant with rotation symmetry about an axis"
- "full" :: "Use the full domain"
-} "full"
-
-KEYWORD bitant_plane "Plane defining bitant domain"
-{
- "xy" :: "xy-plane"
- "xz" :: "xz-plane"
- "yz" :: "yz-plane"
-} "xy"
-
-KEYWORD quadrant_direction "Direction defining quadrant domain"
-{
- "x" :: "x-direction"
- "y" :: "y-direction"
- "z" :: "z-direction"
-} "z"
-
-KEYWORD rotation_axis "Axis about which the rotation symmetry is to be applied"
-{
- "x" :: "x-axis"
- "y" :: "y-axis"
- "z" :: "z-axis"
-} "z"
-
-BOOLEAN symmetry_xmin "Symmetry boundary condition on lower x boundary"
-{
- : :: "Logical"
-} "no"
-
-BOOLEAN symmetry_ymin "Symmetry boundary condition on lower y boundary"
-{
- : :: "Logical"
-} "no"
-
-BOOLEAN symmetry_zmin "Symmetry boundary condition on lower z boundary"
-{
- : :: "Logical"
-} "no"
-
-BOOLEAN symmetry_xmax "Symmetry boundary condition on upper x boundary"
-{
- : :: "Logical"
-} "no"
-
-BOOLEAN symmetry_ymax "Symmetry boundary condition on upper y boundary"
-{
- : :: "Logical"
-} "no"
-
-BOOLEAN symmetry_zmax "Symmetry boundary condition on upper z boundary"
-{
- : :: "Logical"
-} "no"
-
-private:
-
-KEYWORD set_coordinate_ranges_on "On which grids to set the coordinate ranges"
-{
- "all grids" :: "set ranges in local mode, on the coarsest level"
- "all maps" :: "set ranges in singlemap mode, on the coarsest level"
- "first level" :: "set ranges in level mode, on the first level"
-} "all grids"
diff --git a/schedule.ccl b/schedule.ccl
index 4d543d4..40ecd15 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -1,70 +1,21 @@
-# Schedule definitions for thorn CartGrid3D
+# Schedule definitions for thorn CartGrid2D
# $Header$
STORAGE: coordinates gridspacings
-schedule SymmetryStartup at CCTK_STARTUP
-{
- LANG: C
-} "Register GH Extension for GridSymmetry"
-
-schedule RegisterCartGrid3DCoords at CCTK_WRAGH
+schedule RegisterCartGrid2DCoords at CCTK_WRAGH
{
LANG:C
- OPTIONS: meta
-} "Register coordinates for the Cartesian grid"
+}"register coordinates for the cartesian grid"
-schedule RegisterSymmetryBoundaries in SymmetryRegister
+schedule CartGrid2D_SetRanges at CCTK_BASEGRID before SpatialCoordinates
{
LANG:C
- OPTIONS: meta
-} "Register symmetry boundaries"
+} "Set up ranges for spatial 2D Cartesian coordinates (on all grids)"
-schedule ParamCheck_CartGrid3D at CCTK_PARAMCHECK
-{
- LANG:C
-} "Check coordinates for CartGrid3D"
-if (CCTK_EQUALS (set_coordinate_ranges_on, "all grids"))
-{
- schedule CartGrid3D_SetRanges at CCTK_BASEGRID before SpatialCoordinates
- {
- LANG:C
- } "Set up ranges for spatial 3D Cartesian coordinates (on all grids)"
-}
-else if (CCTK_EQUALS (set_coordinate_ranges_on, "all maps"))
-{
- schedule CartGrid3D_SetRanges at CCTK_BASEGRID before SpatialCoordinates
- {
- LANG:C
- OPTIONS: singlemap
- } "Set up ranges for spatial 3D Cartesian coordinates (on all maps)"
-}
-else if (CCTK_EQUALS (set_coordinate_ranges_on, "first level"))
-{
- schedule CartGrid3D_SetRanges at CCTK_BASEGRID before SpatialCoordinates
- {
- LANG:C
- OPTIONS: level
- } "Set up ranges for spatial 3D Cartesian coordinates (on first level)"
-}
-
-schedule CartGrid3D_SetCoordinates as SpatialCoordinates at CCTK_BASEGRID
+schedule CartGrid2D_SetCoordinates as SpatialCoordinates at CCTK_BASEGRID
{
LANG:C
-} "Set up spatial 3D Cartesian coordinates on the GH"
-
-schedule CartGrid3D_SetCoordinates as SpatialCoordinates at CCTK_POSTREGRIDINITIAL
-{
- LANG: C
-} "Set Coordinates after regridding"
+} "Set up spatial 2D Cartesian coordinates on the GH"
-schedule CartGrid3D_SetCoordinates as SpatialCoordinates at CCTK_POSTREGRID
-{
- LANG: C
-} "Set Coordinates after regridding"
-
-schedule CartGrid3D_ApplyBC in BoundaryConditions
-{
- LANG: C
-} "Apply symmetry boundary conditions"
diff --git a/src/Startup.c b/src/Startup.c
index bbb6753..a4a7822 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -16,7 +16,6 @@
#include "util_Table.h"
#include "CoordBase.h"
-#include "Symmetry.h"
/* the rcs ID and its dummy function to use it */
static const char *rcsid = "$Header$";
@@ -26,8 +25,7 @@ CCTK_FILEVERSION(CactusBase_CartGrid3D_Startup_c);
/********************************************************************
******************** External Prototypes **********************
********************************************************************/
-int SymmetryStartup (void);
-void RegisterCartGrid3DCoords (CCTK_ARGUMENTS);
+void RegisterCartGrid2DCoords (CCTK_ARGUMENTS);
/********************************************************************
******************** Internal Prototypes **********************
@@ -37,30 +35,7 @@ static void *SetupGH (tFleshConfig *config, int convlevel, cGH *GH);
/********************************************************************
******************** External Routines ************************
********************************************************************/
- /*@@
- @routine SymmetryStartup
- @date Mon Mar 15 15:49:16 1999
- @author Gerd Lanfermann
- @desc
- Routine registers the GH extension for CartGrid3D
- along with its setup routine.
- @enddesc
- @calls CCTK_RegisterGHExtension
- CCTK_RegisterGHExtensionSetupGH
- @history
- @endhistory
-
- @returntype void
-@@*/
-int SymmetryStartup (void)
-{
- CCTK_RegisterGHExtensionSetupGH (CCTK_RegisterGHExtension ("Symmetry"),
- SetupGH);
- return 0;
-}
-
-
- /*@@
+ /*@@
@routine RegisterCartGrid3DCoords
@date
@author Gabrielle Allen
@@ -77,7 +52,7 @@ int SymmetryStartup (void)
0 for success, or negative in case of errors
@endreturndesc
@@*/
-void RegisterCartGrid3DCoords (CCTK_ARGUMENTS)
+void RegisterCartGrid2DCoords (CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
@@ -85,38 +60,13 @@ void RegisterCartGrid3DCoords (CCTK_ARGUMENTS)
int ierr, coord_system_handle;
/* Register coordinate systems */
- ierr = Coord_SystemRegister(cctkGH, 3, "cart3d");
- ierr += Coord_SystemRegister(cctkGH, 2, "cart2d");
- ierr += Coord_SystemRegister(cctkGH, 1, "cart1d");
+ ierr = Coord_SystemRegister(cctkGH, 2, "cart2d");
if (ierr < 0)
{
CCTK_WARN(0, "Error registering cartnd coordinate systems");
}
else
{
-
- /* Register coordinates for cart3d */
- coord_system_handle = Coord_SystemHandle(cctkGH, "cart3d");
- if (coord_system_handle<0)
- {
- CCTK_VWarn(0,__LINE__,__FILE__,CCTK_THORNSTRING,
- "Error obtaining system handle for cart3d");
- }
- ierr = Coord_CoordRegister(cctkGH, coord_system_handle, 1, "x");
- ierr += Coord_CoordRegister(cctkGH, coord_system_handle, 2, "y");
- ierr += Coord_CoordRegister(cctkGH, coord_system_handle, 3, "z");
- if (ierr < 0)
- {
- CCTK_WARN(0, "Error registering cart3d coordinates");
- }
-
- /* Fill out rest of coordinate system table for cart3d */
- ierr = Util_TableSetString(coord_system_handle, "uniform", "TYPE");
- if (ierr < 0)
- {
- CCTK_WARN(1, "Error registering cart3d type");
- }
-
/* Register coordinates for cart2d */
coord_system_handle = Coord_SystemHandle(cctkGH, "cart2d");
if (coord_system_handle<0)
@@ -138,32 +88,10 @@ void RegisterCartGrid3DCoords (CCTK_ARGUMENTS)
CCTK_WARN(1, "Error registering cart2d type");
}
- /* Register coordinate for cart1d */
- coord_system_handle = Coord_SystemHandle(cctkGH, "cart1d");
- if (coord_system_handle<0)
- {
- CCTK_VWarn(0,__LINE__,__FILE__,CCTK_THORNSTRING,
- "Error obtaining system handle for cart1d");
- }
- ierr = Coord_CoordRegister(cctkGH, coord_system_handle, 1, "x");
- if (ierr < 0)
- {
- CCTK_WARN(0, "Error registering cart1d coordinate");
- }
-
- /* Fill out rest of coordinate system table for cart1d */
- ierr = Util_TableSetString(coord_system_handle, "uniform", "TYPE");
- if (ierr < 0)
- {
- CCTK_WARN(1, "Error registering cart1d type");
- }
-
/* Register cartnd as the default coordinate systems */
- if (register_default_coordinate_systems)
+// if (register_default_coordinate_systems)
{
- ierr = Coord_SetDefaultSystem(cctkGH, "cart3d");
- ierr += Coord_SetDefaultSystem(cctkGH, "cart2d");
- ierr += Coord_SetDefaultSystem(cctkGH, "cart1d");
+ ierr = Coord_SetDefaultSystem(cctkGH, "cart2d");
if (ierr < 0)
{
CCTK_WARN(1, "Error registering cartnd as default coordinate systems");
@@ -172,63 +100,14 @@ void RegisterCartGrid3DCoords (CCTK_ARGUMENTS)
}
/* Register coordinates under the old API */
- CCTK_CoordRegisterSystem(3,"cart3d");
- CCTK_CoordRegisterSystem(3,"spher3d");
+ CCTK_CoordRegisterSystem(2,"cart2d");
- if (CCTK_CoordRegisterData (1, "grid::x", "x", "cart3d") < 0)
+ if (CCTK_CoordRegisterData (1, "grid::x", "x", "cart2d") < 0)
{
CCTK_WARN (1, "Problem with registering coordinate x");
}
- if (CCTK_CoordRegisterData (2, "grid::y", "y", "cart3d") < 0)
+ if (CCTK_CoordRegisterData (2, "grid::y", "y", "cart2d") < 0)
{
CCTK_WARN (1, "Problem with registering coordinate y");
}
- if (CCTK_CoordRegisterData (3, "grid::z", "z", "cart3d") < 0)
- {
- CCTK_WARN (1, "Problem with registering coordinate z");
- }
- if (CCTK_CoordRegisterData (1, "grid::r", "r", "spher3d") < 0)
- {
- CCTK_WARN (1, "Problem with registering coordinate r");
- }
-}
-
-
-/********************************************************************
- ******************** Internal Routines ************************
- ********************************************************************/
-static void *SetupGH (tFleshConfig *config, int convlevel, cGH *GH)
-{
- int i, j, maxdim, numvars;
- SymmetryGHex *myGH;
-
-
- /* avoid compiler warnings about unused arguments */
- (void) (config + 0);
- (void) (convlevel + 0);
- (void) (GH + 0);
-
- maxdim = CCTK_MaxDim ();
- numvars = CCTK_NumVars ();
-
- /* allocate the GH extension */
- myGH = (SymmetryGHex *) malloc (sizeof (SymmetryGHex));
- if (myGH)
- {
- /* allocation for the number of grid functions */
- myGH->GFSym = (int **) malloc (numvars * sizeof (int *));
-
- /* allocation for the number of dimensions*/
- for (i = 0; i < numvars; i++)
- {
- myGH->GFSym[i] = (int *) malloc (2 * maxdim * sizeof (int));
-
- for (j = 0; j < 2 * maxdim; j++)
- {
- myGH->GFSym[i][j] = GFSYM_UNSET; /* not set */
- }
- }
- }
-
- return (myGH);
}
diff --git a/src/make.code.defn b/src/make.code.defn
index 5b09076..b2488f5 100644
--- a/src/make.code.defn
+++ b/src/make.code.defn
@@ -2,5 +2,4 @@
# $Header$
# Source files in this directory
-SRCS = Startup.c ParamCheck.c DecodeSymParameters.c CartGrid3D.c \
- GetSymmetry.c SetSymmetry.c Symmetry.c RegisterSymmetries.c
+SRCS = Startup.c CartGrid2D.c