Skip to content

Commit d8e353a

Browse files
NewRadX: addressed requested changes
1 parent 0bed759 commit d8e353a

3 files changed

Lines changed: 38 additions & 8 deletions

File tree

NewRadX/src/newradx.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ void NewRadX_Apply(const cGH *restrict const cctkGH,
256256
const auto dc_dz = vJ_dc_dz(p.I);
257257

258258
// Global derivatives
259-
const auto dgf_dx = dgf_db * db_dx + dgf_dc * dc_dx + da_dx * dgf_da;
260-
const auto dgf_dy = dgf_dc * dc_dy + db_dy * dgf_db + da_dy * dgf_da;
261-
const auto dgf_dz = dc_dz * dgf_dc + db_dz * dgf_db + da_dz * dgf_da;
259+
const auto dgf_dx = dgf_da * da_dx + dgf_db * db_dx + dgf_dc * dc_dx;
260+
const auto dgf_dy = dgf_da * da_dy + dgf_db * db_dy + dgf_dc * dc_dy;
261+
const auto dgf_dz = dgf_da * da_dz + dgf_db * db_dz + dgf_dc * dc_dz;
262262

263263
// radiative rhs
264264
rhs(p.I) = -vx * dgf_dx - vy * dgf_dy - vz * dgf_dz -
@@ -312,9 +312,9 @@ void NewRadX_Apply(const cGH *restrict const cctkGH,
312312
const auto dc_dz = vJ_dc_dz(intp);
313313

314314
// Global derivatives at interior point
315-
const auto dgf_dx = dgf_db * db_dx + dgf_dc * dc_dx + da_dx * dgf_da;
316-
const auto dgf_dy = dgf_dc * dc_dy + db_dy * dgf_db + da_dy * dgf_da;
317-
const auto dgf_dz = dc_dz * dgf_dc + db_dz * dgf_db + da_dz * dgf_da;
315+
const auto dgf_dx = dgf_da * da_dx + dgf_db * db_dx + dgf_dc * dc_dx;
316+
const auto dgf_dy = dgf_da * da_dy + dgf_db * db_dy + dgf_dc * dc_dy;
317+
const auto dgf_dz = dgf_da * da_dz + dgf_db * db_dz + dgf_dc * dc_dz;
318318

319319
// Radiative part at interior point
320320
const auto rad = -vxint * dgf_dx - vyint * dgf_dy - vzint * dgf_dz -

NewRadX/src/newradx.hxx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,38 @@ void NewRadX_Apply(const cGH *restrict const cctkGH,
3131

3232
/**
3333
* @brief Applies radiative boundary condition to the RHS of a state variable
34-
* on multipatch grids.
34+
* on multipatch grids. See above for original credits.
35+
*
36+
* @param cctkGH Pointer to Cactus grid hierarchy struct.
37+
* @param var State variable which will have boundary conditions applied to it.
38+
* @param rhs RHS of the evolution equation for @param var
39+
* @param vcoordx Global x vertex coordinates grid function. Providade by
40+
* CoordinatesX
41+
* @param vcoordy Global y vertex coordinates grid function. Providade by
42+
* CoordinatesX
43+
* @param vcoordz Global z vertex coordinates grid function. Providade by
44+
* CoordinatesX
45+
* @param vJ_da_dx Vertex centered coordinate transformation Jacobian da/dx.
46+
* Provided by any thorn implementing the Multipatch interface.
47+
* @param vJ_da_dy Vertex centered coordinate transformation Jacobian da/dy.
48+
* Provided by any thorn implementing the Multipatch interface.
49+
* @param vJ_da_dz Vertex centered coordinate transformation Jacobian da/dz.
50+
* Provided by any thorn implementing the Multipatch interface.
51+
* @param vJ_db_dx Vertex centered coordinate transformation Jacobian db/dx.
52+
* Provided by any thorn implementing the Multipatch interface.
53+
* @param vJ_db_dy Vertex centered coordinate transformation Jacobian db/dy.
54+
* Provided by any thorn implementing the Multipatch interface.
55+
* @param vJ_db_dz Vertex centered coordinate transformation Jacobian db/dz.
56+
* Provided by any thorn implementing the Multipatch interface.
57+
* @param vJ_dc_dx Vertex centered coordinate transformation Jacobian dc/dx.
58+
* Provided by any thorn implementing the Multipatch interface.
59+
* @param vJ_dc_dy Vertex centered coordinate transformation Jacobian dc/dy.
60+
* Provided by any thorn implementing the Multipatch interface.
61+
* @param vJ_dc_dz Vertex centered coordinate transformation Jacobian dc/dz.
62+
* Provided by any thorn implementing the Multipatch interface.
63+
* @param var0 Value at infinity.
64+
* @param v0 Propagation speed.
65+
* @param radpower Radial fall-off exponent
3566
*/
3667
void NewRadX_Apply(const cGH *restrict const cctkGH,
3768
const Loop::GF3D2<const CCTK_REAL> &var,

scripts/spacetimex.th

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,3 @@ SpacetimeX/TwoPuncturesX
182182
SpacetimeX/Weyl
183183
SpacetimeX/WeylScal4
184184
SpacetimeX/Z4c
185-

0 commit comments

Comments
 (0)