diff options
Diffstat (limited to 'src/GRHydro_BondiM.c')
-rw-r--r-- | src/GRHydro_BondiM.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/GRHydro_BondiM.c b/src/GRHydro_BondiM.c index ef7c1c5..f947abb 100644 --- a/src/GRHydro_BondiM.c +++ b/src/GRHydro_BondiM.c @@ -1097,6 +1097,21 @@ void GRHydro_BondiM(CCTK_ARGUMENTS) xpos[YY] = y[i] ; xpos[ZZ] = z[i] ; + if (bondi_radial_offset > 0.) { + double rspher_orig = sqrt(SQR(xpos[XX])+SQR(xpos[YY])+SQR(xpos[ZZ])); + double rspher_new = rspher_orig + bondi_radial_offset; + if(rspher_orig < SMALL_BONDI) { + xpos[XX] = rspher_new; + xpos[YY] = 0.; + xpos[ZZ] = 0.; + } else { + for(int n = XX ; n <= ZZ ; n++) { + xpos[n] *= rspher_new/rspher_orig; + } + } + } + + switch( coord_type ) { case COORD_BOYERLINDQUIST : |