Skip to content

Commit

Permalink
fix gmake compilation and clean up particle stuff (#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren authored Mar 20, 2024
1 parent 24e4a9a commit 8b67153
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 5 additions & 2 deletions Source/Initialization/Make.package
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ CEXE_sources += ERF_init_uniform.cpp
CEXE_sources += ERF_init_from_hse.cpp
CEXE_sources += ERF_init_custom.cpp
CEXE_sources += ERF_init_from_input_sounding.cpp
CEXE_sources += ERF_init_bcs.cpp
CEXE_sources += ERF_init1d.cpp

ifeq ($(USE_WINDFARM),TRUE)
CEXE_sources += ERF_init_windfarm.cpp
endif

CEXE_headers += InputSoundingData.H
CEXE_sources += ERF_init_bcs.cpp
CEXE_sources += ERF_init1d.cpp

ifeq ($(USE_NETCDF),TRUE)
CEXE_headers += Metgrid_utils.H
Expand Down
2 changes: 1 addition & 1 deletion Source/Particles/ERFPC.H
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class ERFPC : public amrex::ParticleContainer< ERFParticlesRealIdxAoS::ncomps,
bool m_advect_w_flow; /*!< advect with flow velocity */
bool m_advect_w_gravity; /*!< advect under gravitational force */

amrex::RealBox particle_box;
amrex::RealBox m_particle_box;
bool place_randomly_in_cells;

std::string m_name; /*!< name of this particle species */
Expand Down
6 changes: 3 additions & 3 deletions Source/Particles/ERFPCInitializations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ void ERFPC::readInputs ()
pp.queryAdd("particle_box_hi", particle_box_hi, AMREX_SPACEDIM);
AMREX_ASSERT(particle_box_hi.size() == AMREX_SPACEDIM);

particle_box.setLo(particle_box_lo);
particle_box.setHi(particle_box_hi);
m_particle_box.setLo(particle_box_lo);
m_particle_box.setHi(particle_box_hi);

// We default to placing the particles randomly within each cell,
// but can override this for regression testing
Expand Down Expand Up @@ -60,7 +60,7 @@ void ERFPC::InitializeParticles (const std::unique_ptr<MultiFab>& a_height_ptr)
if (m_initialization_type == ERFParticleInitializations::init_default) {
initializeParticlesDefault( a_height_ptr );
} else if (m_initialization_type == ERFParticleInitializations::init_box) {
initializeParticlesUniformDistributionInBox( a_height_ptr , particle_box );
initializeParticlesUniformDistributionInBox( a_height_ptr , m_particle_box );
} else if (m_initialization_type == ERFParticleInitializations::init_uniform) {
initializeParticlesUniformDistribution( a_height_ptr );
} else {
Expand Down

0 comments on commit 8b67153

Please sign in to comment.