diff --git a/Source/ERF.H b/Source/ERF.H index 7170ca0c9..c7dcb83fa 100644 --- a/Source/ERF.H +++ b/Source/ERF.H @@ -678,12 +678,12 @@ private: void readTracersParams(); /*! Initialize tracer and hydro particles */ - void initializeTracers ( amrex::ParGDBBase*, + void initializeTracers ( amrex::ParGDBBase*, const amrex::Vector>& ); /*! Evolve tracers and hydro particles */ - void evolveTracers( int, - amrex::Real, - amrex::Vector>&, + void evolveTracers( int, + amrex::Real, + amrex::Vector>&, const amrex::Vector>& ); #endif diff --git a/Source/Particles/ERFPC.H b/Source/Particles/ERFPC.H index 6a8be3542..2de337549 100644 --- a/Source/Particles/ERFPC.H +++ b/Source/Particles/ERFPC.H @@ -46,12 +46,12 @@ struct ERFParticlesAssignor template AMREX_GPU_HOST_DEVICE amrex::IntVect operator() ( P const& p, - amrex::GpuArray const& plo, + amrex::GpuArray const& plo, amrex::GpuArray 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) ) ); @@ -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; @@ -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, @@ -106,9 +106,9 @@ class ERFPC : public amrex::ParticleContainer< ERFParticlesRealIdx::ncomps, virtual void InitializeParticles(const std::unique_ptr& a_ptr = nullptr); /*! Evolve particles for one time step */ - virtual void EvolveParticles( int, - amrex::Real, - amrex::Vector>&, + virtual void EvolveParticles( int, + amrex::Real, + amrex::Vector>&, const amrex::Vector>& ); /*! Get real-type particle attribute names */ @@ -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: @@ -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 */ @@ -148,14 +148,14 @@ class ERFPC : public amrex::ParticleContainer< ERFParticlesRealIdx::ncomps, void initializeParticlesUniformDistribution(const std::unique_ptr& 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& ); /*! Uses midpoint method to advance particles falling under gravity. */ - void AdvectWithGravity( int, - amrex::Real, + void AdvectWithGravity( int, + amrex::Real, const std::unique_ptr& ); private: diff --git a/Source/Particles/ERFPCEvolve.cpp b/Source/Particles/ERFPCEvolve.cpp index c46a759d5..2d7270d2e 100644 --- a/Source/Particles/ERFPCEvolve.cpp +++ b/Source/Particles/ERFPCEvolve.cpp @@ -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& a_z_height ) { BL_PROFILE("ERFPCPC::AdvectWithUmac()"); @@ -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& a_z_height ) { BL_PROFILE("ERFPC::AdvectWithGravity()"); diff --git a/Source/Particles/ERFPCInitializations.cpp b/Source/Particles/ERFPCInitializations.cpp index 3efc4a426..45626dcac 100644 --- a/Source/Particles/ERFPCInitializations.cpp +++ b/Source/Particles/ERFPCInitializations.cpp @@ -97,8 +97,8 @@ void ERFPC::initializeParticlesDefaultTracersWoA(const std::unique_ptr& a_height_ptr) { @@ -316,8 +316,8 @@ void ERFPC::initializeParticlesUniformDistribution(const std::unique_ptr>& 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; diff --git a/Source/Particles/ParticleData.H b/Source/Particles/ParticleData.H index 229b7da70..df508d777 100644 --- a/Source/Particles/ParticleData.H +++ b/Source/Particles/ParticleData.H @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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)); @@ -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 */