aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetRegrid2
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-03-11 18:44:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-03-11 18:44:00 +0000
commit8ef38f453db8a179985ee32d18bff6d3f36a09c2 (patch)
treee4a36d6d5501a8c17c2991f1702e1fd22ee8e2d4 /Carpet/CarpetRegrid2
parent2796ac884b1c14da28c329c69d5bac5cdda9348d (diff)
CarpetRegrid2: Allow up to 10 refined regions
darcs-hash:20070311184448-dae7b-67389684b8c83c29f7984b52d006d82741c385bd.gz
Diffstat (limited to 'Carpet/CarpetRegrid2')
-rw-r--r--Carpet/CarpetRegrid2/interface.ccl6
-rw-r--r--Carpet/CarpetRegrid2/param.ccl233
-rw-r--r--Carpet/CarpetRegrid2/src/initialise.cc70
-rw-r--r--Carpet/CarpetRegrid2/src/paramcheck.cc9
4 files changed, 313 insertions, 5 deletions
diff --git a/Carpet/CarpetRegrid2/interface.ccl b/Carpet/CarpetRegrid2/interface.ccl
index 206c7c7bc..186ea206e 100644
--- a/Carpet/CarpetRegrid2/interface.ccl
+++ b/Carpet/CarpetRegrid2/interface.ccl
@@ -78,17 +78,17 @@ CCTK_INT last_map "Last map at which there was a regridding at last_iteration"
PUBLIC:
-CCTK_INT num_levels[3] TYPE=scalar
+CCTK_INT num_levels[10] TYPE=scalar
{
num_levels
} "Number of refinement levels"
-CCTK_REAL positions[3] TYPE=scalar
+CCTK_REAL positions[10] TYPE=scalar
{
position_x position_y position_z
} "Positions of refined regions"
-CCTK_REAL radii[3] TYPE=array DIM=1 SIZE=30 DISTRIB=constant
+CCTK_REAL radii[10] TYPE=array DIM=1 SIZE=30 DISTRIB=constant
{
radius
} "Radii of refined regions for each level"
diff --git a/Carpet/CarpetRegrid2/param.ccl b/Carpet/CarpetRegrid2/param.ccl
index dbcdee93b..b4b088405 100644
--- a/Carpet/CarpetRegrid2/param.ccl
+++ b/Carpet/CarpetRegrid2/param.ccl
@@ -45,7 +45,7 @@ BOOLEAN symmetry_rotating180 "Ensure a 180 degree rotating symmetry about the z
CCTK_INT num_centres "Number of refinement centres" STEERABLE=always
{
- 0:3 :: ""
+ 0:10 :: ""
} 0
@@ -146,3 +146,234 @@ CCTK_REAL radius_3[30] "Radius of refined region for this level of this centre"
{
0:* :: ""
} 1.0
+
+
+
+################################################################################
+
+CCTK_INT num_levels_4 "Number of refinement levels for this centre" STEERABLE=always
+{
+ 0:30 :: ""
+} 0
+
+
+
+CCTK_REAL position_x_4 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_y_4 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_z_4 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+
+
+CCTK_REAL radius_4[30] "Radius of refined region for this level of this centre" STEERABLE=always
+{
+ 0:* :: ""
+} 1.0
+
+
+
+################################################################################
+
+CCTK_INT num_levels_5 "Number of refinement levels for this centre" STEERABLE=always
+{
+ 0:30 :: ""
+} 0
+
+
+
+CCTK_REAL position_x_5 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_y_5 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_z_5 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+
+
+CCTK_REAL radius_5[30] "Radius of refined region for this level of this centre" STEERABLE=always
+{
+ 0:* :: ""
+} 1.0
+
+
+
+################################################################################
+
+CCTK_INT num_levels_6 "Number of refinement levels for this centre" STEERABLE=always
+{
+ 0:30 :: ""
+} 0
+
+
+
+CCTK_REAL position_x_6 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_y_6 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_z_6 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+
+
+CCTK_REAL radius_6[30] "Radius of refined region for this level of this centre" STEERABLE=always
+{
+ 0:* :: ""
+} 1.0
+
+
+
+################################################################################
+
+CCTK_INT num_levels_7 "Number of refinement levels for this centre" STEERABLE=always
+{
+ 0:30 :: ""
+} 0
+
+
+
+CCTK_REAL position_x_7 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_y_7 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_z_7 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+
+
+CCTK_REAL radius_7[30] "Radius of refined region for this level of this centre" STEERABLE=always
+{
+ 0:* :: ""
+} 1.0
+
+
+
+################################################################################
+
+CCTK_INT num_levels_8 "Number of refinement levels for this centre" STEERABLE=always
+{
+ 0:30 :: ""
+} 0
+
+
+
+CCTK_REAL position_x_8 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_y_8 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_z_8 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+
+
+CCTK_REAL radius_8[30] "Radius of refined region for this level of this centre" STEERABLE=always
+{
+ 0:* :: ""
+} 1.0
+
+
+
+################################################################################
+
+CCTK_INT num_levels_9 "Number of refinement levels for this centre" STEERABLE=always
+{
+ 0:30 :: ""
+} 0
+
+
+
+CCTK_REAL position_x_9 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_y_9 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_z_9 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+
+
+CCTK_REAL radius_9[30] "Radius of refined region for this level of this centre" STEERABLE=always
+{
+ 0:* :: ""
+} 1.0
+
+
+
+################################################################################
+
+CCTK_INT num_levels_10 "Number of refinement levels for this centre" STEERABLE=always
+{
+ 0:30 :: ""
+} 0
+
+
+
+CCTK_REAL position_x_10 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_y_10 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+CCTK_REAL position_z_10 "Position of this centre" STEERABLE=always
+{
+ *:* :: ""
+} 0.0
+
+
+
+CCTK_REAL radius_10[30] "Radius of refined region for this level of this centre" STEERABLE=always
+{
+ 0:* :: ""
+} 1.0
diff --git a/Carpet/CarpetRegrid2/src/initialise.cc b/Carpet/CarpetRegrid2/src/initialise.cc
index 16a24e136..3904a1d71 100644
--- a/Carpet/CarpetRegrid2/src/initialise.cc
+++ b/Carpet/CarpetRegrid2/src/initialise.cc
@@ -64,6 +64,76 @@ namespace CarpetRegrid2 {
radius[index2 (lsh, rl, 2)] = radius_3[rl];
}
}
+
+ if (num_centres >= 4) {
+ num_levels[3] = num_levels_4;
+ position_x[3] = position_x_4;
+ position_y[3] = position_y_4;
+ position_z[3] = position_z_4;
+ for (int rl = 0; rl < num_levels[3]; ++ rl) {
+ radius[index2 (lsh, rl, 3)] = radius_4[rl];
+ }
+ }
+
+ if (num_centres >= 5) {
+ num_levels[4] = num_levels_5;
+ position_x[4] = position_x_5;
+ position_y[4] = position_y_5;
+ position_z[4] = position_z_5;
+ for (int rl = 0; rl < num_levels[4]; ++ rl) {
+ radius[index2 (lsh, rl, 4)] = radius_5[rl];
+ }
+ }
+
+ if (num_centres >= 6) {
+ num_levels[5] = num_levels_6;
+ position_x[5] = position_x_6;
+ position_y[5] = position_y_6;
+ position_z[5] = position_z_6;
+ for (int rl = 0; rl < num_levels[5]; ++ rl) {
+ radius[index2 (lsh, rl, 5)] = radius_6[rl];
+ }
+ }
+
+ if (num_centres >= 7) {
+ num_levels[6] = num_levels_7;
+ position_x[6] = position_x_7;
+ position_y[6] = position_y_7;
+ position_z[6] = position_z_7;
+ for (int rl = 0; rl < num_levels[6]; ++ rl) {
+ radius[index2 (lsh, rl, 6)] = radius_7[rl];
+ }
+ }
+
+ if (num_centres >= 8) {
+ num_levels[7] = num_levels_8;
+ position_x[7] = position_x_8;
+ position_y[7] = position_y_8;
+ position_z[7] = position_z_8;
+ for (int rl = 0; rl < num_levels[7]; ++ rl) {
+ radius[index2 (lsh, rl, 7)] = radius_8[rl];
+ }
+ }
+
+ if (num_centres >= 9) {
+ num_levels[8] = num_levels_9;
+ position_x[8] = position_x_9;
+ position_y[8] = position_y_9;
+ position_z[8] = position_z_9;
+ for (int rl = 0; rl < num_levels[8]; ++ rl) {
+ radius[index2 (lsh, rl, 8)] = radius_9[rl];
+ }
+ }
+
+ if (num_centres >= 10) {
+ num_levels[9] = num_levels_10;
+ position_x[9] = position_x_10;
+ position_y[9] = position_y_10;
+ position_z[9] = position_z_10;
+ for (int rl = 0; rl < num_levels[9]; ++ rl) {
+ radius[index2 (lsh, rl, 9)] = radius_10[rl];
+ }
+ }
}
} // namespace CarpetRegrid2
diff --git a/Carpet/CarpetRegrid2/src/paramcheck.cc b/Carpet/CarpetRegrid2/src/paramcheck.cc
index fb0c76891..fcc845016 100644
--- a/Carpet/CarpetRegrid2/src/paramcheck.cc
+++ b/Carpet/CarpetRegrid2/src/paramcheck.cc
@@ -27,7 +27,14 @@ namespace CarpetRegrid2 {
if (num_centres >= 1 and num_levels_1 > maxreflevels or
num_centres >= 2 and num_levels_2 > maxreflevels or
- num_centres >= 3 and num_levels_3 > maxreflevels)
+ num_centres >= 3 and num_levels_3 > maxreflevels or
+ num_centres >= 4 and num_levels_4 > maxreflevels or
+ num_centres >= 5 and num_levels_5 > maxreflevels or
+ num_centres >= 6 and num_levels_6 > maxreflevels or
+ num_centres >= 7 and num_levels_7 > maxreflevels or
+ num_centres >= 8 and num_levels_8 > maxreflevels or
+ num_centres >= 9 and num_levels_9 > maxreflevels or
+ num_centres >= 10 and num_levels_10 > maxreflevels)
{
CCTK_PARAMWARN ("The number of requested refinement levels is larger than the maximum number of levels specified by Carpet::max_refinement_levels");
}