diff --git a/CMakeLists.txt b/CMakeLists.txt index 870c573c0e..825313d099 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ if(SINGULARITY_USE_KOKKOS AND SINGULARITY_USE_CUDA) set(CMAKE_CXX_COMPILER ${NVCC_WRAPPER_DIR}/nvcc_wrapper CACHE STRING "") endif() -project(singularity-eos VERSION 1.3.0) +project(singularity-eos VERSION 1.4.0) if(SINGULARITY_USE_FORTRAN) enable_language(CXX Fortran) diff --git a/eos/eos.hpp b/eos/eos.hpp index f1b364c751..1c96744963 100644 --- a/eos/eos.hpp +++ b/eos/eos.hpp @@ -1489,7 +1489,14 @@ class EOSPAC { using EOS = Variant< IdealGas, Gruneisen, JWL, DavisReactants, DavisProducts, ScaledEOS, ShiftedEOS, ShiftedEOS>, - RelativisticEOS + ScaledEOS>, RelativisticEOS, + ScaledEOS, ShiftedEOS, + ScaledEOS>, + ScaledEOS, ShiftedEOS, ScaledEOS>, + ScaledEOS, ShiftedEOS, + ScaledEOS>, + ScaledEOS, ShiftedEOS, + ScaledEOS> #ifdef SPINER_USE_HDF , SpinerEOSDependsRhoT, SpinerEOSDependsRhoSie, @@ -1497,6 +1504,8 @@ using EOS = Variant< ShiftedEOS, ShiftedEOS, ShiftedEOS>, ShiftedEOS>, + ScaledEOS>, + ScaledEOS>, RelativisticEOS, RelativisticEOS, // TODO(JMM): Might need shifted + relativistic @@ -1508,7 +1517,8 @@ using EOS = Variant< #endif // SPINER_USE_HDF #ifdef SINGULARITY_USE_EOSPAC , - EOSPAC, ScaledEOS, ShiftedEOS, ShiftedEOS> + EOSPAC, ScaledEOS, ShiftedEOS, + ShiftedEOS>, ScaledEOS> #endif // SINGULARITY_USE_EOSPAC >; diff --git a/eos/eos_builder.hpp b/eos/eos_builder.hpp index 30a93c2225..371838505f 100644 --- a/eos/eos_builder.hpp +++ b/eos/eos_builder.hpp @@ -74,8 +74,8 @@ namespace EOSBuilder { template EOS applyScaleAndShift(T&& eos, - bool scaled, bool shifted, - Real scale, Real shift) { + bool scaled, bool shifted, + Real scale, Real shift) { if (shifted && scaled) { ScaledEOS a(std::move(eos),scale); ShiftedEOS> b(std::move(a),shift); @@ -89,6 +89,24 @@ namespace EOSBuilder { } return eos; } + + template + EOS applyShiftAndScale(T&& eos, + bool scaled, bool shifted, + Real scale, Real shift) { + if (shifted && scaled) { + ShiftedEOS a(std::forward(eos),shift); + ScaledEOS> b(std::move(a),scale); + return b; + } + if (shifted) { + return ShiftedEOS(std::forward(eos),shift); + } + if (scaled) { + return ScaledEOS(std::forward(eos),scale); + } + return eos; + } } // namespace EOSBuilder } // namespace singularity diff --git a/eos/singularity_eos.cpp b/eos/singularity_eos.cpp index 3d3c573ffb..796dca282e 100644 --- a/eos/singularity_eos.cpp +++ b/eos/singularity_eos.cpp @@ -13,6 +13,7 @@ //------------------------------------------------------------------------------ #include "singularity_eos.hpp" +#include "eos_builder.hpp" #include #include #include @@ -34,10 +35,34 @@ int init_sg_eos(const int nmat, EOS* &eos) { return 0; } +#define SGAPPLYMOD(A) \ + EOSBuilder::applyShiftAndScale(A, enabled[0] == 1, enabled[1] == 1,\ + vals[0], vals[1]) + +constexpr const int def_en[2] = {0, 0}; +constexpr const double def_v[2] = {0.0, 0.0}; + +int init_sg_IdealGas(const int matindex, EOS* eos, const double gm1, + const double Cv, + int const * const enabled, double const * const vals) { + assert(matindex >= 0); + EOS eos_ = SGAPPLYMOD(IdealGas(gm1, Cv)); + eos[matindex] = eos_.GetOnDevice(); + return 0; +} + int init_sg_IdealGas(const int matindex, EOS* eos, const double gm1, const double Cv) { + return init_sg_IdealGas(matindex, eos, gm1, Cv, def_en, def_v); +} + +int init_sg_Gruneisen(const int matindex, EOS* eos, const double C0, + const double s1, const double s2, const double s3, + const double G0, const double b, const double rho0, + const double T0, const double P0, const double Cv, + int const * const enabled, double const * const vals) { assert(matindex >= 0); - EOS eos_ = IdealGas(gm1, Cv); + EOS eos_ = SGAPPLYMOD(Gruneisen(C0, s1, s2, s3, G0, b, rho0, T0, P0, Cv)); eos[matindex] = eos_.GetOnDevice(); return 0; } @@ -46,8 +71,16 @@ int init_sg_Gruneisen(const int matindex, EOS* eos, const double C0, const double s1, const double s2, const double s3, const double G0, const double b, const double rho0, const double T0, const double P0, const double Cv) { + return init_sg_Gruneisen(matindex, eos, C0, s1, s2, s3, G0, b, rho0, T0, P0, + Cv, def_en, def_v); +} + +int init_sg_JWL(const int matindex, EOS* eos, const double A, + const double B, const double R1, const double R2, + const double w, const double rho0, const double Cv, + int const * const enabled, double const * const vals) { assert(matindex >= 0); - EOS eos_ = Gruneisen(C0, s1, s2, s3, G0, b, rho0, T0, P0, Cv); + EOS eos_ = SGAPPLYMOD(JWL(A, B, R1, R2, w, rho0, Cv)); eos[matindex] = eos_.GetOnDevice(); return 0; } @@ -55,8 +88,18 @@ int init_sg_Gruneisen(const int matindex, EOS* eos, const double C0, int init_sg_JWL(const int matindex, EOS* eos, const double A, const double B, const double R1, const double R2, const double w, const double rho0, const double Cv) { + return init_sg_JWL(matindex, eos, A, B, R1, R2, w, rho0, Cv, def_en, + def_v); +} + +int init_sg_DavisProducts(const int matindex, EOS* eos, const double a, + const double b, const double k, const double n, + const double vc, const double pc, const double Cv, + const double E0, + int const * const enabled, + double const * const vals) { assert(matindex >= 0); - EOS eos_ = JWL(A, B, R1, R2, w, rho0, Cv); + EOS eos_ = SGAPPLYMOD(DavisProducts(a, b, k, n, vc, pc, Cv, E0)); eos[matindex] = eos_.GetOnDevice(); return 0; } @@ -65,8 +108,20 @@ int init_sg_DavisProducts(const int matindex, EOS* eos, const double a, const double b, const double k, const double n, const double vc, const double pc, const double Cv, const double E0) { + return init_sg_DavisProducts(matindex, eos, a, b, k, n, vc, pc, Cv, E0, + def_en, def_v); +} + +int init_sg_DavisReactants(const int matindex, EOS* eos, + const double rho0, const double e0, const double P0, + const double T0, const double A, const double B, + const double C, const double G0, const double Z, + const double alpha, const double Cv0, + int const * const enabled, + double const * const vals) { assert(matindex >= 0); - EOS eos_ = DavisProducts(a, b, k, n, vc, pc, Cv, E0); + EOS eos_ = + SGAPPLYMOD(DavisReactants(rho0, e0, P0, T0, A, B, C, G0, Z, alpha, Cv0)); eos[matindex] = eos_.GetOnDevice(); return 0; } @@ -76,38 +131,58 @@ int init_sg_DavisReactants(const int matindex, EOS* eos, const double T0, const double A, const double B, const double C, const double G0, const double Z, const double alpha, const double Cv0) { - assert(matindex >= 0); - EOS eos_ = DavisReactants(rho0, e0, P0, T0, A, B, C, G0, Z, alpha, Cv0); - eos[matindex] = eos_.GetOnDevice(); - return 0; + return init_sg_DavisReactants(matindex, eos, rho0, e0, P0, T0, A, B, C, G0, Z, + alpha, Cv0, def_en, def_v); } #ifdef SPINER_USE_HDF int init_sg_SpinerDependsRhoT(const int matindex, EOS* eos, - const char* filename, const int matid) { + const char* filename, const int matid, + int const * const enabled, + double const * const vals) { assert(matindex >= 0); - EOS eos_ = SpinerEOSDependsRhoT(std::string(filename), matid); + EOS eos_ = SGAPPLYMOD(SpinerEOSDependsRhoT(std::string(filename), matid)); eos[matindex] = eos_.GetOnDevice(); return 0; } +int init_sg_SpinerDependsRhoT(const int matindex, EOS* eos, + const char* filename, const int matid) { + return init_sg_SpinerDependsRhoT(matindex, eos, filename, matid, def_en, + def_v); +} + int init_sg_SpinerDependsRhoSie(const int matindex, EOS* eos, - const char* filename, const int matid) { + const char* filename, const int matid, + int const * const enabled, + double const * const vals) { assert(matindex >= 0); - EOS eos_ = SpinerEOSDependsRhoSie(std::string(filename), matid); + EOS eos_ = SGAPPLYMOD(SpinerEOSDependsRhoSie(std::string(filename), matid)); eos[matindex] = eos_.GetOnDevice(); return 0; } +int init_sg_SpinerDependsRhoSie(const int matindex, EOS* eos, + const char* filename, const int matid) { + return init_sg_SpinerDependsRhoSie(matindex, eos, filename, matid, def_en, + def_v); +} #endif #ifdef SINGULARITY_USE_EOSPAC -int init_sg_eospac(const int matindex, EOS* eos, const int id) { +int init_sg_eospac(const int matindex, EOS* eos, const int id, + int const * const enabled, double const * const vals) { assert(matindex >= 0); - EOS eos_ = EOSPAC(id); + EOS eos_ = SGAPPLYMOD(EOSPAC(id)); eos[matindex] = eos_.GetOnDevice(); + return 0; +} +int init_sg_eospac(const int matindex, EOS* eos, const int id) { + return init_sg_eospac(matindex, eos, id, def_en, def_v); } #endif // SINGULARITY_USE_EOSPAC +#undef SGAPPLYMOD + #ifdef PORTABILITY_STRATEGY_KOKKOS using Lrgt = Kokkos::LayoutRight; template< typename T> diff --git a/eos/singularity_eos.f90 b/eos/singularity_eos.f90 index d89137e934..84f02d6080 100644 --- a/eos/singularity_eos.f90 +++ b/eos/singularity_eos.f90 @@ -56,92 +56,105 @@ end function init_sg_eos interface integer(kind=c_int) function & - init_sg_IdealGas(matindex, eos, gm1, Cv) & + init_sg_IdealGas(matindex, eos, gm1, Cv, sg_mods_enabled, & + sg_mods_values) & bind(C, name='init_sg_IdealGas') import integer(c_int), value, intent(in) :: matindex type(c_ptr), value, intent(in) :: eos real(kind=c_double), value, intent(in) :: gm1, Cv + type(c_ptr), value, intent(in) :: sg_mods_enabled, sg_mods_values end function init_sg_IdealGas end interface interface integer(kind=c_int) function & init_sg_Gruneisen(matindex, eos, C0, s1, s2, s3, G0, b, rho0, T0, P0,& - Cv) & + Cv, sg_mods_enabled, sg_mods_values) & bind(C, name='init_sg_Gruneisen') import integer(c_int), value, intent(in) :: matindex type(c_ptr), value, intent(in) :: eos real(kind=c_double), value, intent(in) :: C0, s1, s2, s3, G0, b, rho0 real(kind=c_double), value, intent(in) :: T0, P0, Cv + type(c_ptr), value, intent(in) :: sg_mods_enabled, sg_mods_values end function init_sg_Gruneisen end interface interface integer(kind=c_int) function & - init_sg_JWL(matindex, eos, A, B, R1, R2, w, rho0, Cv) & + init_sg_JWL(matindex, eos, A, B, R1, R2, w, rho0, Cv, sg_mods_enabled, & + sg_mods_values) & bind(C, name='init_sg_JWL') import integer(c_int), value, intent(in) :: matindex type(c_ptr), value, intent(in) :: eos real(kind=c_double), value, intent(in) :: A, B, R1, R2, w, rho0, Cv + type(c_ptr), value, intent(in) :: sg_mods_enabled, sg_mods_values end function init_sg_JWL end interface interface integer(kind=c_int) function & - init_sg_DavisProducts(matindex, eos, a, b, k, n, vc, pc, Cv, E0) & + init_sg_DavisProducts(matindex, eos, a, b, k, n, vc, pc, Cv, E0, & + sg_mods_enabled, sg_mods_values) & bind(C, name='init_sg_DavisProducts') import integer(c_int), value, intent(in) :: matindex type(c_ptr), value, intent(in) :: eos real(kind=c_double), value, intent(in) :: a, b, k, n, vc, pc, Cv, E0 + type(c_ptr), value, intent(in) :: sg_mods_enabled, sg_mods_values end function init_sg_DavisProducts end interface interface integer(kind=c_int) function & init_sg_DavisReactants(matindex, eos, rho0, e0, P0, T0, A, B, C, G0, Z,& - alpha, Cv0) & + alpha, Cv0, sg_mods_enabled, sg_mods_values) & bind(C, name='init_sg_DavisReactants') import integer(c_int), value, intent(in) :: matindex type(c_ptr), value, intent(in) :: eos real(kind=c_double), value, intent(in) :: rho0, e0, P0, T0, A, B, C, G0,& Z, alpha, Cv0 + type(c_ptr), value, intent(in) :: sg_mods_enabled, sg_mods_values end function init_sg_DavisReactants end interface interface integer(kind=c_int) function & - init_sg_SpinerDependsRhoT(matindex, eos, filename, id) & + init_sg_SpinerDependsRhoT(matindex, eos, filename, id, sg_mods_enabled, & + sg_mods_values) & bind(C, name='init_sg_SpinerDependsRhoT') import integer(c_int), value, intent(in) :: matindex, id type(c_ptr), value, intent(in) :: eos character(kind=c_char), intent(in) :: filename(*) + type(c_ptr), value, intent(in) :: sg_mods_enabled, sg_mods_values end function init_sg_SpinerDependsRhoT end interface interface integer(kind=c_int) function & - init_sg_SpinerDependsRhoSie(matindex, eos, filename, id) & + init_sg_SpinerDependsRhoSie(matindex, eos, filename, id, & + sg_mods_enabled, sg_mods_values) & bind(C, name='init_sg_SpinerDependsRhoSie') import integer(c_int), value, intent(in) :: matindex, id type(c_ptr), value, intent(in) :: eos character(kind=c_char), intent(in) :: filename(*) + type(c_ptr), value, intent(in) :: sg_mods_enabled, sg_mods_values end function init_sg_SpinerDependsRhoSie end interface interface integer(kind=c_int) function & - init_sg_eospac(matindex, eos, id) & + init_sg_eospac(matindex, eos, id, sg_mods_enabled, sg_mods_values) & bind(C, name='init_sg_eospac') import integer(c_int), value, intent(in) :: matindex, id type(c_ptr), value, intent(in) :: eos + type(c_ptr), value, intent(in) :: sg_mods_enabled, sg_mods_values end function init_sg_eospac end interface @@ -263,77 +276,114 @@ integer function init_sg_eos_f(nmat, eos) & err = init_sg_eos(nmat, eos%ptr) end function init_sg_eos_f - integer function init_sg_IdealGas_f(matindex, eos, gm1, Cv) & + integer function init_sg_IdealGas_f(matindex, eos, gm1, Cv, & + sg_mods_enabled, sg_mods_values) & result(err) integer(c_int), value, intent(in) :: matindex type(sg_eos_ary_t), intent(in) :: eos real(kind=8), value, intent(in) :: gm1, Cv - err = init_sg_IdealGas(matindex-1, eos%ptr, gm1, Cv) + integer(kind=c_int), dimension(:), target, intent(in) :: sg_mods_enabled + real(kind=8), dimension(:), target, intent(in) :: sg_mods_values + err = init_sg_IdealGas(matindex-1, eos%ptr, gm1, Cv, & + c_loc(sg_mods_enabled), c_loc(sg_mods_values)) end function init_sg_IdealGas_f integer function init_sg_Gruneisen_f(matindex, eos, C0, s1, s2, s3, G0, b,& - rho0, T0, P0, Cv) & + rho0, T0, P0, Cv, sg_mods_enabled, & + sg_mods_values) & result(err) integer(c_int), value, intent(in) :: matindex type(sg_eos_ary_t), intent(in) :: eos real(kind=8), value, intent(in) :: C0, s1, s2, s3, G0, b, rho0 real(kind=8), value, intent(in) :: T0, P0, Cv + integer(kind=c_int), dimension(:), target, intent(in) :: sg_mods_enabled + real(kind=8), dimension(:), target, intent(in) :: sg_mods_values err = init_sg_Gruneisen(matindex-1, eos%ptr, C0, s1, s2, s3, G0, b, rho0,& - T0, P0, Cv) + T0, P0, Cv, c_loc(sg_mods_enabled), & + c_loc(sg_mods_values)) end function init_sg_Gruneisen_f - integer function init_sg_JWL_f(matindex, eos, A, B, R1, R2, w, rho0, Cv) & + integer function init_sg_JWL_f(matindex, eos, A, B, R1, R2, w, rho0, Cv, & + sg_mods_enabled, sg_mods_values) & result(err) integer(c_int), value, intent(in) :: matindex type(sg_eos_ary_t), intent(in) :: eos real(kind=8), value, intent(in) :: A, B, R1, R2, w, rho0, Cv - err = init_sg_JWL(matindex-1, eos%ptr, A, B, R1, R2, w, rho0, Cv) + integer(kind=c_int), dimension(:), target, intent(in) :: sg_mods_enabled + real(kind=8), dimension(:), target, intent(in) :: sg_mods_values + err = init_sg_JWL(matindex-1, eos%ptr, A, B, R1, R2, w, rho0, Cv, & + c_loc(sg_mods_enabled), c_loc(sg_mods_values)) end function init_sg_JWL_f - integer function init_sg_DavisProducts_f(matindex, eos, a, b, k, n, vc, pc,& - Cv, E0) & + integer function init_sg_DavisProducts_f(matindex, eos, a, b, k, n, vc, pc, & + Cv, E0, sg_mods_enabled, & + sg_mods_values) & result(err) integer(c_int), value, intent(in) :: matindex type(sg_eos_ary_t), intent(in) :: eos real(kind=8), value, intent(in) :: a, b, k, n, vc, pc, Cv, E0 - err = init_sg_DavisProducts(matindex-1, eos%ptr, a, b, k, n, vc, pc, Cv, E0) + integer(kind=c_int), dimension(:), target, intent(in) :: sg_mods_enabled + real(kind=8), dimension(:), target, intent(in) :: sg_mods_values + err = init_sg_DavisProducts(matindex-1, eos%ptr, a, b, k, n, vc, pc, Cv, & + E0, c_loc(sg_mods_enabled), & + c_loc(sg_mods_values)) end function init_sg_DavisProducts_f - integer function init_sg_DavisReactants_f(matindex, eos, rho0, e0, P0, T0,& - A, B, C, G0, Z, alpha, Cv0) & + integer function init_sg_DavisReactants_f(matindex, eos, rho0, e0, P0, T0, & + A, B, C, G0, Z, alpha, Cv0, & + sg_mods_enabled, sg_mods_values) & result(err) integer(c_int), value, intent(in) :: matindex type(sg_eos_ary_t), intent(in) :: eos real(kind=8), value, intent(in) :: rho0, e0, P0, T0, A, B, C, G0, Z real(kind=8), value, intent(in) :: alpha, Cv0 - err = init_sg_DavisReactants(matindex-1, eos%ptr, rho0, e0, P0, T0, A, B,& - C, G0, Z, alpha, Cv0) + integer(kind=c_int), dimension(:), target, intent(in) :: sg_mods_enabled + real(kind=8), dimension(:), target, intent(in) :: sg_mods_values + err = init_sg_DavisReactants(matindex-1, eos%ptr, rho0, e0, P0, T0, A, B, & + C, G0, Z, alpha, Cv0, c_loc(sg_mods_enabled), & + c_loc(sg_mods_values)) end function init_sg_DavisReactants_f - integer function init_sg_SpinerDependsRhoT_f(matindex, eos, filename, id) & + integer function init_sg_SpinerDependsRhoT_f(matindex, eos, filename, id, & + sg_mods_enabled, & + sg_mods_values) & result(err) integer(c_int), value, intent(in) :: matindex type(sg_eos_ary_t), intent(in) :: eos character(len=*, kind=c_char), intent(in) :: filename integer(c_int), intent(inout) :: id + integer(kind=c_int), dimension(:), target, intent(in) :: sg_mods_enabled + real(kind=8), dimension(:), target, intent(in) :: sg_mods_values err = init_sg_SpinerDependsRhoT(matindex-1, eos%ptr,& - trim(filename)//C_NULL_CHAR, id) + trim(filename)//C_NULL_CHAR, id, & + c_loc(sg_mods_enabled), & + c_loc(sg_mods_values)) end function init_sg_SpinerDependsRhoT_f - integer function init_sg_SpinerDependsRhoSie_f(matindex, eos, filename, id) & + integer function init_sg_SpinerDependsRhoSie_f(matindex, eos, filename, id, & + sg_mods_enabled, & + sg_mods_values) & result(err) integer(c_int), value, intent(in) :: matindex, id type(sg_eos_ary_t), intent(in) :: eos character(len=*, kind=c_char), intent(in) :: filename + integer(kind=c_int), dimension(:), target, intent(in) :: sg_mods_enabled + real(kind=8), dimension(:), target, intent(in) :: sg_mods_values err = init_sg_SpinerDependsRhoSie(matindex-1, eos%ptr,& - trim(filename)//C_NULL_CHAR, id) + trim(filename)//C_NULL_CHAR, id, & + c_loc(sg_mods_enabled), & + c_loc(sg_mods_values)) end function init_sg_SpinerDependsRhoSie_f - integer function init_sg_eospac_f(matindex, eos, id) & + integer function init_sg_eospac_f(matindex, eos, id, sg_mods_enabled, & + sg_mods_values) & result(err) integer(c_int), value, intent(in) :: matindex, id type(sg_eos_ary_t), intent(in) :: eos - err = init_sg_eospac(matindex-1, eos%ptr, id) + integer(kind=c_int), dimension(:), target, intent(in) :: sg_mods_enabled + real(kind=8), dimension(:), target, intent(in) :: sg_mods_values + err = init_sg_eospac(matindex-1, eos%ptr, id, c_loc(sg_mods_enabled), & + c_loc(sg_mods_values)) end function init_sg_eospac_f integer function finalize_sg_eos_f(nmat, eos) & diff --git a/eos/singularity_eos.hpp b/eos/singularity_eos.hpp index 970d890291..1a74129966 100644 --- a/eos/singularity_eos.hpp +++ b/eos/singularity_eos.hpp @@ -27,39 +27,50 @@ extern "C" { int init_sg_eos(const int nmat, EOS* &eos); int init_sg_IdealGas(const int matindex, EOS* eos, const double gm1, - const double Cv); + const double Cv, + int const * const enabled, double const * const vals); int init_sg_JWL(const int matindex, EOS* eos, const double A, const double B, const double R1, const double R2, - const double w, const double rho0, const double Cv); + const double w, const double rho0, const double Cv, + int const * const enabled, double const * const vals); int init_sg_Gruneisen(const int matindex, EOS* eos, const double C0, const double s1, const double s2, const double s3, const double G0, const double b, const double rho0, - const double T0, const double P0, const double Cv); + const double T0, const double P0, const double Cv, + int const * const enabled, double const * const vals); int init_sg_DavisProducts(const int matindex, EOS* eos, const double a, const double b, const double k, const double n, const double vc, const double pc, const double Cv, - const double E0); + const double E0, + int const * const enabled, double const * const vals); int init_sg_DavisReactants(const int matindex, EOS* eos, const double rho0, const double e0, const double P0, const double T0, const double A, const double B, const double C, const double G0, const double Z, const double alpha, - const double Cv0); + const double Cv0, + int const * const enabled, + double const * const vals); #ifdef SPINER_USE_HDF int init_sg_SpinerDependsRhoT(const int matindex, EOS* eos, - const char* filename, const int id); + const char* filename, const int id, + int const * const enabled, + double const * const vals); int init_sg_SpinerDependsRhoSie(const int matindex, EOS* eos, - const char* filename, const int id); + const char* filename, const int id, + int const * const enabled, + double const * const vals); #endif #ifdef SINGULARITY_USE_EOSPAC - // capitalize? eospaceos Eospac Eospaceos EOSPAC EOSPACeos? -int init_sg_eospac(const int matindex, EOS* eos, const int id); +// capitalize? eospaceos Eospac Eospaceos EOSPAC EOSPACeos? +int init_sg_eospac(const int matindex, EOS* eos, const int id, + int const * const enabled, double const * const vals); #endif // SINGULARITY_USE_EOSPAC int get_sg_eos(// sizing information @@ -87,4 +98,41 @@ int finalize_sg_eos(const int nmat, EOS* &eos, const int own_kokkos=0); } #endif +// outside of C scope, provide overloads +int init_sg_IdealGas(const int matindex, EOS* eos, const double gm1, + const double Cv); + +int init_sg_JWL(const int matindex, EOS* eos, const double A, + const double B, const double R1, const double R2, + const double w, const double rho0, const double Cv); + +int init_sg_Gruneisen(const int matindex, EOS* eos, const double C0, + const double s1, const double s2, const double s3, + const double G0, const double b, const double rho0, + const double T0, const double P0, const double Cv); + +int init_sg_DavisProducts(const int matindex, EOS* eos, const double a, + const double b, const double k, const double n, + const double vc, const double pc, const double Cv, + const double E0); + +int init_sg_DavisReactants(const int matindex, EOS* eos, const double rho0, + const double e0, const double P0, const double T0, + const double A, const double B, const double C, + const double G0, const double Z, const double alpha, + const double Cv0); + +#ifdef SPINER_USE_HDF +int init_sg_SpinerDependsRhoT(const int matindex, EOS* eos, + const char* filename, const int id); + +int init_sg_SpinerDependsRhoSie(const int matindex, EOS* eos, + const char* filename, const int id); +#endif + +#ifdef SINGULARITY_USE_EOSPAC +// capitalize? eospaceos Eospac Eospaceos EOSPAC EOSPACeos? +int init_sg_eospac(const int matindex, EOS* eos, const int id); +#endif // SINGULARITY_USE_EOSPAC + #endif // EOS_SINGULARITY_EOS_HPP_