Skip to content

Commit

Permalink
removed unnecessary species call in soret term
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Howarth committed Sep 18, 2024
1 parent 3c7d3ed commit cea2e63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion Source/PeleLMeX.H
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,6 @@ public:
a_spfluxes,
const amrex::Vector<amrex::Array<amrex::MultiFab*, AMREX_SPACEDIM>>&
a_spsoretfluxes,
amrex::Vector<amrex::MultiFab const*> const& a_spec,
amrex::Vector<amrex::MultiFab const*> const& a_temp,
amrex::Vector<amrex::MultiFab const*> const& a_beta);

Expand Down
11 changes: 3 additions & 8 deletions Source/PeleLMeX_Diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ PeleLM::correctIsothermalBoundary(
}
}
addSoretTerm(
soretfluxes, soretfluxes, GetVecOfConstPtrs(getSpeciesVect(a_time)),
GetVecOfConstPtrs(getTempVect(a_time)),
soretfluxes, soretfluxes, GetVecOfConstPtrs(getTempVect(a_time)),
GetVecOfConstPtrs(getDiffusivityVect(a_time)));
} else { // have the lagged ones, alias to to them
for (int lev = 0; lev <= finest_level; lev++) {
Expand Down Expand Up @@ -472,13 +471,11 @@ PeleLM::computeDifferentialDiffusionFluxes(
int need_soret_fluxes = (a_soretfluxes.empty()) ? 0 : 1;
if (need_soret_fluxes == 0) {
addSoretTerm(
a_fluxes, {}, GetVecOfConstPtrs(getSpeciesVect(a_time)),
GetVecOfConstPtrs(getTempVect(a_time)),
a_fluxes, {}, GetVecOfConstPtrs(getTempVect(a_time)),
GetVecOfConstPtrs(getDiffusivityVect(a_time)));
} else {
addSoretTerm(
a_fluxes, a_soretfluxes, GetVecOfConstPtrs(getSpeciesVect(a_time)),
GetVecOfConstPtrs(getTempVect(a_time)),
a_fluxes, a_soretfluxes, GetVecOfConstPtrs(getTempVect(a_time)),
GetVecOfConstPtrs(getDiffusivityVect(a_time)));
}
}
Expand Down Expand Up @@ -737,7 +734,6 @@ void
PeleLM::addSoretTerm(
const Vector<Array<MultiFab*, AMREX_SPACEDIM>>& a_spfluxes,
const Vector<Array<MultiFab*, AMREX_SPACEDIM>>& a_spsoretfluxes,
Vector<MultiFab const*> const& a_spec,
Vector<MultiFab const*> const& a_temp,
Vector<MultiFab const*> const& a_beta)
{
Expand Down Expand Up @@ -833,7 +829,6 @@ PeleLM::addSoretTerm(
ebx, [need_soret_fluxes, gradT_ar, beta_ar, T, spFlux_ar, domain,

Check warning on line 829 in Source/PeleLMeX_Diffusion.cpp

View workflow job for this annotation

GitHub Actions / CPU-CMake (macos-latest, Release, EB-ON)

lambda capture 'domain' is not used [-Wunused-lambda-capture]
spsoretFlux_ar, phys_bc = m_phys_bc,

Check warning on line 830 in Source/PeleLMeX_Diffusion.cpp

View workflow job for this annotation

GitHub Actions / CPU-CMake (macos-latest, Release, EB-ON)

lambda capture 'phys_bc' is not used [-Wunused-lambda-capture]
dev] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {

Check warning on line 831 in Source/PeleLMeX_Diffusion.cpp

View workflow job for this annotation

GitHub Actions / CPU-CMake (macos-latest, Release, EB-ON)

lambda capture 'dev' is not used [-Wunused-lambda-capture]
int idx[3] = {i, j, k};
for (int n = 0; n < NUM_SPECIES; n++) {
spFlux_ar(i, j, k, n) -=
beta_ar(i, j, k, n) * gradT_ar(i, j, k) / T(i, j, k);
Expand Down

0 comments on commit cea2e63

Please sign in to comment.