|
Peano
|
ParticleIdentifier is used as a key to the 'database' map to keep the particles' history as the map's values. More...
#include <ParticleIdentifier.h>

Public Member Functions | |
| std::string | toString () const |
| bool | numericalEquals (const ParticleIdentifier &rhs) const |
| bool | numericalSmaller (const ParticleIdentifier &rhs) const |
| bool | operator< (const ParticleIdentifier &rhs) const |
| ParticleIdentifier (const std::string &particleName__, const tarch::la::Vector< Dimensions, double > &particleX__, const tarch::la::Vector< Dimensions, double > &vertexX, const tarch::la::Vector< Dimensions, double > &vertexH, const int particleID__, const int treeId__) | |
| ParticleIdentifier (const std::string &particleName__, const tarch::la::Vector< Dimensions, double > &particleX__, const tarch::la::Vector< Dimensions, long long > &vertexInd__, const int vertexDepth__, const int particleID__, const int treeID__) | |
Static Public Member Functions | |
| static tarch::la::Vector< Dimensions, long long > | getVertexInd (const tarch::la::Vector< Dimensions, double > &vertexX, const tarch::la::Vector< Dimensions, double > &vertexH) |
| Compute an integer vertex "index" given its position and size. | |
| static int | getVertexDepth (const tarch::la::Vector< Dimensions, double > &vertexX, const tarch::la::Vector< Dimensions, double > &vertexH) |
| Compute an integer vertex "depth" given its size We currently guess a domain size for a simulation and just estimate the depth given the vertex size. | |
Data Fields | |
| std::string | particleName |
| tarch::la::Vector< Dimensions, double > | particleX |
| tarch::la::Vector< Dimensions, long long > | vertexInd |
| int | vertexDepth |
| int | particleID |
| int | treeID |
ParticleIdentifier is used as a key to the 'database' map to keep the particles' history as the map's values.
By default, particles' are ID'd by their unique integer ID and type name. However, in certain situations, that may not be enough. For example, if a particle is close to a periodic boundary, it will be replicated and its coordinates shifted appropriately on the other boundary. There will however exist 2 particles with the same unique integer ID and type name, which will cause issues with the assignment checks, as it will have an inappropriate history. Therefore, we also need to take into account the particles' positions to ID them.
Using particle positions as floats, however, turned out to be a bad idea, even when allowing for fuzzy searches within a reasonable interval. Instead, we're using the vertex a particle is attached to as a proxy for its position. The vertices are assigned an "index" ("in the box") based on their position and size, as well as a depth to identify them uniquely.
Furthermore, note that particles will be distinguished based on the spacetree they're assigned to.
Definition at line 35 of file ParticleIdentifier.h.
| toolbox::particles::assignmentchecks::internal::ParticleIdentifier::ParticleIdentifier | ( | const std::string & | particleName__, |
| const tarch::la::Vector< Dimensions, double > & | particleX__, | ||
| const tarch::la::Vector< Dimensions, double > & | vertexX, | ||
| const tarch::la::Vector< Dimensions, double > & | vertexH, | ||
| const int | particleID__, | ||
| const int | treeId__ | ||
| ) |
| toolbox::particles::assignmentchecks::internal::ParticleIdentifier::ParticleIdentifier | ( | const std::string & | particleName__, |
| const tarch::la::Vector< Dimensions, double > & | particleX__, | ||
| const tarch::la::Vector< Dimensions, long long > & | vertexInd__, | ||
| const int | vertexDepth__, | ||
| const int | particleID__, | ||
| const int | treeID__ | ||
| ) |
|
static |
Compute an integer vertex "depth" given its size We currently guess a domain size for a simulation and just estimate the depth given the vertex size.
The vertexX is used to raise an error if we're out of the assumed box size.
|
static |
Compute an integer vertex "index" given its position and size.
| bool toolbox::particles::assignmentchecks::internal::ParticleIdentifier::numericalEquals | ( | const ParticleIdentifier & | rhs | ) | const |
| bool toolbox::particles::assignmentchecks::internal::ParticleIdentifier::numericalSmaller | ( | const ParticleIdentifier & | rhs | ) | const |
| bool toolbox::particles::assignmentchecks::internal::ParticleIdentifier::operator< | ( | const ParticleIdentifier & | rhs | ) | const |
| std::string toolbox::particles::assignmentchecks::internal::ParticleIdentifier::toString | ( | ) | const |
| int toolbox::particles::assignmentchecks::internal::ParticleIdentifier::particleID |
Definition at line 41 of file ParticleIdentifier.h.
| std::string toolbox::particles::assignmentchecks::internal::ParticleIdentifier::particleName |
Definition at line 37 of file ParticleIdentifier.h.
| tarch::la::Vector<Dimensions, double> toolbox::particles::assignmentchecks::internal::ParticleIdentifier::particleX |
Definition at line 38 of file ParticleIdentifier.h.
| int toolbox::particles::assignmentchecks::internal::ParticleIdentifier::treeID |
Definition at line 42 of file ParticleIdentifier.h.
| int toolbox::particles::assignmentchecks::internal::ParticleIdentifier::vertexDepth |
Definition at line 40 of file ParticleIdentifier.h.
| tarch::la::Vector<Dimensions, long long> toolbox::particles::assignmentchecks::internal::ParticleIdentifier::vertexInd |
Definition at line 39 of file ParticleIdentifier.h.