Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
howarth1 committed Jan 21, 2025
1 parent a8718d2 commit 8ac123f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
9 changes: 5 additions & 4 deletions Source/PeleLMeX_Setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,11 @@ PeleLM::readParameters()
// Assume conservative
m_AdvTypeAux[n] = 1;
m_aux_Schmidt[n] = -1.0;
ppa.query("Schmidt",m_aux_Schmidt[n]);
ppa.query("Schmidt", m_aux_Schmidt[n]);
if (m_aux_Schmidt[n] < 0) {
m_DiffTypeAux[n] = 0;
m_DiffTypeAux[n] = 0;
} else {
m_DiffTypeAux[n] = 1;
m_DiffTypeAux[n] = 1;
}
}
}
Expand Down Expand Up @@ -951,7 +951,8 @@ PeleLM::variablesSetup()
Print() << " Auxiliary " + std::to_string(n + 1) + ": " << m_aux_names[n]
<< "\n";
if (m_aux_Schmidt[n] < 0) {
Print() << " Did not specify Schmidt number - assuming no diffusivity" << "\n";
Print() << " Did not specify Schmidt number - assuming no diffusivity"
<< "\n";
}
}
Print() << " => Total number of auxiliary variables: " << m_nAux << "\n";
Expand Down
17 changes: 9 additions & 8 deletions Source/PeleLMeX_TransportProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,14 @@ PeleLM::calcDiffusivity(const TimeStamp& a_time)
{
BL_PROFILE("PeleLMeX::calcDiffusivity()");


const amrex::Real Pr_inv = m_Prandtl_inv;
const amrex::Real Le_inv = m_Lewis_inv;
const bool do_fixed_Le = (m_fixed_Le != 0);
const bool do_fixed_Pr = (m_fixed_Pr != 0);
const bool do_soret = (m_use_soret != 0);
// pass soret array, or pass mu as dummy (won't do anything)
const int soret_idx = do_soret ? 1 : 0;
const int soret_idx = do_soret ? 1 : 0;

for (int lev = 0; lev <= finest_level; ++lev) {

auto* ldata_p = getLevelDataPtr(lev, a_time);
Expand Down Expand Up @@ -333,17 +332,19 @@ PeleLM::calcDiffusivity(const TimeStamp& a_time)
Array4<Real>(kma[box_no], 0));
#endif
});

// Fill the diff_aux MF with specified Schmidt number
for (int n = 0; n < m_nAux; n++) {
if (m_aux_Schmidt[n] > 0) {
MultiFab::Copy(ldata_p->diff_aux_cc,ldata_p->diff_cc,NUM_SPECIES + 1, n, 1, ldata_p->diff_cc.nGrowVect());
ldata_p->diff_aux_cc.mult(1.0/m_aux_Schmidt[n],n,1,ldata_p->diff_cc.nGrow());
MultiFab::Copy(
ldata_p->diff_aux_cc, ldata_p->diff_cc, NUM_SPECIES + 1, n, 1,
ldata_p->diff_cc.nGrowVect());
ldata_p->diff_aux_cc.mult(
1.0 / m_aux_Schmidt[n], n, 1, ldata_p->diff_cc.nGrow());
} else {
ldata_p->diff_aux_cc.setVal(0.0,n,1);
ldata_p->diff_aux_cc.setVal(0.0, n, 1);
}
}

}
Gpu::streamSynchronize();
}
Expand Down

0 comments on commit 8ac123f

Please sign in to comment.