aboutsummaryrefslogtreecommitdiff
path: root/src/patch/patch_system.hh
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-09-07 16:29:42 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2001-09-07 16:29:42 +0000
commit79900c888e81f784b46de634bbb28eb0a40acbb2 (patch)
treea7fd726097fb78dcb301c0f9c956d0a95175a355 /src/patch/patch_system.hh
parent723db299e5b01586da799f3790bfce467fdddbc3 (diff)
rename some patch system types and add new +xz quadrant one;
set of all of them is now enum patch_system_type { full_sphere_patch_system, plus_z_hemisphere_patch_system, plus_xy_quadrant_patch_system, plus_xz_quadrant_patch_system, octant_patch_system }; git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@293 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/patch_system.hh')
-rw-r--r--src/patch/patch_system.hh327
1 files changed, 181 insertions, 146 deletions
diff --git a/src/patch/patch_system.hh b/src/patch/patch_system.hh
index b18e803..279a3e4 100644
--- a/src/patch/patch_system.hh
+++ b/src/patch/patch_system.hh
@@ -1,10 +1,10 @@
// patch_system.hh -- describes the (an) entire system of interlinked patches
// $Id$
//
-// patch_system_info - static data on patch numbers/bounds/etc for patch system
-//
// patch_system - describes a system of interlinked patches
//
+// patch_system_info - static data on patch numbers/bounds/etc for patch system
+//
//
// prerequisites:
@@ -29,146 +29,6 @@
//******************************************************************************
//
-// ***** patch numbers, bounds, etc (static data) *****
-//
-namespace patch_system_info
-{
-// largest number of patches for any patch system type
-static const int max_N_patches = 6;
-
-//
-// Alas, we can't assign the same patch numbers to a given patch type
-// in each type of patch system, and still keep each patch system having
-// a contiguous range of patch numbers. (For example, the set of patches
-// for a quadrant patch system isn't a subset of the set of patches for
-// a half patch system.)
-//
-
-//
-// this (POD, and hence static-initializable) struct holds the constructor
-// arguments which in practice vary from patch to patch
-//
-struct patch_info
- {
- int patch_number;
- fp min_drho, max_drho;
- fp min_dsigma, max_dsigma;
-
- // compute and return reference to struct grid_arrays::grid_array_pars
- // from the info in this struct
- // ... result refers to internal static buffer;
- // the usual caveats about lifetimes/overwriting apply
- const grid_arrays::grid_array_pars& grid_array_pars
- (int N_ghost_points, int N_extend_points, fp delta_drho_dsigma)
- const;
-
- // compute and return reference to struct grid::grid_pars
- // from the info in this struct
- // ... result refers to internal static buffer;
- // the usual caveats about lifetimes/overwriting apply
- const grid::grid_pars& grid_pars
- (int N_extend_points, fp delta_drho_dsigma)
- const;
- };
-
-//
-// full-sphere patch system -- covers all 4pi steradians
-//
-namespace full_sphere_patch_system_info
- {
-static const int N_patches = 6;
-
-// +z patch: (90 x 90 degrees) dmu [ -45, 45], dnu [ -45, 45]
-static const struct patch_info plus_z = {0, -45.0, 45.0, -45.0, 45.0};
-
-// +x patch: (90 x 90 degrees) dnu [ 45, 135], dphi [ -45, 45]
-static const struct patch_info plus_x = {1, 45.0, 135.0, -45.0, 45.0};
-
-// +y patch: (90 x 90 degrees) dmu [ 45, 135], dphi [ 45, 135]
-static const struct patch_info plus_y = {2, 45.0, 135.0, 45.0, 135.0};
-
-// -x patch: (90 x 90 degrees) dnu [-135, -45], dphi [ 135, 225]
-static const struct patch_info minus_x = {3, -135.0, -45.0, 135.0, 225.0};
-
-// -y patch: (90 x 90 degrees) dmu [-135, -45], dphi [-135, -45]
-static const struct patch_info minus_y = {4, -135.0, -45.0, -135.0, -45.0};
-
-// -z patch: (90 x 90 degrees) dmu [ 135, 225], dnu [ 135, 225]
-static const struct patch_info minus_z = {5, 135.0, 225.0, 135.0, 225.0};
- };
-
-//
-// hemisphere (half) patch system -- covers +z half of sphere
-// (mirror symmetry across z=0 plane)
-//
-namespace hemisphere_patch_system_info
- {
-static const int N_patches = 5;
-
-// +z patch: (90 x 90 degrees) dmu [ -45, 45], dnu [ -45, 45]
-static const struct patch_info plus_z = {0, -45.0, 45.0, -45.0, 45.0};
-
-// +x patch: (45 x 90 degrees) dnu [ 45, 90], dphi [ -45, 45]
-static const struct patch_info plus_x = {1, 45.0, 90.0, -45.0, 45.0};
-
-// +y patch: (45 x 90 degrees) dmu [ 45, 90], dphi [ 45, 135]
-static const struct patch_info plus_y = {2, 45.0, 90.0, 45.0, 135.0};
-
-// -x patch: (45 x 90 degrees) dnu [ -90, -45], dphi [ 135, 225]
-static const struct patch_info minus_x = {3, -90.0, -45.0, 135.0, 225.0};
-
-// -y patch: (45 x 90 degrees) dmu [ -90, -45], dphi [-135, -45]
-static const struct patch_info minus_y = {4, -90.0, -45.0, -135.0, -45.0};
- };
-
-//
-// quarter-grid (quadrant) patch system -- covers +[xy] quadrant of sphere
-// (90 degree periodic rotation symmetry about z axis)
-//
-namespace quadrant_patch_system_info
- {
-static const int N_patches = 4;
-
-// +z patch: (45 x 45 degrees) dmu [ 0, 45], dnu [ 0, 45]
-static const struct patch_info plus_z = {0, 0.0, 45.0, 0.0, 45.0};
-
-// +x patch: (90 x 45 degrees) dnu [ 45, 135], dphi [ 0, 45]
-static const struct patch_info plus_x = {1, 45.0, 135.0, 0.0, 45.0};
-
-// +y patch: (90 x 45 degrees) dmu [ 45, 135], dphi [ 45, 90]
-static const struct patch_info plus_y = {2, 45.0, 135.0, 45.0, 90.0};
-
-// -z patch: (45 x 45 degrees) dmu [ 135, 180], dnu [ 135, 180]
-static const struct patch_info minus_z = {3, 135.0, 180.0, 135.0, 180.0};
- };
-
-//
-// eighth-grid (octant) patch system -- covers +[xyz] octant of sphere
-// (90 degree periodic rotation symmetry about z axis
-// *and* mirror symmetry across z=0 plane)
-//
-namespace octant_patch_system_info
- {
-static const int N_patches = 3;
-
-// +z patch: (45 x 45 degrees) dmu [ 0, 45], dnu [ 0, 45]
-static const struct patch_info plus_z = {0, 0.0, 45.0, 0.0, 45.0};
-
-// +x patch: (45 x 45 degrees) dnu [ 45, 90], dphi [ 0, 45]
-static const struct patch_info plus_x = {1, 45.0, 90.0, 0.0, 45.0};
-
-// +y patch: (45 x 45 degrees) dmu [ 45, 90], dphi [ 45, 90]
-static const struct patch_info plus_y = {2, 45.0, 90.0, 45.0, 90.0};
- };
-
-// close namespace patch_system_info::
-};
-
-//******************************************************************************
-//******************************************************************************
-//******************************************************************************
-
-//
// a patch_system object describes a system of interlinked patches.
//
@@ -182,8 +42,9 @@ public:
// what patch-system type are supported?
enum patch_system_type {
full_sphere_patch_system,
- hemisphere_patch_system,
- quadrant_patch_system,
+ plus_z_hemisphere_patch_system,
+ plus_xy_quadrant_patch_system,
+ plus_xz_quadrant_patch_system,
octant_patch_system
};
@@ -298,12 +159,17 @@ private:
int N_overlap_points, fp delta_drho_dsigma,
int min_gfn_in, int max_gfn_in,
int interpolator_order);
- void setup_hemisphere_patch_system
+ void setup_plus_z_hemisphere_patch_system
(int N_ghost_points, int N_extend_points,
int N_overlap_points, fp delta_drho_dsigma,
int min_gfn_in, int max_gfn_in,
int interpolator_order);
- void setup_quadrant_patch_system
+ void setup_plus_xy_quadrant_patch_system
+ (int N_ghost_points, int N_extend_points,
+ int N_overlap_points, fp delta_drho_dsigma,
+ int min_gfn_in, int max_gfn_in,
+ int interpolator_order);
+ void setup_plus_xz_quadrant_patch_system
(int N_ghost_points, int N_extend_points,
int N_overlap_points, fp delta_drho_dsigma,
int min_gfn_in, int max_gfn_in,
@@ -355,3 +221,172 @@ private:
// --> array(pn) of pointers to individual patches
array1d<patch *> *all_patches_;
};
+
+//******************************************************************************
+//******************************************************************************
+//******************************************************************************
+
+//
+// ***** patch numbers, bounds, etc (static data) *****
+//
+namespace patch_system_info
+{
+// largest number of patches for any patch system type
+static const int max_N_patches = 6;
+
+//
+// Alas, we can't assign the same patch numbers to a given patch type
+// in each type of patch system, and still keep each patch system having
+// a contiguous range of patch numbers. (For example, the set of patches
+// for a quadrant patch system isn't a subset of the set of patches for
+// a half patch system.)
+//
+
+//
+// this (POD, and hence static-initializable) struct holds the constructor
+// arguments which in practice vary from patch to patch
+//
+struct patch_info
+ {
+ int patch_number;
+ fp min_drho, max_drho;
+ fp min_dsigma, max_dsigma;
+
+ // compute and return reference to struct grid_arrays::grid_array_pars
+ // from the info in this struct
+ // ... result refers to internal static buffer;
+ // the usual caveats about lifetimes/overwriting apply
+ const grid_arrays::grid_array_pars& grid_array_pars
+ (int N_ghost_points, int N_extend_points, fp delta_drho_dsigma)
+ const;
+
+ // compute and return reference to struct grid::grid_pars
+ // from the info in this struct
+ // ... result refers to internal static buffer;
+ // the usual caveats about lifetimes/overwriting apply
+ const grid::grid_pars& grid_pars
+ (int N_extend_points, fp delta_drho_dsigma)
+ const;
+ };
+
+//
+// N.b. At present we only implement a few of the possible types
+// of patch systems; it's easy to add additional types as needed
+// (search for enum patch_system_type ).
+//
+
+//
+// full-sphere patch system
+// ... covers all 4pi steradians
+//
+namespace full_sphere_patch_system_info
+ {
+static const int N_patches = 6;
+
+// +z patch: (90 x 90 degrees) dmu [ -45, 45], dnu [ -45, 45]
+static const struct patch_info plus_z = {0, -45.0, 45.0, -45.0, 45.0};
+
+// +x patch: (90 x 90 degrees) dnu [ 45, 135], dphi [ -45, 45]
+static const struct patch_info plus_x = {1, 45.0, 135.0, -45.0, 45.0};
+
+// +y patch: (90 x 90 degrees) dmu [ 45, 135], dphi [ 45, 135]
+static const struct patch_info plus_y = {2, 45.0, 135.0, 45.0, 135.0};
+
+// -x patch: (90 x 90 degrees) dnu [-135, -45], dphi [ 135, 225]
+static const struct patch_info minus_x = {3, -135.0, -45.0, 135.0, 225.0};
+
+// -y patch: (90 x 90 degrees) dmu [-135, -45], dphi [-135, -45]
+static const struct patch_info minus_y = {4, -135.0, -45.0, -135.0, -45.0};
+
+// -z patch: (90 x 90 degrees) dmu [ 135, 225], dnu [ 135, 225]
+static const struct patch_info minus_z = {5, 135.0, 225.0, 135.0, 225.0};
+ };
+
+//
+// +z hemisphere (half) patch system
+// ... mirror symmetry across z=0 plane
+//
+namespace plus_z_hemisphere_patch_system_info
+ {
+static const int N_patches = 5;
+
+// +z patch: (90 x 90 degrees) dmu [ -45, 45], dnu [ -45, 45]
+static const struct patch_info plus_z = {0, -45.0, 45.0, -45.0, 45.0};
+
+// +x patch: (45 x 90 degrees) dnu [ 45, 90], dphi [ -45, 45]
+static const struct patch_info plus_x = {1, 45.0, 90.0, -45.0, 45.0};
+
+// +y patch: (45 x 90 degrees) dmu [ 45, 90], dphi [ 45, 135]
+static const struct patch_info plus_y = {2, 45.0, 90.0, 45.0, 135.0};
+
+// -x patch: (45 x 90 degrees) dnu [ -90, -45], dphi [ 135, 225]
+static const struct patch_info minus_x = {3, -90.0, -45.0, 135.0, 225.0};
+
+// -y patch: (45 x 90 degrees) dmu [ -90, -45], dphi [-135, -45]
+static const struct patch_info minus_y = {4, -90.0, -45.0, -135.0, -45.0};
+ };
+
+//
+// +[xy] "vertical" quarter-grid (quadrant) patch system
+// ... 90 degree periodic rotation symmetry about z axis
+//
+namespace plus_xy_quadrant_patch_system_info
+ {
+static const int N_patches = 4;
+
+// +z patch: (45 x 45 degrees) dmu [ 0, 45], dnu [ 0, 45]
+static const struct patch_info plus_z = {0, 0.0, 45.0, 0.0, 45.0};
+
+// +x patch: (90 x 45 degrees) dnu [ 45, 135], dphi [ 0, 45]
+static const struct patch_info plus_x = {1, 45.0, 135.0, 0.0, 45.0};
+
+// +y patch: (90 x 45 degrees) dmu [ 45, 135], dphi [ 45, 90]
+static const struct patch_info plus_y = {2, 45.0, 135.0, 45.0, 90.0};
+
+// -z patch: (45 x 45 degrees) dmu [ 135, 180], dnu [ 135, 180]
+static const struct patch_info minus_z = {3, 135.0, 180.0, 135.0, 180.0};
+ };
+
+//
+// +[xz] "horizontal" quarter-grid (quadrant) patch system
+// ... mirror symmetry across z=0 plane,
+// 180 degree periodic rotation symmetry about z axis
+//
+namespace plus_xz_quadrant_patch_system_info
+ {
+static const int N_patches = 4;
+
+// +z patch: (90 x 45 degrees) dmu [ -45, 45], dnu [ 0, 45]
+static const struct patch_info plus_z = {0, -45.0, 45.0, 0.0, 45.0};
+
+// +x patch: (45 x 90 degrees) dnu [ 45, 90], dphi [ -45, 45]
+static const struct patch_info plus_x = {1, 45.0, 90.0, -45.0, 45.0};
+
+// +y patch: (45 x 45 degrees) dmu [ 45, 90], dphi [ 45, 90]
+static const struct patch_info plus_y = {2, 45.0, 90.0, 45.0, 90.0};
+
+// -y patch: (45 x 45 degrees) dmu [ -90, -45], dphi [ -90, -45]
+static const struct patch_info minus_y = {3, -90.0, -45.0, -90.0, -45.0};
+ };
+
+//
+// +[xyz] (octant) patch system
+// ... mirror symmetry across z=0 plane,
+// 90 degree periodic rotation symmetry about z axis
+//
+namespace octant_patch_system_info
+ {
+static const int N_patches = 3;
+
+// +z patch: (45 x 45 degrees) dmu [ 0, 45], dnu [ 0, 45]
+static const struct patch_info plus_z = {0, 0.0, 45.0, 0.0, 45.0};
+
+// +x patch: (45 x 45 degrees) dnu [ 45, 90], dphi [ 0, 45]
+static const struct patch_info plus_x = {1, 45.0, 90.0, 0.0, 45.0};
+
+// +y patch: (45 x 45 degrees) dmu [ 45, 90], dphi [ 45, 90]
+static const struct patch_info plus_y = {2, 45.0, 90.0, 45.0, 90.0};
+ };
+
+// close namespace patch_system_info::
+};