c/*@@ c @file Call.F c @date Wed Dec 15 00:00:35 1999 c @author Tom Goodale c @desc c Calls the C EOS test routines from Fortran c @enddesc c @version $Header$ c@@*/ #include "cctk.h" #include "cctk_Arguments.h" c/*@@ c @routine EOS_Test_Call c @date Wed Dec 15 00:08:58 1999 c @author Tom Goodale c @desc c Test calling of EOS functions from Fortran. c @enddesc c @calls c @calledby c @history c c @endhistory c c@@*/ SUBROUTINE EOS_Test_Call(CCTK_FARGUMENTS) IMPLICIT none DECLARE_CCTK_FARGUMENTS CCTK_REAL rho, eps, p, dpdrho, dpdeps INTEGER ierr, handle c Include the external statements for the EOS functions. #include "EOS_Base.inc" CCTK_REAL a,b a = 3.0 b = 4.0 print *,"Testing EOS from Fortran" CALL EOS_Handle(handle, "test") IF (handle .ge. 0) THEN p = EOS_Pressure(handle, a, b); print *,"p = ", p eps = EOS_SpecificIntEnergy(handle, a, b); print *,"eps = ", eps rho = EOS_RestMassDens(handle, a, b) print *,"rho = ", rho dpdrho = EOS_DPressByDRho(handle, a, b) print *,"dpdrho = ", dpdrho dpdeps = EOS_DPressByDEps(handle, a, b); print *,"dpdeps = ", dpdeps ELSE print *,"Can't find an EOS handle for 'test'." ENDIF END SUBROUTINE EOS_TEST_CALL