diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-03-28 19:50:37 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-03-28 19:50:37 +0000 |
commit | 71cdab7a51dd3fdf93ebf5bbccf4c08148849490 (patch) | |
tree | 0fe8581923422f02ae63c4b24c79bca401783121 /src/patch | |
parent | dd50f4ad98a917bac02011d66e3be26a3ea7c699 (diff) |
change to static arrays of struct patch_info objects
which can be read by generic constructor code
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@390 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch')
-rw-r--r-- | src/patch/patch_system_info.hh | 131 |
1 files changed, 53 insertions, 78 deletions
diff --git a/src/patch/patch_system_info.hh b/src/patch/patch_system_info.hh index e80e0a2..e41055e 100644 --- a/src/patch/patch_system_info.hh +++ b/src/patch/patch_system_info.hh @@ -6,90 +6,69 @@ namespace patch_system_info { // -// 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.) -// - - -// -// Note that 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; +static const struct patch_info full_sphere_info[] + = { +// +z patch (90 x 90 degrees): dmu [ -45, 45], dnu [ -45, 45] + { "+z", -45.0, 45.0, -45.0, 45.0}, -// +z patch: (90 x 90 degrees) dmu [ -45, 45], dnu [ -45, 45] -static const struct patch_size plus_z = {0, -45.0, 45.0, -45.0, 45.0}; +// +x patch (90 x 90 degrees): dnu [ 45, 135], dphi [ -45, 45] + {"+x", 45.0, 135.0, -45.0, 45.0}, -// +x patch: (90 x 90 degrees) dnu [ 45, 135], dphi [ -45, 45] -static const struct patch_size plus_x = {1, 45.0, 135.0, -45.0, 45.0}; +// +y patch (90 x 90 degrees): dmu [ 45, 135], dphi [ 45, 135] + {"+y", 45.0, 135.0, 45.0, 135.0}, -// +y patch: (90 x 90 degrees) dmu [ 45, 135], dphi [ 45, 135] -static const struct patch_size plus_y = {2, 45.0, 135.0, 45.0, 135.0}; +// -x patch (90 x 90 degrees): dnu [-135, -45], dphi [ 135, 225] + {"-x", -135.0, -45.0, 135.0, 225.0}, -// -x patch: (90 x 90 degrees) dnu [-135, -45], dphi [ 135, 225] -static const struct patch_size minus_x = {3, -135.0, -45.0, 135.0, 225.0}; +// -y patch (90 x 90 degrees): dmu [-135, -45], dphi [-135, -45] + {"-y", -135.0, -45.0, -135.0, -45.0}, -// -y patch: (90 x 90 degrees) dmu [-135, -45], dphi [-135, -45] -static const struct patch_size 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_size minus_z = {5, 135.0, 225.0, 135.0, 225.0}; +// -z patch (90 x 90 degrees): dmu [ 135, 225], dnu [ 135, 225] + {"-z", 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; +static const struct patch_info plus_z_hemisphere_info[] + = { +// +z patch (90 x 90 degrees): dmu [ -45, 45], dnu [ -45, 45] + {"+z", -45.0, 45.0, -45.0, 45.0}, -// +z patch: (90 x 90 degrees) dmu [ -45, 45], dnu [ -45, 45] -static const struct patch_size plus_z = {0, -45.0, 45.0, -45.0, 45.0}; +// +x patch (45 x 90 degrees): dnu [ 45, 90], dphi [ -45, 45] + {"+x", 45.0, 90.0, -45.0, 45.0}, -// +x patch: (45 x 90 degrees) dnu [ 45, 90], dphi [ -45, 45] -static const struct patch_size plus_x = {1, 45.0, 90.0, -45.0, 45.0}; +// +y patch (45 x 90 degrees): dmu [ 45, 90], dphi [ 45, 135] + {"+y", 45.0, 90.0, 45.0, 135.0}, -// +y patch: (45 x 90 degrees) dmu [ 45, 90], dphi [ 45, 135] -static const struct patch_size plus_y = {2, 45.0, 90.0, 45.0, 135.0}; +// -x patch (45 x 90 degrees): dnu [ -90, -45], dphi [ 135, 225] + {"-x", -90.0, -45.0, 135.0, 225.0}, -// -x patch: (45 x 90 degrees) dnu [ -90, -45], dphi [ 135, 225] -static const struct patch_size 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_size minus_y = {4, -90.0, -45.0, -135.0, -45.0}; +// -y patch (45 x 90 degrees): dmu [ -90, -45], dphi [-135, -45] + {"-y", -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; +static const struct patch_info plus_xy_quadrant_info[] + = { +// +z patch (45 x 45 degrees): dmu [ 0, 45], dnu [ 0, 45] + {"+z", 0.0, 45.0, 0.0, 45.0}, -// +z patch: (45 x 45 degrees) dmu [ 0, 45], dnu [ 0, 45] -static const struct patch_size plus_z = {0, 0.0, 45.0, 0.0, 45.0}; +// +x patch (90 x 45 degrees): dnu [ 45, 135], dphi [ 0, 45] + {"+x", 45.0, 135.0, 0.0, 45.0}, -// +x patch: (90 x 45 degrees) dnu [ 45, 135], dphi [ 0, 45] -static const struct patch_size plus_x = {1, 45.0, 135.0, 0.0, 45.0}; +// +y patch (90 x 45 degrees): dmu [ 45, 135], dphi [ 45, 90] + {"+y", 45.0, 135.0, 45.0, 90.0}, -// +y patch: (90 x 45 degrees) dmu [ 45, 135], dphi [ 45, 90] -static const struct patch_size 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_size minus_z = {3, 135.0, 180.0, 135.0, 180.0}; +// -z patch (45 x 45 degrees): dmu [ 135, 180], dnu [ 135, 180] + {"-z", 135.0, 180.0, 135.0, 180.0}, }; // @@ -97,21 +76,19 @@ static const struct patch_size minus_z = {3, 135.0, 180.0, 135.0, 180.0}; // ... 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_size plus_z = {0, -45.0, 45.0, 0.0, 45.0}; +static const struct patch_info plus_xz_quadrant_info[] + = { +// +z patch (90 x 45 degrees): dmu [ -45, 45], dnu [ 0, 45] + {"+z", -45.0, 45.0, 0.0, 45.0}, -// +x patch: (45 x 90 degrees) dnu [ 45, 90], dphi [ -45, 45] -static const struct patch_size plus_x = {1, 45.0, 90.0, -45.0, 45.0}; +// +x patch (45 x 90 degrees): dnu [ 45, 90], dphi [ -45, 45] + {"+x", 45.0, 90.0, -45.0, 45.0}, -// +y patch: (45 x 45 degrees) dmu [ 45, 90], dphi [ 45, 90] -static const struct patch_size plus_y = {2, 45.0, 90.0, 45.0, 90.0}; +// +y patch (45 x 45 degrees): dmu [ 45, 90], dphi [ 45, 90] + {"+y", 45.0, 90.0, 45.0, 90.0}, -// -y patch: (45 x 45 degrees) dmu [ -90, -45], dphi [ -90, -45] -static const struct patch_size minus_y = {3, -90.0, -45.0, -90.0, -45.0}; +// -y patch (45 x 45 degrees): dmu [ -90, -45], dphi [ -90, -45] + {"-y", -90.0, -45.0, -90.0, -45.0}, }; // @@ -123,14 +100,12 @@ namespace octant_patch_system_info { static const int N_patches = 3; static const struct patch_size all_patch_sizes[] = { -// +z patch: (45 x 45 degrees) dmu [ 0, 45], dnu [ 0, 45] - { 0.0, 45.0, 0.0, 45.0}, -// +x patch: (45 x 45 degrees) dnu [ 45, 90], dphi [ 0, 45] - { 45.0, 90.0, 0.0, 45.0}, -// +y patch: (45 x 45 degrees) dmu [ 45, 90], dphi [ 45, 90] - { 45.0, 90.0, 45.0, 90.0}, - }; +// +z patch (45 x 45 degrees): dmu [ 0, 45], dnu [ 0, 45] + {"+z", 0.0, 45.0, 0.0, 45.0}, +// +x patch (45 x 45 degrees): dnu [ 45, 90], dphi [ 0, 45] + {"+x", 45.0, 90.0, 0.0, 45.0}, +// +y patch (45 x 45 degrees): dmu [ 45, 90], dphi [ 45, 90] + {"+y", 45.0, 90.0, 45.0, 90.0}, }; -// close namespace patch_system_info:: -}; +}; // namespace patch_system_info:: |