OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <ParticleLayoutFromGrid.h>
Public Types | |
typedef int | pair_t |
typedef pair_t * | pair_iterator |
typedef ParticleAttrib < SingleParticlePos_t > | ParticlePos_t |
typedef ParticleAttrib< Index_t > | ParticleIndex_t |
typedef Vektor< double, 3 > | Vector_t |
![]() | |
enum | |
enum | UpdateFlags |
typedef double | Position_t |
typedef unsigned | Index_t |
typedef Vektor< double, Dim > | SingleParticlePos_t |
Public Member Functions | |
ParticleLayoutFromGrid (Grid *grid, Domain *domain, D3vector &local_min, D3vector &local_max) | |
void | update (IpplParticleBase< ParticleLayoutFromGrid > &particles) |
bool | is_local_pos (const Vector_t &x) const |
bool | is_local_pos (const D3vector &x) const |
bool | is_in_domain (const D3vector &x) const |
bool | is_in_domain (const Vector_t &x) const |
![]() | |
ParticleLayout () | |
~ParticleLayout () | |
void | setUpdateFlag (UpdateFlags f, bool val) |
bool | getUpdateFlag (UpdateFlags f) const |
ParticleBConds< double, Dim > & | getBConds () |
void | setBConds (const ParticleBConds< double, Dim > &bc) |
Static Public Member Functions | |
static bool | is_inside_box (const D3vector &corner_min, const D3vector &corner_max, const D3vector &x) |
Private Member Functions | |
void | apply_bconds (ParticlePos_t &R) |
size_t | redistribute_particles (IpplParticleBase< ParticleLayoutFromGrid > &particles) |
Private Attributes | |
Grid * | grid_ |
Domain * | geom_domain_ |
D3vector | my_corner_min_ |
D3vector | my_corner_max_ |
Additional Inherited Members | |
![]() | |
void | apply_bconds (unsigned n, PPT &R, const ParticleBConds< double, Dim > &bcs, const NDI &nr) |
Definition at line 18 of file ParticleLayoutFromGrid.h.
Definition at line 21 of file ParticleLayoutFromGrid.h.
typedef int ParticleLayoutFromGrid::pair_t |
Definition at line 20 of file ParticleLayoutFromGrid.h.
Definition at line 23 of file ParticleLayoutFromGrid.h.
Definition at line 22 of file ParticleLayoutFromGrid.h.
typedef Vektor<double,3> ParticleLayoutFromGrid::Vector_t |
Definition at line 24 of file ParticleLayoutFromGrid.h.
|
inline |
Constructor.
grid | Grid. |
domain | Domain on which the grid is based. |
local_min | Corner of axiparallel box defining local domain (with minimal coordinates) |
local_max | Corner of axiparallel box defining local domain (with maximal coordinates) |
Definition at line 32 of file ParticleLayoutFromGrid.h.
|
private |
Dummy function for boundary treatment (currently not used)
R | Particle positions. |
Definition at line 43 of file ParticleLayoutFromGrid.cpp.
References endl(), geom_domain_, and ParticleAttrib< T >::size().
|
inline |
Test if x is inside the geometric domain
x | Position to test. |
Definition at line 73 of file ParticleLayoutFromGrid.h.
References geom_domain_.
|
inline |
Test if x is inside the geometric domain
x | Position to test. |
Definition at line 81 of file ParticleLayoutFromGrid.h.
References geom_domain_.
|
inlinestatic |
Test whether x is inside axiparalllel box defined by corner_min and corner_max.
corner_min | Coordinates of box corner with minimal values. |
corner_max | Coordinates of box corner with maximal values. |
x | Position to test. |
Definition at line 93 of file ParticleLayoutFromGrid.h.
Referenced by is_local_pos(), and redistribute_particles().
|
inline |
Test if x is inside the domain assigned to my processor.
x | Position to test. |
Definition at line 55 of file ParticleLayoutFromGrid.h.
References is_inside_box(), my_corner_max_, and my_corner_min_.
Referenced by redistribute_particles().
|
inline |
Test if x is inside the domain assigned to my processor.
x | Position to test. |
Definition at line 64 of file ParticleLayoutFromGrid.h.
References is_inside_box(), my_corner_max_, and my_corner_min_.
|
private |
Go through all local particles, and send particles which are no longer in the local bounding box to the corresponding processors.
particles | Particle container |
Definition at line 56 of file ParticleLayoutFromGrid.cpp.
References IpplInfo::Comm, Communicate::COMM_ANY_NODE, IpplParticleBase< PLayout >::destroy(), IpplParticleBase< PLayout >::getDestroyNum(), IpplParticleBase< PLayout >::getLocalNum(), IpplParticleBase< PLayout >::getMessage(), IpplInfo::getNodes(), grid_, is_inside_box(), is_local_pos(), IpplInfo::myNode(), TagMaker::next_tag(), P_LAYOUT_CYCLE, P_SPATIAL_TRANSFER_TAG, IpplParticleBase< PLayout >::performDestroy(), IpplParticleBase< PLayout >::putMessage(), IpplParticleBase< PLayout >::R, Communicate::receive_block(), Communicate::send(), and IpplParticleBase< PLayout >::setLocalNum().
Referenced by update().
void ParticleLayoutFromGrid::update | ( | IpplParticleBase< ParticleLayoutFromGrid > & | particles | ) |
Does "book--keeping" after particles have been integrated one time step.
"Book--keeping" includes
particles | Particle container. |
Definition at line 15 of file ParticleLayoutFromGrid.cpp.
References IpplParticleBase< PLayout >::getDestroyNum(), IpplParticleBase< PLayout >::getLocalNum(), IpplInfo::getNodes(), grid_, IpplInfo::myNode(), IpplParticleBase< PLayout >::performDestroy(), redistribute_particles(), reduce(), IpplParticleBase< PLayout >::setLocalNum(), and IpplParticleBase< PLayout >::setTotalNum().
|
private |
Pointer to the geometric domain data structure.
Definition at line 120 of file ParticleLayoutFromGrid.h.
Referenced by apply_bconds(), and is_in_domain().
|
private |
Pointer to the grid data structure.
Definition at line 116 of file ParticleLayoutFromGrid.h.
Referenced by redistribute_particles(), and update().
|
private |
Corner of axiparallel box defining local domain (with maximal coordinates).
Definition at line 128 of file ParticleLayoutFromGrid.h.
Referenced by is_local_pos().
|
private |
Corner of axiparallel box defining local domain (with minimal coordinates).
Definition at line 124 of file ParticleLayoutFromGrid.h.
Referenced by is_local_pos().