diff options
author | bmundim <bmundim@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2010-05-02 20:59:32 +0000 |
---|---|---|
committer | bmundim <bmundim@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2010-05-02 20:59:32 +0000 |
commit | 74fb1e6ea34d6e03a35ff6c158f455c39904bf5a (patch) | |
tree | d8f9b95f30517e9bafd8c67301c7383bc8beb76e /src/GRHydro_Minima.F90 | |
parent | 291e94d06b30046227fb075cbfa97b9656339d5a (diff) |
file/parameter string replacement from whisky to GRHydro
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@112 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
Diffstat (limited to 'src/GRHydro_Minima.F90')
-rw-r--r-- | src/GRHydro_Minima.F90 | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/src/GRHydro_Minima.F90 b/src/GRHydro_Minima.F90 new file mode 100644 index 0000000..d3e2897 --- /dev/null +++ b/src/GRHydro_Minima.F90 @@ -0,0 +1,126 @@ + /*@@ + @file GRHydro_Minima.F90 + @date Mon Feb 25 11:43:36 2002 + @author + @desc + Sets up the scalars used for the atmosphere, before initial data. + @enddesc + @@*/ + +#include "cctk.h" +#include "cctk_Parameters.h" +#include "cctk_Arguments.h" + + /*@@ + @routine GRHydro_Minima_Setup + @date Mon Feb 25 11:25:27 2002 + @author Ian Hawke + @desc + Before initial data, set up the scalar GRHydro_rho_min used for the atmosphere. + This is computed only from parameters. + @enddesc + @calls + @calledby + @history + Modified 30 Aug 2006 by Luca Baiotti + @endhistory + +@@*/ + +subroutine GRHydro_Rho_Minima_Setup(CCTK_ARGUMENTS) + + implicit none + + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + if (initial_rho_abs_min > 0.0) then + GRHydro_rho_min = initial_rho_abs_min + else if (initial_rho_rel_min > 0.0) then + GRHydro_rho_min = GRHydro_rho_central * initial_rho_rel_min + else if (rho_abs_min > 0.d0) then + GRHydro_rho_min = rho_abs_min + else + GRHydro_rho_min = GRHydro_rho_central * rho_rel_min + end if + + if (initial_atmosphere_factor > 0.0) GRHydro_rho_min = GRHydro_rho_min * initial_atmosphere_factor + + return + +end subroutine GRHydro_Rho_Minima_Setup + + + /*@@ + @routine GRHydro_Check_Rho_Minimum + @date Mon Jul 7 16:35:45 2008 + @author Luca Baiotti + @desc + Check whether at some point rho < GRHydro_rho_min and print a warning in case. + @enddesc + @calls + @calledby + @history + @endhistory +@@*/ + +subroutine GRHydro_Check_Rho_Minimum(CCTK_ARGUMENTS) + + implicit none + + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + CCTK_INT i,j,k + character(len=100) warnline + + do i=1,cctk_lsh(1) + do j=1,cctk_lsh(2) + do k=1,cctk_lsh(3) + + if (rho(i,j,k) < GRHydro_rho_min) then + call CCTK_WARN(2,"rho<GRHydro_rho_min!!!") + write(warnline,'(a28,i2)') 'on carpet reflevel: ',GRHydro_reflevel + call CCTK_WARN(2,warnline) + write(warnline,'(a25,g15.6)') 'GRHydro_rho_min: ',GRHydro_rho_min + call CCTK_WARN(2,warnline) + write(warnline,'(a25,g15.6)') 'rho: ',rho(i,j,k) + call CCTK_WARN(2,warnline) + write(warnline,'(a25,4g15.6)') 'coordinates: x,y,z,r:',x(i,j,k),y(i,j,k),z(i,j,k),r(i,j,k) + call CCTK_WARN(2,warnline) + end if + + end do + end do + end do + + return + +end subroutine GRHydro_Check_Rho_Minimum + + + /*@@ + @routine GRHydro__Change_Rho_Minimum_At_Recovery + @date Thu Aug 14 17:11:32 2008 + @author Luca Baiotti + @desc + Change, via a parameter, the value of GRHydro_rho_min at recovery. + @enddesc + @calls + @calledby + @history + @endhistory +@@*/ + +subroutine GRHydro_Change_Rho_Minimum_At_Recovery(CCTK_ARGUMENTS) + + implicit none + + DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_PARAMETERS + + GRHydro_rho_min = rho_abs_min_after_recovery + + return + +end subroutine GRHydro_Change_Rho_Minimum_At_Recovery |