PFASST++
pfasst::examples::boris::ParticleCloud< precision > Class Template Reference

#include <particle_cloud.hpp>

+ Inheritance diagram for pfasst::examples::boris::ParticleCloud< precision >:
+ Collaboration diagram for pfasst::examples::boris::ParticleCloud< precision >:

Public Member Functions

 ParticleCloud (const size_t num_particles=0, const size_t dim=3, const precision default_charge=precision(1.0), const precision default_mass=precision(1.0))
 
virtual ~ParticleCloud ()
 
virtual void zero () override
 Zeroes out all values of this data structure. More...
 
virtual void copy (shared_ptr< const encap::Encapsulation< precision >> other)
 
size_t size () const
 
size_t dim () const
 
ParticleCloudComponent< precision > & positions ()
 
const ParticleCloudComponent< precision > & positions () const
 
ParticleCloudComponent< precision > & velocities ()
 
const ParticleCloudComponent< precision > & velocities () const
 
vector< precision > & charges ()
 
const vector< precision > & charges () const
 
vector< precision > & masses ()
 
const vector< precision > & masses () const
 
ParticleComponent< precision > center_of_mass () const
 
shared_ptr< Particle< precision > > operator[] (const size_t index) const
 
shared_ptr< Particle< precision > > at (const size_t index) const
 
void set_at (const size_t index, const shared_ptr< Particle< precision >> &particle)
 
vector< shared_ptr< Particle< precision > > > particles () const
 
void distribute_around_center (const shared_ptr< Particle< precision >> &center)
 
virtual precision norm0 () const
 Computes the \( 0 \)-norm of the data structure's values. More...
 
virtual void log (el::base::type::ostream_t &os) const
 
- Public Member Functions inherited from pfasst::encap::Encapsulation< precision >
virtual ~Encapsulation ()
 
virtual void copy (shared_ptr< const Encapsulation< precision >> other)
 Copies values from other into this data structure. More...
 
virtual void saxpy (precisiona, shared_ptr< const Encapsulation< precision >> x)
 Provides basic mathematical operation \( y+=ax \). More...
 
virtual void mat_apply (vector< shared_ptr< Encapsulation< precision >>> dst, precisiona, Matrix< precision > mat, vector< shared_ptr< Encapsulation< precision >>> src, bool zero=true)
 Defines matrix-vector multiplication for this data type. More...
 
virtual void post (ICommunicator *comm, int tag)
 
virtual void send (ICommunicator *comm, int tag, bool blocking)
 Send values stored in this data structure. More...
 
virtual void recv (ICommunicator *comm, int tag, bool blocking)
 Receive values to store in this data structure. More...
 
virtual void broadcast (ICommunicator *comm)
 Broadcasting this data structure to all processes in comm. More...
 

Private Attributes

size_t _dim
 
size_t _num_particles
 
ParticleCloudComponent< precision > _positions
 
ParticleCloudComponent< precision > _velocities
 
vector< precision > _charges
 
vector< precision > _masses
 
precision _default_charge
 
precision _default_mass
 

Detailed Description

template<typename precision>
class pfasst::examples::boris::ParticleCloud< precision >

Definition at line 38 of file particle_cloud.hpp.

Constructor & Destructor Documentation

template<typename precision >
pfasst::examples::boris::ParticleCloud< precision >::ParticleCloud ( const size_t  num_particles = 0,
const size_t  dim = 3,
const precision  default_charge = precision(1.0),
const precision  default_mass = precision(1.0) 
)
explicit

Definition at line 42 of file particle_cloud_impl.hpp.

References pfasst::examples::boris::ParticleCloud< precision >::zero().

+ Here is the call graph for this function:

template<typename precision >
pfasst::examples::boris::ParticleCloud< precision >::~ParticleCloud ( )
virtual

Definition at line 61 of file particle_cloud_impl.hpp.

Member Function Documentation

template<typename precision >
shared_ptr< Particle< precision > > pfasst::examples::boris::ParticleCloud< precision >::at ( const size_t  index) const

Definition at line 259 of file particle_cloud_impl.hpp.

template<typename precision >
ParticleComponent< precision > pfasst::examples::boris::ParticleCloud< precision >::center_of_mass ( ) const

Definition at line 236 of file particle_cloud_impl.hpp.

template<typename precision >
vector< precision > & pfasst::examples::boris::ParticleCloud< precision >::charges ( )

Definition at line 202 of file particle_cloud_impl.hpp.

template<typename precision >
const vector< precision > & pfasst::examples::boris::ParticleCloud< precision >::charges ( ) const

Definition at line 208 of file particle_cloud_impl.hpp.

template<typename precision >
void pfasst::examples::boris::ParticleCloud< precision >::copy ( shared_ptr< const encap::Encapsulation< precision >>  other)
virtual

Definition at line 78 of file particle_cloud_impl.hpp.

template<typename precision >
size_t pfasst::examples::boris::ParticleCloud< precision >::dim ( ) const
inline

Definition at line 172 of file particle_cloud_impl.hpp.

template<typename precision >
void pfasst::examples::boris::ParticleCloud< precision >::distribute_around_center ( const shared_ptr< Particle< precision >> &  center)

