diff options
-rw-r--r-- | interface.ccl | 2 | ||||
-rw-r--r-- | src/EOS_Omni_Names.cpp | 15 | ||||
-rw-r--r-- | src/make.code.defn | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/interface.ccl b/interface.ccl index 3eb5752..2376137 100644 --- a/interface.ccl +++ b/interface.ccl @@ -4,6 +4,8 @@ implements: EOS_Omni inherits: +CCTK_INT FUNCTION EOS_Omni_GetHandle(CCTK_STRING IN name) + void FUNCTION EOS_Omni_press(CCTK_INT IN eoskey, \ CCTK_INT IN havetemp, \ CCTK_INT IN npoints, \ diff --git a/src/EOS_Omni_Names.cpp b/src/EOS_Omni_Names.cpp new file mode 100644 index 0000000..af910bb --- /dev/null +++ b/src/EOS_Omni_Names.cpp @@ -0,0 +1,15 @@ +#include <cctk.h> +#include <cctk_Arguments.h> +#include <cctk_Parameters.h> + +CCTK_INT EOS_Omni_GetHandle(CCTK_STRING name) +{ + if (CCTK_EQUALS(name, "2D_Polytrope")) + return 1; + if (CCTK_EQUALS(name, "Ideal_Fluid")) + return 2; + if (CCTK_EQUALS(name, "Hybrid")) + return 3; + return 0; +} + diff --git a/src/make.code.defn b/src/make.code.defn index 835441d..55fab54 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -1,7 +1,7 @@ # Main make.code.defn file for thorn EOS_Omni # Source files in this directory -SRCS = EOS_Omni_Module.F90 EOS_Omni_Startup.F90 EOS_Omni_SingleVarCalls.F90 +SRCS = EOS_Omni_Module.F90 EOS_Omni_Startup.F90 EOS_Omni_SingleVarCalls.F90 EOS_Omni_Names.cpp # Subdirectories containing source files SUBDIRS = |