IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
LoadBalancer< T, Dim > Class Template Reference

#include <LoadBalancer.hpp>

Collaboration diagram for LoadBalancer< T, Dim >:

Public Member Functions

 LoadBalancer (double lbs, std::shared_ptr< FieldContainer< T, Dim > > &fc, std::shared_ptr< ParticleContainer< T, Dim > > &pc, std::shared_ptr< FieldSolver_t > &fs)
 ~LoadBalancer ()
double getLoadBalanceThreshold () const
void setLoadBalanceThreshold (double threshold)
Field_t< Dim > * getRho () const
void setRho (Field_t< Dim > *rho)
VField_t< T, Dim > * getE () const
void setE (VField_t< T, Dim > *E)
Field< T, Dim > * getPhi ()
void setPhi (Field< T, Dim > *phi)
std::shared_ptr< ParticleContainer< T, Dim > > getParticleContainer () const
void setParticleContainer (std::shared_ptr< ParticleContainer< T, Dim > > pc)
std::shared_ptr< FieldSolver_tgetFieldSolver () const
void setFieldSolver (std::shared_ptr< FieldSolver_t > fs)
void updateLayout (ippl::FieldLayout< Dim > *fl, ippl::UniformCartesian< T, Dim > *mesh, bool &isFirstRepartition)
void initializeORB (ippl::FieldLayout< Dim > *fl, ippl::UniformCartesian< T, Dim > *mesh)
void repartition (ippl::FieldLayout< Dim > *fl, ippl::UniformCartesian< T, Dim > *mesh, bool &isFirstRepartition)
bool balance (size_type totalP, const unsigned int nstep)

Private Types

using Base = ippl::ParticleBase<ippl::ParticleSpatialLayout<T, Dim>>
using FieldSolver_t = ippl::FieldSolverBase<T, Dim>

Private Attributes

double loadbalancethreshold_m
Field_t< Dim > * rho_m
VField_t< T, Dim > * E_m
Field< T, Dim > * phi_m
std::shared_ptr< ParticleContainer< T, Dim > > pc_m
std::shared_ptr< FieldSolver_tfs_m
unsigned int loadbalancefreq_m
ORB< T, Dimorb

Detailed Description

template<typename T, unsigned Dim>
class LoadBalancer< T, Dim >

Definition at line 9 of file LoadBalancer.hpp.

Member Typedef Documentation

◆ Base

template<typename T, unsigned Dim>
using LoadBalancer< T, Dim >::Base = ippl::ParticleBase<ippl::ParticleSpatialLayout<T, Dim>>
private

Definition at line 10 of file LoadBalancer.hpp.

◆ FieldSolver_t

template<typename T, unsigned Dim>
using LoadBalancer< T, Dim >::FieldSolver_t = ippl::FieldSolverBase<T, Dim>
private

Definition at line 11 of file LoadBalancer.hpp.

Constructor & Destructor Documentation

◆ LoadBalancer()

template<typename T, unsigned Dim>
LoadBalancer< T, Dim >::LoadBalancer ( double lbs,
std::shared_ptr< FieldContainer< T, Dim > > & fc,
std::shared_ptr< ParticleContainer< T, Dim > > & pc,
std::shared_ptr< FieldSolver_t > & fs )
inline

Definition at line 24 of file LoadBalancer.hpp.

References E_m, fs_m, getE(), getPhi(), getRho(), loadbalancethreshold_m, pc_m, phi_m, and rho_m.

Here is the call graph for this function:

◆ ~LoadBalancer()

template<typename T, unsigned Dim>
LoadBalancer< T, Dim >::~LoadBalancer ( )
inline

Definition at line 33 of file LoadBalancer.hpp.

Member Function Documentation

◆ balance()

template<typename T, unsigned Dim>
bool LoadBalancer< T, Dim >::balance ( size_type totalP,
const unsigned int nstep )
inline

Definition at line 111 of file LoadBalancer.hpp.

References ippl::Comm, loadbalancefreq_m, loadbalancethreshold_m, pc_m, and TestName.

◆ getE()

template<typename T, unsigned Dim>
VField_t< T, Dim > * LoadBalancer< T, Dim >::getE ( ) const
inline

Definition at line 41 of file LoadBalancer.hpp.

References E_m.

Referenced by LoadBalancer().

Here is the caller graph for this function:

◆ getFieldSolver()

template<typename T, unsigned Dim>
std::shared_ptr< FieldSolver_t > LoadBalancer< T, Dim >::getFieldSolver ( ) const
inline

Definition at line 50 of file LoadBalancer.hpp.

References fs_m.

◆ getLoadBalanceThreshold()

template<typename T, unsigned Dim>
double LoadBalancer< T, Dim >::getLoadBalanceThreshold ( ) const
inline

Definition at line 35 of file LoadBalancer.hpp.

References loadbalancethreshold_m.

◆ getParticleContainer()

template<typename T, unsigned Dim>
std::shared_ptr< ParticleContainer< T, Dim > > LoadBalancer< T, Dim >::getParticleContainer ( ) const
inline

Definition at line 47 of file LoadBalancer.hpp.

References pc_m.

◆ getPhi()

