Skip to content

Commit

Permalink
white space fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gardner48 committed Jan 4, 2024
1 parent a848d58 commit 5efefd4
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 58 deletions.
8 changes: 4 additions & 4 deletions Source/ERF.H
Original file line number Diff line number Diff line change
Expand Up @@ -678,12 +678,12 @@ private:
void readTracersParams();

/*! Initialize tracer and hydro particles */
void initializeTracers ( amrex::ParGDBBase*,
void initializeTracers ( amrex::ParGDBBase*,
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& );
/*! Evolve tracers and hydro particles */
void evolveTracers( int,
amrex::Real,
amrex::Vector<amrex::Vector<amrex::MultiFab>>&,
void evolveTracers( int,
amrex::Real,
amrex::Vector<amrex::Vector<amrex::MultiFab>>&,
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& );

#endif
Expand Down
40 changes: 20 additions & 20 deletions Source/Particles/ERFPC.H
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ struct ERFParticlesAssignor
template <typename P>
AMREX_GPU_HOST_DEVICE
amrex::IntVect operator() ( P const& p,
amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> const& plo,
amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> const& plo,
amrex::GpuArray<amrex::Real,AMREX_SPACEDIM> const& dxi,
const amrex::Box& domain ) const noexcept
{
/* TODO: What is this about? */
amrex::IntVect iv(
amrex::IntVect iv(
AMREX_D_DECL( int(amrex::Math::floor((p.pos(0)-plo[0])*dxi[0])),
int(amrex::Math::floor((p.pos(1)-plo[1])*dxi[1])),
p.idata(ERFParticlesIntIdx::k) ) );
Expand All @@ -72,13 +72,13 @@ class ERFPC : public amrex::ParticleContainer< ERFParticlesRealIdx::ncomps,

/*! Constructor */
ERFPC ( amrex::ParGDBBase* a_gdb,
const std::string& a_name = "particles" )
const std::string& a_name = "particles" )
: amrex::ParticleContainer< ERFParticlesRealIdx::ncomps,
ERFParticlesIntIdx::ncomps,
0,
0,
amrex::DefaultAllocator,
ERFParticlesAssignor> (a_gdb)
ERFParticlesAssignor> (a_gdb)
{
BL_PROFILE("ERFPCPC::ERFPC()");
m_name = a_name;
Expand All @@ -89,7 +89,7 @@ class ERFPC : public amrex::ParticleContainer< ERFParticlesRealIdx::ncomps,
ERFPC ( const amrex::Geometry& a_geom,
const amrex::DistributionMapping& a_dmap,
const amrex::BoxArray& a_ba,
const std::string& a_name = "particles" )
const std::string& a_name = "particles" )
: amrex::ParticleContainer< ERFParticlesRealIdx::ncomps,
ERFParticlesIntIdx::ncomps,
0,
Expand All @@ -106,9 +106,9 @@ class ERFPC : public amrex::ParticleContainer< ERFParticlesRealIdx::ncomps,
virtual void InitializeParticles(const std::unique_ptr<amrex::MultiFab>& a_ptr = nullptr);

/*! Evolve particles for one time step */
virtual void EvolveParticles( int,
amrex::Real,
amrex::Vector<amrex::Vector<amrex::MultiFab>>&,
virtual void EvolveParticles( int,
amrex::Real,
amrex::Vector<amrex::Vector<amrex::MultiFab>>&,
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& );

/*! Get real-type particle attribute names */
Expand All @@ -119,16 +119,16 @@ class ERFPC : public amrex::ParticleContainer< ERFParticlesRealIdx::ncomps,
}

/*! Specify if particles should advect with flow */
inline void setAdvectWithFlow (bool a_flag)
{
inline void setAdvectWithFlow (bool a_flag)
{
BL_PROFILE("ERFPCPC::setAdvectWithFlow()");
m_advect_w_flow = a_flag;
m_advect_w_flow = a_flag;
}
/*! Specify if particles fall under gravity */
inline void setAdvectWithGravity (bool a_flag)
{
inline void setAdvectWithGravity (bool a_flag)
{
BL_PROFILE("ERFPCPC::setAdvectWithGravity()");
m_advect_w_gravity = a_flag;
m_advect_w_gravity = a_flag;
}

protected:
Expand All @@ -137,7 +137,7 @@ class ERFPC : public amrex::ParticleContainer< ERFParticlesRealIdx::ncomps,
bool m_advect_w_gravity; /*!< advect under gravitational force */

std::string m_name; /*!< name of this particle species */

std::string m_initialization_type; /*!< initial particle distribution type */
int m_ppc_init; /*!< initial number of particles per cell */

Expand All @@ -148,14 +148,14 @@ class ERFPC : public amrex::ParticleContainer< ERFParticlesRealIdx::ncomps,
void initializeParticlesUniformDistribution(const std::unique_ptr<amrex::MultiFab>& a_ptr = nullptr);

/*! Uses midpoint method to advance particles using flow velocity. */
void AdvectWithFlow( amrex::MultiFab*,
int,
amrex::Real,
void AdvectWithFlow( amrex::MultiFab*,
int,
amrex::Real,
const std::unique_ptr<amrex::MultiFab>& );

/*! Uses midpoint method to advance particles falling under gravity. */
void AdvectWithGravity( int,
amrex::Real,
void AdvectWithGravity( int,
amrex::Real,
const std::unique_ptr<amrex::MultiFab>& );

private:
Expand Down
10 changes: 5 additions & 5 deletions Source/Particles/ERFPCEvolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ void ERFPC::EvolveParticles( int a_lev,
}

/*! Uses midpoint method to advance particles using flow velocity. */
void ERFPC::AdvectWithFlow( MultiFab* a_umac,
int a_lev,
Real a_dt,
void ERFPC::AdvectWithFlow( MultiFab* a_umac,
int a_lev,
Real a_dt,
const std::unique_ptr<MultiFab>& a_z_height )
{
BL_PROFILE("ERFPCPC::AdvectWithUmac()");
Expand Down Expand Up @@ -163,8 +163,8 @@ void ERFPC::AdvectWithFlow( MultiFab* a_umac,
}
}

void ERFPC::AdvectWithGravity( int a_lev,
Real a_dt,
void ERFPC::AdvectWithGravity( int a_lev,
Real a_dt,
const std::unique_ptr<MultiFab>& a_z_height )
{
BL_PROFILE("ERFPC::AdvectWithGravity()");
Expand Down
18 changes: 9 additions & 9 deletions Source/Particles/ERFPCInitializations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ void ERFPC::initializeParticlesDefaultTracersWoA(const std::unique_ptr<amrex::Mu

Real x = plo[0] + (iv[0] + r[0])*dx[0];
Real y = plo[1] + (iv[1] + r[1])*dx[1];
Real z = (*height_ptr)(iv)
+ r[2] * ( (*height_ptr)(iv + IntVect(AMREX_D_DECL(0, 0, 1)))
Real z = (*height_ptr)(iv)
+ r[2] * ( (*height_ptr)(iv + IntVect(AMREX_D_DECL(0, 0, 1)))
- (*height_ptr)(iv) );

ParticleType p;
Expand Down Expand Up @@ -200,14 +200,14 @@ void ERFPC::initializeParticlesDefaultHydro(const std::unique_ptr<amrex::MultiFa
#endif
for (IntVect iv = tile_box.smallEnd(); iv <= tile_box.bigEnd(); tile_box.next(iv)) {
// This is a random choice to put them above the ground and let them fall
if (iv[2] == 13) {
if (iv[2] == 13) {
Real r[3] = {0.5, 0.5, 0.5}; // this means place at cell center
Real v[3] = {0.0, 0.0, 0.0}; // with 0 initial velocity

Real x = plo[0] + (iv[0] + r[0])*dx[0];
Real y = plo[1] + (iv[1] + r[1])*dx[1];
Real z = (*height_ptr)(iv)
+ r[2]*( (*height_ptr)(iv + IntVect(AMREX_D_DECL(0, 0, 1)))
Real z = (*height_ptr)(iv)
+ r[2]*( (*height_ptr)(iv + IntVect(AMREX_D_DECL(0, 0, 1)))
- (*height_ptr)(iv) );

ParticleType p;
Expand All @@ -233,7 +233,7 @@ void ERFPC::initializeParticlesDefaultHydro(const std::unique_ptr<amrex::MultiFa

for (IntVect iv = tile_box.smallEnd(); iv <= tile_box.bigEnd(); tile_box.next(iv)) {
// This is a random choice to put them above the ground and let them fall
if (iv[2] == 23) {
if (iv[2] == 23) {
Real r[3] = {0.5, 0.5, 0.5}; // this means place at cell center
Real v[3] = {0.0, 0.0, 0.0}; // with 0 initial velocity

Expand Down Expand Up @@ -275,7 +275,7 @@ void ERFPC::initializeParticlesDefaultHydro(const std::unique_ptr<amrex::MultiFa
}
}

/*! Uniform distribution: the number of particles per grid cell is specified
/*! Uniform distribution: the number of particles per grid cell is specified
* by "initial_particles_per_cell", and they are randomly distributed. */
void ERFPC::initializeParticlesUniformDistribution(const std::unique_ptr<amrex::MultiFab>& a_height_ptr)
{
Expand Down Expand Up @@ -316,8 +316,8 @@ void ERFPC::initializeParticlesUniformDistribution(const std::unique_ptr<amrex::

Real x = plo[0] + (iv[0] + r[0])*dx[0];
Real y = plo[1] + (iv[1] + r[1])*dx[1];
Real z = (*height_ptr)(iv)
+ r[2] * ( (*height_ptr)(iv + IntVect(AMREX_D_DECL(0, 0, 1)))
Real z = (*height_ptr)(iv)
+ r[2] * ( (*height_ptr)(iv + IntVect(AMREX_D_DECL(0, 0, 1)))
- (*height_ptr)(iv) );

ParticleType p;
Expand Down
12 changes: 6 additions & 6 deletions Source/Particles/ERFTracers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ void ERF::evolveTracers( int a_lev,
const Vector<std::unique_ptr<MultiFab>>& a_z_phys_nd )
{
if (m_use_tracer_particles) {
particleData[ERFParticleNames::tracers]->EvolveParticles( a_lev,
a_dt_lev,
a_vars_new,
particleData[ERFParticleNames::tracers]->EvolveParticles( a_lev,
a_dt_lev,
a_vars_new,
a_z_phys_nd );
}
if (m_use_hydro_particles) {
particleData[ERFParticleNames::hydro]->EvolveParticles( a_lev,
a_dt_lev,
a_vars_new,
particleData[ERFParticleNames::hydro]->EvolveParticles( a_lev,
a_dt_lev,
a_vars_new,
a_z_phys_nd );
}
return;
Expand Down
28 changes: 14 additions & 14 deletions Source/Particles/ParticleData.H
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ class ParticleData
}

/*! Get species of a given name */
inline ERFPC* GetSpecies( const std::string& a_name )
inline ERFPC* GetSpecies( const std::string& a_name )
{
BL_PROFILE("ParticleData::GetSpecies()");
ParticleSpeciesMap::iterator it (m_particle_species.find(a_name));
if (it == m_particle_species.end()) {
amrex::Print() << "ERROR: unable to fine particle species with name \""
amrex::Print() << "ERROR: unable to fine particle species with name \""
<< a_name << "\"!";
return nullptr;
} else {
Expand All @@ -103,7 +103,7 @@ class ParticleData
BL_PROFILE("ParticleData::operator[]");
ParticleSpeciesMap::iterator it (m_particle_species.find(a_name));
if (it == m_particle_species.end()) {
amrex::Print() << "ERROR: unable to fine particle species with name \""
amrex::Print() << "ERROR: unable to fine particle species with name \""
<< a_name << "\"!";
return nullptr;
} else {
Expand All @@ -117,7 +117,7 @@ class ParticleData
BL_PROFILE("ParticleData::GetSpecies()");
ParticleSpeciesMap::const_iterator it (m_particle_species.find(a_name));
if (it == m_particle_species.end()) {
amrex::Print() << "ERROR: unable to fine particle species with name \""
amrex::Print() << "ERROR: unable to fine particle species with name \""
<< a_name << "\"!";
return nullptr;
} else {
Expand All @@ -126,12 +126,12 @@ class ParticleData
}

/*! accessor */
inline const ERFPC* operator[] ( const std::string& a_name ) const
inline const ERFPC* operator[] ( const std::string& a_name ) const
{
BL_PROFILE("ParticleData::operator[]");
ParticleSpeciesMap::const_iterator it (m_particle_species.find(a_name));
if (it == m_particle_species.end()) {
amrex::Print() << "ERROR: unable to fine particle species with name \""
amrex::Print() << "ERROR: unable to fine particle species with name \""
<< a_name << "\"!";
return nullptr;
} else {
Expand All @@ -157,21 +157,21 @@ class ParticleData
}

/*! Returns list of names of particle species */
inline const ParticlesNamesVector& getNames() const
{
inline const ParticlesNamesVector& getNames() const
{
BL_PROFILE("ParticleData::getNames()");
return m_namelist;
return m_namelist;
}

/*! Returns list of names of particle species that are unallocated */
inline ParticlesNamesList& getNamesUnalloc()
{
inline ParticlesNamesList& getNamesUnalloc()
{
BL_PROFILE("ParticleData::getNamesUnalloc()");
return m_namelist_unalloc;
return m_namelist_unalloc;
}

/*! queries if containe has species of a certain name */
inline bool contains( const std::string& a_name ) const
inline bool contains( const std::string& a_name ) const
{
BL_PROFILE("ParticleData::contains()");
ParticleSpeciesMap::const_iterator it (m_particle_species.find(a_name));
Expand All @@ -189,7 +189,7 @@ class ParticleData
private:

/*! Vector of all particle species */
ParticleSpeciesMap m_particle_species;
ParticleSpeciesMap m_particle_species;
/*! Vector of particle species names */
ParticlesNamesVector m_namelist;
/*! List with names of unallocated species */
Expand Down

0 comments on commit 5efefd4

Please sign in to comment.