[Commits] [svn:einsteintoolkit] incoming/Symmetry/ParitySymmetry/src/ (Rev. 102)
yosef at astro.rit.edu
yosef at astro.rit.edu
Tue Nov 12 14:08:47 CST 2013
User: zlochower
Date: 2013/11/12 02:08 PM
Modified:
/Symmetry/ParitySymmetry/src/
interpolate.c, paritysymmetry.c
Log:
fix missing ash specification and resync with RotatingSymmetry180
File Changes:
Directory: /Symmetry/ParitySymmetry/src/
========================================
File [modified]: interpolate.c
Delta lines: +2 -3
===================================================================
--- Symmetry/ParitySymmetry/src/interpolate.c 2013-10-24 23:24:22 UTC (rev 101)
+++ Symmetry/ParitySymmetry/src/interpolate.c 2013-11-12 20:08:47 UTC (rev 102)
@@ -128,7 +128,7 @@
/* Symmetry interpolation */
CCTK_INT
-ParitySym_SymmetryInterpolate (CCTK_POINTER_TO_CONST const cctkGH_,
+ParitySym_SymmetryInterpolate (CCTK_POINTER_TO_CONST const cctkGH,
CCTK_INT const N_dims,
CCTK_INT const local_interp_handle,
CCTK_INT const param_table_handle,
@@ -143,7 +143,6 @@
CCTK_POINTER const output_arrays[],
CCTK_INT const faces)
{
- cGH const * restrict const cctkGH = cctkGH_;
CCTK_POINTER new_interp_coords[3];
CCTK_INT new_faces;
CCTK_INT * restrict operand_indices;
@@ -201,7 +200,7 @@
/* Recursive call */
iret = SymmetryInterpolateFaces
- (cctkGH_, N_dims,
+ (cctkGH, N_dims,
local_interp_handle, param_table_handle, coord_system_handle,
N_interp_points, interp_coords_type, new_interp_coords,
N_input_arrays, input_array_indices,
File [modified]: paritysymmetry.c
Delta lines: +22 -23
===================================================================
--- Symmetry/ParitySymmetry/src/paritysymmetry.c 2013-10-24 23:24:22 UTC (rev 101)
+++ Symmetry/ParitySymmetry/src/paritysymmetry.c 2013-11-12 20:08:47 UTC (rev 102)
@@ -153,10 +153,9 @@
} else if (ierr<0) {
char * groupname = CCTK_GroupName(gis[var]);
assert (groupname);
- CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VError(__LINE__, __FILE__, CCTK_THORNSTRING,
"Error in tensor type alias declaration for group \"%s\"",
groupname);
- free (groupname);
}
if (CCTK_EQUALS (tensortypealias, "scalar")) {
@@ -188,7 +187,7 @@
case 3: break;
case 4: paritiess[var][1] = paritiess[var][2] = -1; break;
case 5: break;
- default: assert(0);
+ default: CCTK_BUILTIN_UNREACHABLE();
}
} else if (CCTK_EQUALS (tensortypealias, "uu")
|| CCTK_EQUALS (tensortypealias, "ud")
@@ -210,7 +209,7 @@
case 3: break;
case 4: paritiess[var][1] = paritiess[var][2] = -1; break;
case 5: break;
- default: assert(0);
+ default: CCTK_BUILTIN_UNREACHABLE();
}
paritiess[var][index/6] *= -1;
} else if (CCTK_EQUALS (tensortypealias, "4uu_sym")
@@ -230,7 +229,7 @@
case 3: break;
case 4: paritiess[var][1] = paritiess[var][2] = -1; break;
case 5: break;
- default: assert(0);
+ default: CCTK_BUILTIN_UNREACHABLE();
}
}
} else if (CCTK_EQUALS (tensortypealias, "weylscalars_real")) {
@@ -256,10 +255,9 @@
} else {
char * groupname = CCTK_GroupName(gis[var]);
assert (groupname);
- CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VError(__LINE__, __FILE__, CCTK_THORNSTRING,
"Illegal tensor type alias for group \"%s\"",
groupname);
- free (groupname);
}
assert (abs(paritiess[var][0])==1 && abs(paritiess[var][1])==1
@@ -317,7 +315,7 @@
} else if (fabs(dorigin[d] - 0.5) < 1.0e-6) {
avoid_origin[d] = 1;
} else {
- CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VError(__LINE__, __FILE__, CCTK_THORNSTRING,
"The coordinate origin in the %c-direction falls neither onto a grid point nor into the middle between two grid points.",
"xyz"[d]);
}
@@ -337,16 +335,16 @@
for (i=0; i < 2; i++)
{
if (2*iorigin[otherdirs[i]] + offset[otherdirs[i]] != cctk_gsh[otherdirs[i]]) {
- CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VError (__LINE__, __FILE__, CCTK_THORNSTRING,
"The coordinate origin in the %c-direction is not in the centre of the domain. The boundary condition cannot be applied.",
"xyz"[otherdirs[i]]);
}
}
-
+
if (iorigin[dir] != data.nghostzones[dir]) {
assert (nvars > 0);
var = 0;
- CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VError(__LINE__, __FILE__, CCTK_THORNSTRING,
"The group \"%s\" has in the %c-direction %d symmetry points (grid points outside of the symmetry boundary). "
"This is not equal to the number of ghost zones, which is %d. "
"The number of symmetry points must be equal to the number of ghost zones.",
@@ -357,7 +355,7 @@
if (data.gsh[dir] < 2*data.nghostzones[dir] + offset[dir]) {
assert (nvars > 0);
var = 0;
- CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING,
+ CCTK_VError(__LINE__, __FILE__, CCTK_THORNSTRING,
"The group \"%s\" has in the %c-direction only %d grid points. "
"This is not large enough for a 180 degree rotating symmetry boundary that is %d grid points wide. "
"The group needs to have at least %d grid points in that direction.",
@@ -401,7 +399,7 @@
/* do nothing */
break;
default:
- assert (0);
+ CCTK_BUILTIN_UNREACHABLE();
} /* switch grouptype */
} /* if bbox */
} /* if poison_boundaries */
@@ -415,6 +413,7 @@
xferinfo[d].src.gsh = data.gsh [d];
xferinfo[d].src.lbnd = data.lbnd [d];
xferinfo[d].src.lsh = data.lsh [d];
+ xferinfo[d].src.ash = data.ash [d];
xferinfo[d].src.lbbox = fake_bbox [2*d ];
xferinfo[d].src.ubbox = fake_bbox [2*d+1];
xferinfo[d].src.nghostzones = data.nghostzones[d];
@@ -425,6 +424,7 @@
xferinfo[d].dst.gsh = data.gsh [d];
xferinfo[d].dst.lbnd = data.lbnd [d];
xferinfo[d].dst.lsh = data.lsh [d];
+ xferinfo[d].dst.ash = data.ash [d];
xferinfo[d].dst.lbbox = fake_bbox [2*d ];
xferinfo[d].dst.ubbox = fake_bbox [2*d+1];
xferinfo[d].dst.nghostzones = data.nghostzones[d];
@@ -446,8 +446,7 @@
if (CCTK_IsFunctionAliased("GetLocalComponents")) {
int const num_local_components = GetLocalComponents(cctkGH);
if (num_local_components > 1) {
- CCTK_WARN (CCTK_WARN_ABORT,
- "TAT/Slab can only be used if there is a single local component per MPI process");
+ CCTK_ERROR("TAT/Slab can only be used if there is a single local component per MPI process");
}
}
@@ -543,7 +542,7 @@
assert (!ierr);
} else {
- CCTK_WARN (CCTK_WARN_ABORT, "internal error");
+ CCTK_BUILTIN_UNREACHABLE();
}
if (check_boundaries) {
@@ -603,10 +602,10 @@
printf (" gsh=[%d,%d,%d]\n", cctk_gsh[0], cctk_gsh[1], cctk_gsh[2]);
printf (" bbox=[%d,%d,%d,%d,%d,%d]\n", cctk_bbox[0], cctk_bbox[1], cctk_bbox[2], cctk_bbox[3], cctk_bbox[4], cctk_bbox[5]);
if (poison_found) {
- CCTK_WARN (CCTK_WARN_ABORT, "Poison found in symmetry regions -- there is an error in this thorn");
+ CCTK_ERROR("Poison found in symmetry regions -- there is an error in this thorn");
}
if (nonfinite_found) {
- CCTK_WARN (CCTK_WARN_ALERT, "Non-finite number found in symmetry regions");
+ CCTK_WARN(CCTK_WARN_ALERT, "Non-finite number found in symmetry regions");
}
}
break;
@@ -615,7 +614,7 @@
/* do nothing */
break;
default:
- assert (0);
+ CCTK_BUILTIN_UNREACHABLE();
} /* switch grouptype */
} /* if bbox */
} /* if check_boundaries */
@@ -679,7 +678,7 @@
break;
}
default:
- assert (0);
+ CCTK_BUILTIN_UNREACHABLE();
} /* switch grouptype */
}
} /* for var */
@@ -719,9 +718,9 @@
int ierr;
CCTK_REAL local[6], global[6];
min_handle = CCTK_ReductionArrayHandle ("minimum");
- if (min_handle<0) CCTK_WARN (0, "Could not obtain reduction handle");
+ if (min_handle<0) CCTK_ERROR("Could not obtain reduction handle");
max_handle = CCTK_ReductionArrayHandle ("maximum");
- if (max_handle<0) CCTK_WARN (0, "Could not obtain reduction handle");
+ if (max_handle<0) CCTK_ERROR("Could not obtain reduction handle");
for (d=0; d<6; ++d) local[d] = cctkGH->cctk_bbox[d];
ierr = CCTK_ReduceLocArrayToArray1D
@@ -743,7 +742,7 @@
int ierr;
CCTK_INT local[12], global[12];
max_handle = CCTK_ReductionArrayHandle ("maximum");
- if (max_handle<0) CCTK_WARN (0, "Could not obtain reduction handle");
+ if (max_handle<0) CCTK_ERROR("Could not obtain reduction handle");
for (d=0; d<6; ++d) local[ d] = cctkGH->cctk_bbox[d];
for (d=0; d<3; ++d) local[6+d] = -cctkGH->cctk_lbnd[d];
More information about the Commits
mailing list