template<typename T, unsigned Dim>
Field< T, Dim > * LoadBalancer< T, Dim >::getPhi ( )
inline

Definition at line 44 of file LoadBalancer.hpp.

References phi_m.

Referenced by LoadBalancer().

Here is the caller graph for this function:

◆ getRho()

template<typename T, unsigned Dim>
Field_t< Dim > * LoadBalancer< T, Dim >::getRho ( ) const
inline

Definition at line 38 of file LoadBalancer.hpp.

References rho_m.

Referenced by LoadBalancer().

Here is the caller graph for this function:

◆ initializeORB()

template<typename T, unsigned Dim>
void LoadBalancer< T, Dim >::initializeORB ( ippl::FieldLayout< Dim > * fl,
ippl::UniformCartesian< T, Dim > * mesh )
inline

Definition at line 79 of file LoadBalancer.hpp.

References orb, and rho_m.

◆ repartition()

template<typename T, unsigned Dim>
void LoadBalancer< T, Dim >::repartition ( ippl::FieldLayout< Dim > * fl,
ippl::UniformCartesian< T, Dim > * mesh,
bool & isFirstRepartition )
inline

Definition at line 83 of file LoadBalancer.hpp.

References Dim, fs_m, std::get(), orb, pc_m, rho_m, and updateLayout().

Here is the call graph for this function:

◆ setE()

template<typename T, unsigned Dim>
void LoadBalancer< T, Dim >::setE ( VField_t< T, Dim > * E)
inline

Definition at line 42 of file LoadBalancer.hpp.

References E_m.

◆ setFieldSolver()

template<typename T, unsigned Dim>
void LoadBalancer< T, Dim >::setFieldSolver ( std::shared_ptr< FieldSolver_t > fs)
inline

Definition at line 51 of file LoadBalancer.hpp.

References fs_m.

◆ setLoadBalanceThreshold()

template<typename T, unsigned Dim>
void LoadBalancer< T, Dim >::setLoadBalanceThreshold ( double threshold)
inline

Definition at line 36 of file LoadBalancer.hpp.

References loadbalancethreshold_m.

◆ setParticleContainer()

template<typename T, unsigned Dim>
void LoadBalancer< T, Dim >::setParticleContainer ( std::shared_ptr< ParticleContainer< T, Dim > > pc)
inline

Definition at line 48 of file LoadBalancer.hpp.

References pc_m.

◆ setPhi()

template<typename T, unsigned Dim>
void LoadBalancer< T, Dim >::setPhi ( Field< T, Dim > * phi)
inline

Definition at line 45 of file LoadBalancer.hpp.

References phi_m.

◆ setRho()

template<typename T, unsigned Dim>
void LoadBalancer< T, Dim >::setRho ( Field_t< Dim > * rho)
inline

Definition at line 39 of file LoadBalancer.hpp.

References rho_m.

◆ updateLayout()

template<typename T, unsigned Dim>
void LoadBalancer< T, Dim >::updateLayout ( ippl::FieldLayout< Dim > * fl,
ippl::UniformCartesian< T, Dim > * mesh,
bool & isFirstRepartition )
inline

Definition at line 53 of file LoadBalancer.hpp.

References fs_m, IpplTimings::getTimer(), pc_m, phi_m, IpplTimings::startTimer(), and IpplTimings::stopTimer().

Referenced by repartition().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ E_m

template<typename T, unsigned Dim>
VField_t<T, Dim>* LoadBalancer< T, Dim >::E_m
private

Definition at line 16 of file LoadBalancer.hpp.

Referenced by getE(), LoadBalancer(), and setE().

◆ fs_m

template<typename T, unsigned Dim>
std::shared_ptr<FieldSolver_t> LoadBalancer< T, Dim >::fs_m
private

◆ loadbalancefreq_m

template<typename T, unsigned Dim>
unsigned int LoadBalancer< T, Dim >::loadbalancefreq_m
private

Definition at line 20 of file LoadBalancer.hpp.

Referenced by balance().

◆ loadbalancethreshold_m

template<typename T, unsigned Dim>
double LoadBalancer< T, Dim >::loadbalancethreshold_m
private

◆ orb

template<typename T, unsigned Dim>
ORB<T, Dim> LoadBalancer< T, Dim >::orb
private

Definition at line 21 of file LoadBalancer.hpp.

Referenced by initializeORB(), and repartition().

◆ pc_m

template<typename T, unsigned Dim>
std::shared_ptr<ParticleContainer<T, Dim> > LoadBalancer< T, Dim >::pc_m
private

◆ phi_m

template<typename T, unsigned Dim>
Field<T, Dim>* LoadBalancer< T, Dim >::phi_m
private

Definition at line 17 of file LoadBalancer.hpp.

Referenced by getPhi(), LoadBalancer(), setPhi(), and updateLayout().

◆ rho_m

template<typename T, unsigned Dim>
Field_t<Dim>* LoadBalancer< T, Dim >::rho_m
private

Definition at line 15 of file LoadBalancer.hpp.

Referenced by getRho(), initializeORB(), LoadBalancer(), repartition(), and setRho().


The documentation for this class was generated from the following file: