#include <particle_cloud.hpp>
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 >> ¢er) |
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 |
![]() | |
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 |
Definition at line 38 of file particle_cloud.hpp.
|
explicit |
Definition at line 42 of file particle_cloud_impl.hpp.
References pfasst::examples::boris::ParticleCloud< precision >::zero().
|
virtual |
Definition at line 61 of file particle_cloud_impl.hpp.
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.
ParticleComponent< precision > pfasst::examples::boris::ParticleCloud< precision >::center_of_mass | ( | ) | const |
Definition at line 236 of file particle_cloud_impl.hpp.
vector< precision > & pfasst::examples::boris::ParticleCloud< precision >::charges | ( | ) |
Definition at line 202 of file particle_cloud_impl.hpp.
const vector< precision > & pfasst::examples::boris::ParticleCloud< precision >::charges | ( | ) | const |
Definition at line 208 of file particle_cloud_impl.hpp.
|
virtual |
Definition at line 78 of file particle_cloud_impl.hpp.
|
inline |
Definition at line 172 of file particle_cloud_impl.hpp.
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.
|
virtual |
Definition at line 418 of file particle_cloud_impl.hpp.
References LOG_PRECISION.
vector< precision > & pfasst::examples::boris::ParticleCloud< precision >::masses | ( | ) |
Definition at line 214 of file particle_cloud_impl.hpp.
const vector< precision > & pfasst::examples::boris::ParticleCloud< precision >::masses | ( | ) | const |
Definition at line 220 of file particle_cloud_impl.hpp.
|
virtual |
Computes the \( 0 \)-norm of the data structure's values.
NotImplementedYet | This 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().
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.
vector< shared_ptr< Particle< precision > > > pfasst::examples::boris::ParticleCloud< precision >::particles | ( | ) | const |
Definition at line 226 of file particle_cloud_impl.hpp.
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().
const ParticleCloudComponent< precision > & pfasst::examples::boris::ParticleCloud< precision >::positions | ( | ) | const |
Definition at line 184 of file particle_cloud_impl.hpp.
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.
|
inline |
Definition at line 166 of file particle_cloud_impl.hpp.
Referenced by pfasst::examples::boris::distance_to_reference().
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().
const ParticleCloudComponent< precision > & pfasst::examples::boris::ParticleCloud< precision >::velocities | ( | ) | const |
Definition at line 196 of file particle_cloud_impl.hpp.
|
overridevirtual |
Zeroes out all values of this data structure.
NotImplementedYet | This 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().
|
private |
Definition at line 47 of file particle_cloud.hpp.
|
private |
Definition at line 50 of file particle_cloud.hpp.
|
private |
Definition at line 51 of file particle_cloud.hpp.
|
private |
Definition at line 43 of file particle_cloud.hpp.
|
private |
Definition at line 48 of file particle_cloud.hpp.
|
private |
Definition at line 44 of file particle_cloud.hpp.
|
private |
Definition at line 45 of file particle_cloud.hpp.
|
private |
Definition at line 46 of file particle_cloud.hpp.