Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
dholladay00 committed Jul 6, 2022
1 parent 5cbc54b commit 2ae3f16
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
12 changes: 6 additions & 6 deletions singularity-eos/eos/eos_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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<string>(base_params["materialName"]);
Expand All @@ -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);
}
}
}
Expand All @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions singularity-eos/eos/eos_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ EOS applyWrappedShiftAndScale(T &&eos, bool scaled, bool shifted, Real scale, Re

template <typename T>
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<T, BilinearRampEOS>(std::forward<T>(eos), scaled, shifted,
scale, shift, r0, a, b, c);
return applyWrappedShiftAndScale<T, BilinearRampEOS>(
std::forward<T>(eos), scaled, shifted, scale, shift, r0, a, b, c);
} else {
return applyShiftAndScale(std::forward<T>(eos), scaled, shifted, scale, shift);
}
Expand Down
4 changes: 2 additions & 2 deletions singularity-eos/eos/modifiers/ramps_eos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ using namespace eos_base;
using singularity::robust::ratio;

template <typename T>
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;
Expand Down
38 changes: 19 additions & 19 deletions singularity-eos/eos/singularity_eos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/test_eos_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@

#include <test/eos_unit_test_helpers.hpp>

using singularity::BilinearRampEOS;
using singularity::EOS;
using singularity::Gruneisen;
using singularity::IdealGas;
using singularity::BilinearRampEOS;
using singularity::ScaledEOS;
using singularity::ShiftedEOS;

Expand Down

0 comments on commit 2ae3f16

Please sign in to comment.