diff options
author | rhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2013-01-14 14:23:27 +0000 |
---|---|---|
committer | rhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2013-01-14 14:23:27 +0000 |
commit | c141ed811d4a5b84ecc077999d1fec0a3c598b95 (patch) | |
tree | 92f2d30c9ae9fbed6e307a802b841f75eadab0b9 /src/GRHydro_Macros.h | |
parent | d5c4a808aeefa7fe95cc25cb7648fd7938561b8d (diff) |
GRHydro: Introduce variable atmopshere level / tolerance as function of radius. Off by default.
From: Christian Reisswig <reisswig@scriwalker.(none)>
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@453 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
Diffstat (limited to 'src/GRHydro_Macros.h')
-rw-r--r-- | src/GRHydro_Macros.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/GRHydro_Macros.h b/src/GRHydro_Macros.h index 7009b86..5a02a58 100644 --- a/src/GRHydro_Macros.h +++ b/src/GRHydro_Macros.h @@ -10,3 +10,31 @@ #define DOTP2(gxx_,gxy_,gxz_,gyy_,gyz_,gzz_,x_,y_,z_) \ ( (gxx_)*(x_)**2+(gyy_)*(y_)**2+(gzz_)*(z_)**2+ \ 2.0*( (gxy_)*(x_)*(y_)+(gxz_)*(x_)*(z_)+(gyz_)*(y_)*(z_) ) ) + + +#define IF_BELOW_ATMO(rho, rho_min, rho_tol, r) \ + dummy1 = atmo_tolerance_radius &&\ + dummy2 = atmo_falloff_radius &&\ + if (r .gt. atmo_tolerance_radius) then &&\ + dummy1 = r &&\ + endif &&\ + if (r .gt. atmo_falloff_radius) then &&\ + dummy2 = r &&\ + endif &&\ + if (rho .le. rho_min*(1.0d0 + rho_tol * (dummy1/atmo_tolerance_radius)**atmo_tolerance_power) * (atmo_falloff_radius/dummy2)**atmo_falloff_power) + + + +!#define ATMOCHECK(rho, rho_min, rho_tol, r) \ +! (atmo_type .eq. 0 .and. rho .le. rho_min*(1.0d0 + rho_tol)) .or. \ +! (atmo_type .eq. 1 .and. rho .le. rho_min*(1.0d0 + rho_tol * (atmo_tolerance_radius/r)**atmo_tolerance_power)) .or. \ +! (atmo_type .eq. 2 .and. rho .le. rho_min*(1.d00 + rho_tol) * (atmo_falloff_radius/r)**atmo_falloff_power) .or. \ +! (atmo_type .eq. 3 .and. rho .le. rho_min*(1.0d0 + rho_tol * (r/atmo_tolerance_radius)**atmo_tolerance_power) * (r/atmo_falloff_radius)**atmo_falloff_power) + + +#define SET_ATMO_MIN(rho_, rho_min, r) &&\ + dummy1 = atmo_falloff_radius &&\ + if (r .gt. atmo_falloff_radius) then &&\ + dummy1 = r &&\ + endif &&\ + rho_ = rho_min * (atmo_falloff_radius/dummy1)**atmo_falloff_power |