OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ParticleLayoutFromGrid Class Reference

#include <ParticleLayoutFromGrid.h>

Inheritance diagram for ParticleLayoutFromGrid:
Inheritance graph
[legend]
Collaboration diagram for ParticleLayoutFromGrid:
Collaboration graph
[legend]

Public Types

typedef int pair_t
 
typedef pair_tpair_iterator
 
typedef ParticleAttrib
< SingleParticlePos_t
ParticlePos_t
 
typedef ParticleAttrib< Index_tParticleIndex_t
 
typedef Vektor< double, 3 > Vector_t
 
- Public Types inherited from ParticleLayout< double, 3 >
enum  
 
enum  UpdateFlags
 
typedef double Position_t
 
typedef unsigned Index_t
 
typedef Vektor< double, DimSingleParticlePos_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
 
- Public Member Functions inherited from ParticleLayout< double, 3 >
 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

- Protected Member Functions inherited from ParticleLayout< double, 3 >
void apply_bconds (unsigned n, PPT &R, const ParticleBConds< double, Dim > &bcs, const NDI &nr)
 

Detailed Description

Definition at line 18 of file ParticleLayoutFromGrid.h.

Member Typedef Documentation

Definition at line 21 of file ParticleLayoutFromGrid.h.

Definition at line 20 of file ParticleLayoutFromGrid.h.

Definition at line 23 of file ParticleLayoutFromGrid.h.

Definition at line 22 of file ParticleLayoutFromGrid.h.

Definition at line 24 of file ParticleLayoutFromGrid.h.

Constructor & Destructor Documentation

ParticleLayoutFromGrid::ParticleLayoutFromGrid ( Grid *  grid,
Domain *  domain,
D3vector &  local_min,
D3vector &  local_max 
)
inline

Constructor.

Parameters
gridGrid.
domainDomain on which the grid is based.
local_minCorner of axiparallel box defining local domain (with minimal coordinates)
local_maxCorner of axiparallel box defining local domain (with maximal coordinates)

Definition at line 32 of file ParticleLayoutFromGrid.h.

Member Function Documentation

void ParticleLayoutFromGrid::apply_bconds ( ParticlePos_t R)
private

Dummy function for boundary treatment (currently not used)

Parameters
RParticle positions.

Definition at line 43 of file ParticleLayoutFromGrid.cpp.

References endl(), geom_domain_, and ParticleAttrib< T >::size().

Here is the call graph for this function:

bool ParticleLayoutFromGrid::is_in_domain ( const D3vector &  x) const
inline

Test if x is inside the geometric domain

Parameters
xPosition to test.
Returns
True if inside.

Definition at line 73 of file ParticleLayoutFromGrid.h.

References geom_domain_.

bool ParticleLayoutFromGrid::is_in_domain ( const Vector_t x) const
inline

Test if x is inside the geometric domain

Parameters
xPosition to test.
Returns
True if inside.

Definition at line 81 of file ParticleLayoutFromGrid.h.

References geom_domain_.

static bool ParticleLayoutFromGrid::is_inside_box ( const D3vector &  corner_min,
const D3vector &  corner_max,
const D3vector &  x 
)
inlinestatic

Test whether x is inside axiparalllel box defined by corner_min and corner_max.

Parameters
corner_minCoordinates of box corner with minimal values.
corner_maxCoordinates of box corner with maximal values.
xPosition to test.
Returns
True if x is inside.

Definition at line 93 of file ParticleLayoutFromGrid.h.

Referenced by is_local_pos(), and redistribute_particles().

bool ParticleLayoutFromGrid::is_local_pos ( const Vector_t x) const
inline

Test if x is inside the domain assigned to my processor.

Parameters
xPosition to test.
Returns
True if inside.

Definition at line 55 of file ParticleLayoutFromGrid.h.

References is_inside_box(), my_corner_max_, and my_corner_min_.

Referenced by redistribute_particles().

Here is the call graph for this function:

bool ParticleLayoutFromGrid::is_local_pos ( const D3vector &  x) const
inline

Test if x is inside the domain assigned to my processor.

Parameters
xPosition to test.
Returns
True if inside.

Definition at line 64 of file ParticleLayoutFromGrid.h.

References is_inside_box(), my_corner_max_, and my_corner_min_.

Here is the call graph for this function:

size_t ParticleLayoutFromGrid::redistribute_particles ( IpplParticleBase< ParticleLayoutFromGrid > &  particles)
private
void ParticleLayoutFromGrid::update ( IpplParticleBase< ParticleLayoutFromGrid > &  particles)

Does "book--keeping" after particles have been integrated one time step.

"Book--keeping" includes

  • Detecting particles which have moved across a boundary and taking appropriate measures. (not yet implemented)
  • Redistributing particles which have moved out of the domain assigned to the local processor.
  • Updating the total particle count.
    Parameters
    particlesParticle 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().

Here is the call graph for this function:

Member Data Documentation

Domain* ParticleLayoutFromGrid::geom_domain_
private

Pointer to the geometric domain data structure.

Definition at line 120 of file ParticleLayoutFromGrid.h.

Referenced by apply_bconds(), and is_in_domain().

Grid* ParticleLayoutFromGrid::grid_
private

Pointer to the grid data structure.

Definition at line 116 of file ParticleLayoutFromGrid.h.

Referenced by redistribute_particles(), and update().

D3vector ParticleLayoutFromGrid::my_corner_max_
private

Corner of axiparallel box defining local domain (with maximal coordinates).

Definition at line 128 of file ParticleLayoutFromGrid.h.

Referenced by is_local_pos().

D3vector ParticleLayoutFromGrid::my_corner_min_
private

Corner of axiparallel box defining local domain (with minimal coordinates).

Definition at line 124 of file ParticleLayoutFromGrid.h.

Referenced by is_local_pos().


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