/*@@ @file GRHydro_EOS.c @date Wed Feb 6 18:25:33 2002 @author @desc Sets the EOS handle number from EOS_Base for use by all the GRHydro routines @enddesc @@*/ #include "cctk.h" #include "cctk_Parameters.h" #include "cctk_Arguments.h" #include #include #include "EOS_Base.h" /*@@ @routine GRHydro_EOSHandle @date Wed Feb 6 18:28:01 2002 @author Ian Hawke @desc Sets the EOS handle number @enddesc @calls @calledby @history @endhistory @@*/ void GRHydro_EOSHandle(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; int ierr = 0; char *infoline; *GRHydro_eos_handle = EOS_Handle(GRHydro_eos_table); if (*GRHydro_eos_handle < 0) { ierr = *GRHydro_eos_handle; CCTK_WARN(0, "Table handle is incorrect"); } *GRHydro_polytrope_handle = EOS_Handle("2D_Polytrope"); if (*GRHydro_polytrope_handle < 0) { ierr = *GRHydro_polytrope_handle; CCTK_WARN(0, "GRHydro requires the 2D_Polytrope or the 2D_HybridPolytrope EoSs to be registered, for the atmosphere"); } infoline = (char *)malloc(100*sizeof(char)); if (!infoline) { CCTK_WARN(0, "Failed to malloc an array of 100 chars in GRHydro_EOS."); } else { sprintf(infoline,"GRHydro will use the %s equation of state.", GRHydro_eos_table); CCTK_INFO(infoline); } free(infoline); infoline = NULL; }