Skip to content

Commit

Permalink
tidy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshsawant committed Jan 29, 2025
1 parent 5f5ac90 commit 0c17c51
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Source/FillPatchOps.H
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public:
, m_bcs(bcs)
, m_op(std::move(bc_op))
, m_f(f_)
, isAnEnergyLattice(isAnEnergyLattice_)
, m_isAnEnergyLattice(isAnEnergyLattice_)
{}

// compute a new multifab by coping in phi from valid region and filling
Expand Down Expand Up @@ -136,7 +136,7 @@ protected:
amrex::Vector<amrex::MultiFab>& m_f;
// amrex::Vector<amrex::MultiFab>& m_g;

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
amrex::Interpolater* m_mapper = &amrex::cell_cons_interp;
bool isAnEnergyLattice;
bool m_isAnEnergyLattice;
};
} // namespace lbm
#endif
4 changes: 2 additions & 2 deletions Source/IC.H
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ struct ViscosityTest
DeviceOp m_op;
};

struct thermalDiffusivityTest
struct ThermalDiffusivityTest
{
struct DeviceOp
{
Expand Down Expand Up @@ -379,7 +379,7 @@ struct thermalDiffusivityTest

using DeviceType = DeviceOp;

explicit thermalDiffusivityTest();
explicit ThermalDiffusivityTest();

static std::string identifier() { return "ic_thermalDiffusivityTest"; }

Expand Down
2 changes: 1 addition & 1 deletion Source/IC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ViscosityTest::ViscosityTest()
}
}

thermalDiffusivityTest::thermalDiffusivityTest()
ThermalDiffusivityTest::ThermalDiffusivityTest()
{
amrex::ParmParse pp(identifier());
pp.query("density", m_op.density);
Expand Down
22 changes: 11 additions & 11 deletions Source/LBM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ void LBM::macrodata_to_equilibrium_d3_q27(const int lev)
amrex::Real omega_one =
1.0 /
(alpha / (specific_gas_constant * temperature * dt) + 0.5);
amrex::Real omega_oneByOmega = omega_one / omega;
amrex::Real omega_one_by_omega = omega_one / omega;
amrex::Real omega_corr = (2.0 - omega) / (2.0 * omega * rho);

amrex::Real pxx_ext =
Expand All @@ -852,7 +852,7 @@ void LBM::macrodata_to_equilibrium_d3_q27(const int lev)
dt * (omega_corr)*d_arr(iv, constants::D_Q_CORR_Z_IDX);
}

set_extended_equilibrium_value_D3Q27(
set_extended_equilibrium_value_d3_q27(
rho, vel, pxx_ext, pyy_ext, pzz_ext, l_mesh_speed, wt, ev,
eq_arr(iv, q));

Expand Down Expand Up @@ -884,25 +884,25 @@ void LBM::macrodata_to_equilibrium_d3_q27(const int lev)
AMREX_3D_ONLY(
const amrex::Real qz = md_arr(iv, constants::QZ_IDX));

qxEq *= omega_oneByOmega;
qyEq *= omega_oneByOmega;
AMREX_3D_ONLY(qzEq *= omega_oneByOmega);
qxEq *= omega_one_by_omega;
qyEq *= omega_one_by_omega;
AMREX_3D_ONLY(qzEq *= omega_one_by_omega);

qxEq += (1.0 - omega_oneByOmega) *
qxEq += (1.0 - omega_one_by_omega) *
(qx AMREX_D_TERM(
-2.0 * vel[0] * pxx, -2.0 * vel[1] * pxy,
-2.0 * vel[2] * pxz) -
vel[0] * dt * d_arr(iv, constants::D_Q_CORR_X_IDX));

qyEq += (1.0 - omega_oneByOmega) *
qyEq += (1.0 - omega_one_by_omega) *
(qy AMREX_D_TERM(
-2.0 * vel[0] * pxy, -2.0 * vel[1] * pyy,
-2.0 * vel[2] * pyz) -
vel[1] * dt * d_arr(iv, constants::D_Q_CORR_Y_IDX));

AMREX_3D_ONLY(
qzEq +=
(1.0 - omega_oneByOmega) *
(1.0 - omega_one_by_omega) *
(qz - 2.0 * vel[0] * pxz - 2.0 * vel[1] * pyz -
2.0 * vel[2] * pzz -
vel[2] * dt * d_arr(iv, constants::D_Q_CORR_Z_IDX)));
Expand Down Expand Up @@ -1716,10 +1716,10 @@ void LBM::set_ics()
} else if (m_ic_type == "viscosityTest") {
m_ic_op = std::make_unique<ic::Initializer<ic::ViscosityTest>>(
m_mesh_speed, ic::ViscosityTest(ic::ViscosityTest()), m_f, m_g);
} else if (m_ic_type == "thermalDiffusivityTest") {
m_ic_op = std::make_unique<ic::Initializer<ic::thermalDiffusivityTest>>(
} else if (m_ic_type == "ThermalDiffusivityTest") {
m_ic_op = std::make_unique<ic::Initializer<ic::ThermalDiffusivityTest>>(
m_mesh_speed,
ic::thermalDiffusivityTest(ic::thermalDiffusivityTest()), m_f, m_g);
ic::ThermalDiffusivityTest(ic::ThermalDiffusivityTest()), m_f, m_g);
} else if (m_ic_type == "sodTest") {
m_ic_op = std::make_unique<ic::Initializer<ic::SodTest>>(
m_mesh_speed, ic::SodTest(ic::SodTest()), m_f, m_g);
Expand Down
2 changes: 1 addition & 1 deletion Source/Utilities.H
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ AMREX_GPU_DEVICE AMREX_INLINE void set_equilibrium_value_d3_q27(
eq = rho * phix * phiy * phiz;
}

AMREX_GPU_DEVICE AMREX_INLINE void set_extended_equilibrium_value_D3Q27(
AMREX_GPU_DEVICE AMREX_INLINE void set_extended_equilibrium_value_d3_q27(
const amrex::Real& rho,
const amrex::RealVect& vel,
const amrex::Real& pxx,
Expand Down

0 comments on commit 0c17c51

Please sign in to comment.