Definition at line 277 of file particle_cloud_impl.hpp.

References LOG_INDENT, pfasst::examples::boris::max(), PFASST_RANDOM_SEED, and VLOG_FUNC_START.

+ Here is the call graph for this function:

template<typename precision >
void pfasst::examples::boris::ParticleCloud< precision >::log ( el::base::type::ostream_t &  os) const
virtual

Definition at line 418 of file particle_cloud_impl.hpp.

References LOG_PRECISION.

template<typename precision >
vector< precision > & pfasst::examples::boris::ParticleCloud< precision >::masses ( )

Definition at line 214 of file particle_cloud_impl.hpp.

template<typename precision >
const vector< precision > & pfasst::examples::boris::ParticleCloud< precision >::masses ( ) const

Definition at line 220 of file particle_cloud_impl.hpp.

template<typename precision >
precision pfasst::examples::boris::ParticleCloud< precision >::norm0 ( ) const
virtual

Computes the \( 0 \)-norm of the data structure's values.

Returns
\( 0 \)-norm of this data structure
Exceptions
NotImplementedYetThis function is required by Encapsulation

Reimplemented from pfasst::encap::Encapsulation< precision >.

Definition at line 317 of file particle_cloud_impl.hpp.

References pfasst::examples::boris::max(), and pfasst::examples::boris::max_abs().

+ Here is the call graph for this function:

template<typename precision >
shared_ptr< Particle< precision > > pfasst::examples::boris::ParticleCloud< precision >::operator[] ( const size_t  index) const

Definition at line 248 of file particle_cloud_impl.hpp.

template<typename precision >
vector< shared_ptr< Particle< precision > > > pfasst::examples::boris::ParticleCloud< precision >::particles ( ) const

Definition at line 226 of file particle_cloud_impl.hpp.

template<typename precision >
ParticleCloudComponent< precision > & pfasst::examples::boris::ParticleCloud< precision >::positions ( )

Definition at line 178 of file particle_cloud_impl.hpp.

Referenced by pfasst::examples::boris::BorisSweeper< scalar, time >::exact(), and TEST().

+ Here is the caller graph for this function:

template<typename precision >
const ParticleCloudComponent< precision > & pfasst::examples::boris::ParticleCloud< precision >::positions ( ) const

Definition at line 184 of file particle_cloud_impl.hpp.

template<typename precision >
void pfasst::examples::boris::ParticleCloud< precision >::set_at ( const size_t  index,
const shared_ptr< Particle< precision >> &  particle 
)

Definition at line 266 of file particle_cloud_impl.hpp.

template<typename precision >
size_t pfasst::examples::boris::ParticleCloud< precision >::size ( ) const
inline

Definition at line 166 of file particle_cloud_impl.hpp.

Referenced by pfasst::examples::boris::distance_to_reference().

+ Here is the caller graph for this function:

template<typename precision >
ParticleCloudComponent< precision > & pfasst::examples::boris::ParticleCloud< precision >::velocities ( )

Definition at line 190 of file particle_cloud_impl.hpp.

Referenced by pfasst::examples::boris::BorisSweeper< scalar, time >::exact().

+ Here is the caller graph for this function:

template<typename precision >
const ParticleCloudComponent< precision > & pfasst::examples::boris::ParticleCloud< precision >::velocities ( ) const

Definition at line 196 of file particle_cloud_impl.hpp.

template<typename precision >
void pfasst::examples::boris::ParticleCloud< precision >::zero ( )
overridevirtual

Zeroes out all values of this data structure.

Exceptions
NotImplementedYetThis function is required by Encapsulation

Reimplemented from pfasst::encap::Encapsulation< precision >.

Definition at line 65 of file particle_cloud_impl.hpp.

Referenced by pfasst::examples::boris::ParticleCloud< precision >::ParticleCloud().

+ Here is the caller graph for this function:

Member Data Documentation

template<typename precision>
vector<precision> pfasst::examples::boris::ParticleCloud< precision >::_charges
private

Definition at line 47 of file particle_cloud.hpp.

template<typename precision>
precision pfasst::examples::boris::ParticleCloud< precision >::_default_charge
private

Definition at line 50 of file particle_cloud.hpp.

template<typename precision>
precision pfasst::examples::boris::ParticleCloud< precision >::_default_mass
private

Definition at line 51 of file particle_cloud.hpp.

template<typename precision>
size_t pfasst::examples::boris::ParticleCloud< precision >::_dim
private

Definition at line 43 of file particle_cloud.hpp.

template<typename precision>
vector<precision> pfasst::examples::boris::ParticleCloud< precision >::_masses
private

Definition at line 48 of file particle_cloud.hpp.

template<typename precision>
size_t pfasst::examples::boris::ParticleCloud< precision >::_num_particles
private

Definition at line 44 of file particle_cloud.hpp.

template<typename precision>
ParticleCloudComponent<precision> pfasst::examples::boris::ParticleCloud< precision >::_positions
private

Definition at line 45 of file particle_cloud.hpp.

template<typename precision>
ParticleCloudComponent<precision> pfasst::examples::boris::ParticleCloud< precision >::_velocities
private

Definition at line 46 of file particle_cloud.hpp.


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