Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,4 @@ jobs:
echo "::add-matcher::${{ github.workspace }}/PeleC/.github/problem-matchers/gcc.json"
cat clang-tidy-warnings.txt
export return=$(tail -n 1 clang-tidy-warnings.txt | awk '{print $2}')
exit ${return}
exit ${return}
10 changes: 7 additions & 3 deletions Source/Spray/SprayInterpolation.H
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ InterpolateGasPhase(
const amrex::IntVect* indx_array,
const amrex::Real* weights,
const pele::physics::eos::EosParm<pele::physics::PhysicsType::eos_type>*
eosparm = nullptr)
eosparm = nullptr,
const SprayData* spray = nullptr)
{
auto eos = pele::physics::PhysicsType::eos(eosparm);
#ifdef PELELM_USE_SPRAY
Expand Down Expand Up @@ -164,11 +165,14 @@ InterpolateGasPhase(
// from the manifold table. We already have the interpolated value of manifold
// variables at the spray particle location stored in 'mass_frac'. I just need
// to call GenericReadManifoldData
#ifndef USE_MANIFOLD_EOS
amrex::ignore_unused(spray);
#endif

#ifdef USE_MANIFOLD_EOS
for (int n = 0; n < SPRAY_FUEL_NUM; n++) {
amrex::Real tempval;
eos.Y2ChemSpecies(
mass_frac.data(), SprayParticleContainer::d_sprayData->indx[n], tempval);
eos.Y2ChemSpecies(mass_frac.data(), spray->indx[n], tempval);
gpv.Yspec_fluid[n] = tempval;
}
#endif
Expand Down
6 changes: 4 additions & 2 deletions Source/Spray/SprayParticles.H
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ public:

static void SprayCleanUp()
{
delete m_sprayData;
amrex::The_Arena()->free(d_sprayData);
// delete m_sprayData;
// amrex::The_Arena()->free(d_sprayData);
d_sprayData = nullptr;
m_sprayData = nullptr;
}

/// \brief Generalized injection routine for a single SprayJet
Expand Down
2 changes: 1 addition & 1 deletion Source/Spray/SprayParticles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ SprayParticleContainer::updateParticles(
gpv.reset();
InterpolateGasPhase(
gpv, state_box, rhoarr, rhoYarr, Tarr, momarr, engarr,
indx_array.data(), weights.data(), fdat->eosparm);
indx_array.data(), weights.data(), fdat->eosparm, fdat);
// Solve for avg mw and pressure at droplet location
fdat->calcBoilT(gpv, cBoilT.data());
if (is_film) {
Expand Down
7 changes: 5 additions & 2 deletions Source/Spray/SpraySetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ SprayParticleContainer::readSprayParams(int& particle_verbose)
<< std::endl;
#endif
m_sprayData = new SprayData{};
d_sprayData =
static_cast<SprayData*>(amrex::The_Arena()->alloc(sizeof(SprayData)));
// d_sprayData =
// static_cast<SprayData*>(amrex::The_Arena()->alloc(sizeof(SprayData)));
d_sprayData = static_cast<SprayData*>(
amrex::The_Device_Arena()->alloc(sizeof(SprayData)));

ParmParse pp("particles");
// Control the verbosity of the Particle class
pp.query("v", particle_verbose);
Expand Down
Loading