From 2ae3f16fd5f49ac05c3ac512f312bef669fda189 Mon Sep 17 00:00:00 2001 From: Daniel Holladay Date: Tue, 5 Jul 2022 18:29:14 -0600 Subject: [PATCH] format --- singularity-eos/eos/eos_builder.cpp | 12 +++---- singularity-eos/eos/eos_builder.hpp | 8 ++--- singularity-eos/eos/modifiers/ramps_eos.hpp | 4 +-- singularity-eos/eos/singularity_eos.cpp | 38 ++++++++++----------- test/test_eos_unit.cpp | 2 +- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/singularity-eos/eos/eos_builder.cpp b/singularity-eos/eos/eos_builder.cpp index 64ae241bda..7e64464eb9 100644 --- a/singularity-eos/eos/eos_builder.cpp +++ b/singularity-eos/eos/eos_builder.cpp @@ -105,7 +105,7 @@ EOS EOSBuilder::buildEOS(EOSBuilder::EOSType type, EOSBuilder::params_t base_par return makeRelativistic(std::move(g), cl); } return applyShiftAndScaleAndBilinearRamp(std::move(g), scaled, shifted, ramped, scale, - shift, r0, a, b, c); + shift, r0, a, b, c); } #ifdef SPINER_USE_HDF if (type == EOSType::SpinerEOSDependsRhoT || type == EOSType::SpinerEOSDependsRhoSie) { @@ -132,8 +132,8 @@ EOS EOSBuilder::buildEOS(EOSBuilder::EOSType type, EOSBuilder::params_t base_par if (relativistic) { return makeRelativistic(std::move(s), cl); } - return applyShiftAndScaleAndBilinearRamp(std::move(s), scaled, shifted, ramped, scale, - shift, r0, a, b, c); + return applyShiftAndScaleAndBilinearRamp(std::move(s), scaled, shifted, ramped, + scale, shift, r0, a, b, c); } } else { string materialName = mpark::get(base_params["materialName"]); @@ -156,8 +156,8 @@ EOS EOSBuilder::buildEOS(EOSBuilder::EOSType type, EOSBuilder::params_t base_par if (relativistic) { return makeRelativistic(std::move(s), cl); } - return applyShiftAndScaleAndBilinearRamp(std::move(s), scaled, shifted, ramped, scale, - shift, r0, a, b, c); + return applyShiftAndScaleAndBilinearRamp(std::move(s), scaled, shifted, ramped, + scale, shift, r0, a, b, c); } } } @@ -180,7 +180,7 @@ EOS EOSBuilder::buildEOS(EOSBuilder::EOSType type, EOSBuilder::params_t base_par return makeRelativistic(std::move(s), cl); } return applyShiftAndScaleAndBilinearRamp(std::move(s), scaled, shifted, ramped, scale, - shift, r0, a, b, c); + shift, r0, a, b, c); } #endif if (type == EOSType::Gruneisen) { diff --git a/singularity-eos/eos/eos_builder.hpp b/singularity-eos/eos/eos_builder.hpp index 9e52d0be05..25f9a75e20 100644 --- a/singularity-eos/eos/eos_builder.hpp +++ b/singularity-eos/eos/eos_builder.hpp @@ -127,11 +127,11 @@ EOS applyWrappedShiftAndScale(T &&eos, bool scaled, bool shifted, Real scale, Re template EOS applyShiftAndScaleAndBilinearRamp(T &&eos, bool scaled, bool shifted, bool ramped, - Real scale, Real shift, Real r0, Real a, Real b, - Real c) { + Real scale, Real shift, Real r0, Real a, Real b, + Real c) { if (ramped) { - return applyWrappedShiftAndScale(std::forward(eos), scaled, shifted, - scale, shift, r0, a, b, c); + return applyWrappedShiftAndScale( + std::forward(eos), scaled, shifted, scale, shift, r0, a, b, c); } else { return applyShiftAndScale(std::forward(eos), scaled, shifted, scale, shift); } diff --git a/singularity-eos/eos/modifiers/ramps_eos.hpp b/singularity-eos/eos/modifiers/ramps_eos.hpp index e1fc476d2b..b972b6996c 100644 --- a/singularity-eos/eos/modifiers/ramps_eos.hpp +++ b/singularity-eos/eos/modifiers/ramps_eos.hpp @@ -36,8 +36,8 @@ using namespace eos_base; using singularity::robust::ratio; template -void pAlpha2BilinearRampParams(const T &eos, const Real alpha0, const Real Pe, const Real Pc, - Real &r0, Real &a, Real &b, Real &c) { +void pAlpha2BilinearRampParams(const T &eos, const Real alpha0, const Real Pe, + const Real Pc, Real &r0, Real &a, Real &b, Real &c) { // get reference conditions Real rho0, T0, sie0, P0, cv0, bmod0, dpde0, dvdt0; Real rmid, r1; diff --git a/singularity-eos/eos/singularity_eos.cpp b/singularity-eos/eos/singularity_eos.cpp index 7f28ee7cef..ea80b283c5 100644 --- a/singularity-eos/eos/singularity_eos.cpp +++ b/singularity-eos/eos/singularity_eos.cpp @@ -41,9 +41,9 @@ int init_sg_eos(const int nmat, EOS *&eos) { EOSBuilder::applyShiftAndScale(A, enabled[0] == 1, enabled[1] == 1, vals[0], vals[1]) #define SGAPPLYMOD(A) \ - EOSBuilder::applyShiftAndScaleAndBilinearRamp(A, enabled[0] == 1, enabled[1] == 1, \ - enabled[2] == 1 || enabled[3] == 1, vals[0], \ - vals[1], vals[2], vals[3], vals[4], vals[5]) + EOSBuilder::applyShiftAndScaleAndBilinearRamp( \ + A, enabled[0] == 1, enabled[1] == 1, enabled[2] == 1 || enabled[3] == 1, vals[0], \ + vals[1], vals[2], vals[3], vals[4], vals[5]) int def_en[4] = {0, 0, 0, 0}; double def_v[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; @@ -53,8 +53,8 @@ int init_sg_IdealGas(const int matindex, EOS *eos, const double gm1, const doubl assert(matindex >= 0); EOS eosi = SGAPPLYMODSIMPLE(IdealGas(gm1, Cv)); if (enabled[3] == 1) { - singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], vals[3], - vals[4], vals[5]); + singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], + vals[3], vals[4], vals[5]); } EOS eos_ = SGAPPLYMOD(IdealGas(gm1, Cv)); eos[matindex] = eos_.GetOnDevice(); @@ -72,8 +72,8 @@ int init_sg_Gruneisen(const int matindex, EOS *eos, const double C0, const doubl assert(matindex >= 0); EOS eosi = SGAPPLYMODSIMPLE(Gruneisen(C0, s1, s2, s3, G0, b, rho0, T0, P0, Cv)); if (enabled[3] == 1) { - singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], vals[3], - vals[4], vals[5]); + singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], + vals[3], vals[4], vals[5]); } EOS eos_ = SGAPPLYMOD(Gruneisen(C0, s1, s2, s3, G0, b, rho0, T0, P0, Cv)); eos[matindex] = eos_.GetOnDevice(); @@ -94,8 +94,8 @@ int init_sg_JWL(const int matindex, EOS *eos, const double A, const double B, assert(matindex >= 0); EOS eosi = SGAPPLYMODSIMPLE(JWL(A, B, R1, R2, w, rho0, Cv)); if (enabled[3] == 1) { - singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], vals[3], - vals[4], vals[5]); + singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], + vals[3], vals[4], vals[5]); } EOS eos_ = SGAPPLYMOD(JWL(A, B, R1, R2, w, rho0, Cv)); eos[matindex] = eos_.GetOnDevice(); @@ -115,8 +115,8 @@ int init_sg_DavisProducts(const int matindex, EOS *eos, const double a, const do assert(matindex >= 0); EOS eosi = SGAPPLYMODSIMPLE(DavisProducts(a, b, k, n, vc, pc, Cv, E0)); if (enabled[3] == 1) { - singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], vals[3], - vals[4], vals[5]); + singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], + vals[3], vals[4], vals[5]); } EOS eos_ = SGAPPLYMOD(DavisProducts(a, b, k, n, vc, pc, Cv, E0)); eos[matindex] = eos_.GetOnDevice(); @@ -139,8 +139,8 @@ int init_sg_DavisReactants(const int matindex, EOS *eos, const double rho0, EOS eosi = SGAPPLYMODSIMPLE(DavisReactants(rho0, e0, P0, T0, A, B, C, G0, Z, alpha, Cv0)); if (enabled[3] == 1) { - singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], vals[3], - vals[4], vals[5]); + singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], + vals[3], vals[4], vals[5]); } EOS eos_ = SGAPPLYMOD(DavisReactants(rho0, e0, P0, T0, A, B, C, G0, Z, alpha, Cv0)); eos[matindex] = eos_.GetOnDevice(); @@ -163,8 +163,8 @@ int init_sg_SpinerDependsRhoT(const int matindex, EOS *eos, const char *filename assert(matindex >= 0); EOS eosi = SGAPPLYMODSIMPLE(SpinerEOSDependsRhoT(std::string(filename), matid)); if (enabled[3] == 1) { - singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], vals[3], - vals[4], vals[5]); + singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], + vals[3], vals[4], vals[5]); } EOS eos_ = SGAPPLYMOD(SpinerEOSDependsRhoT(std::string(filename), matid)); eos[matindex] = eos_.GetOnDevice(); @@ -182,8 +182,8 @@ int init_sg_SpinerDependsRhoSie(const int matindex, EOS *eos, const char *filena assert(matindex >= 0); EOS eosi = SGAPPLYMODSIMPLE(SpinerEOSDependsRhoSie(std::string(filename), matid)); if (enabled[3] == 1) { - singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], vals[3], - vals[4], vals[5]); + singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], + vals[3], vals[4], vals[5]); } EOS eos_ = SGAPPLYMOD(SpinerEOSDependsRhoSie(std::string(filename), matid)); eos[matindex] = eos_.GetOnDevice(); @@ -201,8 +201,8 @@ int init_sg_eospac(const int matindex, EOS *eos, const int id, int const *const assert(matindex >= 0); EOS eosi = SGAPPLYMODSIMPLE(EOSPAC(id)); if (enabled[3] == 1) { - singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], vals[3], - vals[4], vals[5]); + singularity::pAlpha2BilinearRampParams(eosi, vals[2], vals[3], vals[4], vals[2], + vals[3], vals[4], vals[5]); } EOS eos_ = SGAPPLYMOD(EOSPAC(id)); eos[matindex] = eos_.GetOnDevice(); diff --git a/test/test_eos_unit.cpp b/test/test_eos_unit.cpp index 610d633a55..f7c5fec632 100644 --- a/test/test_eos_unit.cpp +++ b/test/test_eos_unit.cpp @@ -33,10 +33,10 @@ #include +using singularity::BilinearRampEOS; using singularity::EOS; using singularity::Gruneisen; using singularity::IdealGas; -using singularity::BilinearRampEOS; using singularity::ScaledEOS; using singularity::ShiftedEOS;