diff options
author | rhaas <rhaas@ac85fae7-cede-4708-beff-ae01c7fa1c26> | 2013-03-28 01:49:00 +0000 |
---|---|---|
committer | rhaas <rhaas@ac85fae7-cede-4708-beff-ae01c7fa1c26> | 2013-03-28 01:49:00 +0000 |
commit | a6618b89650ab2e7d79e5319b8b92cd1142c6d4e (patch) | |
tree | 621d8be6d59cb615ac6a239733f3491570b92662 /src/GRHydro_BondiM.c | |
parent | 17c962fe5711750f28560798f4213988eb470e9e (diff) |
GRHydro_Init_Data: damp hydro quantities to atmosphere inside of rKS < 1 M
From: Roland Haas <rhaas@tapir.caltech.edu>
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/GRHydro_InitData/trunk@202 ac85fae7-cede-4708-beff-ae01c7fa1c26
Diffstat (limited to 'src/GRHydro_BondiM.c')
-rw-r--r-- | src/GRHydro_BondiM.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/GRHydro_BondiM.c b/src/GRHydro_BondiM.c index 2fd4184..c59f612 100644 --- a/src/GRHydro_BondiM.c +++ b/src/GRHydro_BondiM.c @@ -1238,6 +1238,19 @@ static void GRHydro_BondiM_Internal(CCTK_ARGUMENTS, CCTK_REAL range_min, CCTK_RE Bvecz(i) = bondi_bmag*SQR(M)*z[i]/sqrt(det)/CUBE(r[i]); } + // damp everything down to atmosphere inside of 1M + if(rspher < M) { + const CCTK_REAL smooth = 0.5*(1+tanh(tan(M_PI*(rspher/M-0.5)))); + rho[i] *= smooth; + velx(i) *= smooth; + vely(i) *= smooth; + velz(i) *= smooth; + eps[i] *= smooth; + Bvecx(i) *= smooth; + Bvecy(i) *= smooth; + Bvecz(i) *= smooth; + } + Prim2ConGenM(*GRHydro_eos_handle,gxx[i],gxy[i], gxz[i],gyy[i],gyz[i],gzz[i], det, &dens[i],&sx(i),&sy(i),&sz(i), |