OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <AmrParticleLevelCounter.h>
Public Types | |
typedef std::map< Key, T > ::value_type | value_type |
typedef std::map< Key, T > ::size_type | size_type |
typedef std::map< Key, T > ::iterator | iterator |
typedef std::map< Key, T > ::const_iterator | const_iterator |
Public Member Functions | |
AmrParticleLevelCounter () | |
void | increment (const Key &level, T nTimes=T(1)) |
void | decrement (const Key &level, T nTimes=T(1)) |
T & | operator[] (T level) |
const T & | operator[] (T level) const |
size_type | size () const |
bool | empty () const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
T | begin (T level) const |
T | end (T level) const |
void | remove (T num, T begin) |
T | getLocalNumAllLevel () |
T | getLocalNumUpToLevel (T level) const |
T | getLocalNumAtLevel (T level) const |
Private Member Functions | |
T | which (T idx) |
Private Attributes | |
std::map< Key, T > | count_m |
Helper class in order to keep track of particles per level. It allows to iterate faster through particles at a certain level. The class is built on the STL map container where the key represents the level and the value is the the number of particles at that level.
Definition at line 22 of file AmrParticleLevelCounter.h.
typedef std::map<Key, T>::const_iterator AmrParticleLevelCounter< Key, T, Compare, Allocator >::const_iterator |
Definition at line 29 of file AmrParticleLevelCounter.h.
typedef std::map<Key, T>::iterator AmrParticleLevelCounter< Key, T, Compare, Allocator >::iterator |
Definition at line 28 of file AmrParticleLevelCounter.h.
typedef std::map<Key, T>::size_type AmrParticleLevelCounter< Key, T, Compare, Allocator >::size_type |
Definition at line 27 of file AmrParticleLevelCounter.h.
typedef std::map<Key, T>::value_type AmrParticleLevelCounter< Key, T, Compare, Allocator >::value_type |
Definition at line 26 of file AmrParticleLevelCounter.h.
|
inline |
Definition at line 33 of file AmrParticleLevelCounter.h.
|
inline |
Definition at line 57 of file AmrParticleLevelCounter.h.
Referenced by BoxLibParticle< PLayout >::AssignCellDensitySingleLevelFort(), AmrParticleLevelCounter< size_t, size_t >::end(), AmrParticleLevelCounter< size_t, size_t >::getLocalNumAllLevel(), AmrParticleLevelCounter< size_t, size_t >::getLocalNumAtLevel(), AmrParticleLevelCounter< size_t, size_t >::getLocalNumUpToLevel(), BoxLibParticle< PLayout >::InterpolateMultiLevelFort(), BoxLibParticle< PLayout >::InterpolateSingleLevelFort(), AmrParticleLevelCounter< size_t, size_t >::remove(), AmrBoxLib::tagForMaxNumParticles_m(), AmrBoxLib::tagForMinNumParticles_m(), AmrBoxLib::tagForMomenta_m(), and AmrYtWriter::writeParticles_m().
|
inline |
Definition at line 58 of file AmrParticleLevelCounter.h.
|
inline |
Obtain the start of a level
level |
Definition at line 69 of file AmrParticleLevelCounter.h.
|
inline |
Add more "particles" to that level
level | where to add |
nTimes | to decrement |
Definition at line 47 of file AmrParticleLevelCounter.h.
|
inline |
Definition at line 55 of file AmrParticleLevelCounter.h.
|
inline |
Definition at line 60 of file AmrParticleLevelCounter.h.
Referenced by BoxLibParticle< PLayout >::AssignCellDensitySingleLevelFort(), AmrParticleLevelCounter< size_t, size_t >::begin(), AmrParticleLevelCounter< size_t, size_t >::getLocalNumAtLevel(), AmrParticleLevelCounter< size_t, size_t >::getLocalNumUpToLevel(), BoxLibParticle< PLayout >::InterpolateMultiLevelFort(), BoxLibParticle< PLayout >::InterpolateSingleLevelFort(), and AmrParticleLevelCounter< size_t, size_t >::which().
|
inline |
Definition at line 61 of file AmrParticleLevelCounter.h.
|
inline |
Obtain the end of a level
level |
Definition at line 88 of file AmrParticleLevelCounter.h.
|
inline |
Definition at line 110 of file AmrParticleLevelCounter.h.
|
inline |
Definition at line 131 of file AmrParticleLevelCounter.h.
|
inline |
Definition at line 118 of file AmrParticleLevelCounter.h.
|
inline |
Add more "particles" to that level
level | where to add |
nTimes | to increment |
Definition at line 40 of file AmrParticleLevelCounter.h.
Referenced by AmrParticleLevelCounter< size_t, size_t >::decrement().
|
inline |
Definition at line 49 of file AmrParticleLevelCounter.h.
|
inline |
Definition at line 51 of file AmrParticleLevelCounter.h.
|
inline |
Remove particle indices from the container
num | of particles that will be removed |
begin | of index |
Definition at line 96 of file AmrParticleLevelCounter.h.
|
inline |
Definition at line 53 of file AmrParticleLevelCounter.h.
Referenced by AmrParticleLevelCounter< size_t, size_t >::begin(), and AmrParticleLevelCounter< size_t, size_t >::which().
|
inlineprivate |
Find the level the particle belongs to
idx | is the local index of the particle |
Definition at line 142 of file AmrParticleLevelCounter.h.
Referenced by AmrParticleLevelCounter< size_t, size_t >::remove().
|
private |
Key represents level T represents number of particles
Definition at line 157 of file AmrParticleLevelCounter.h.
Referenced by AmrParticleLevelCounter< size_t, size_t >::begin(), AmrParticleLevelCounter< size_t, size_t >::empty(), AmrParticleLevelCounter< size_t, size_t >::end(), AmrParticleLevelCounter< size_t, size_t >::getLocalNumAllLevel(), AmrParticleLevelCounter< size_t, size_t >::increment(), AmrParticleLevelCounter< size_t, size_t >::operator[](), AmrParticleLevelCounter< size_t, size_t >::remove(), and AmrParticleLevelCounter< size_t, size_t >::size().