NetDEM v1.0
|
A class for converting between Particle objects and ParticleData structs. More...
#include <particle_parser.hpp>
Static Public Member Functions | |
static void | ClassToStruct (const Particle *const p_class, ParticleData *const p_struct) |
Converts a Particle object to a ParticleData struct. | |
static void | StructToClass (Particle *const p_class, const ParticleData *const p_struct, const std::unordered_map< int, Shape * > &shape_map) |
Converts a ParticleData struct to a Particle object. | |
static void | DefineMPIDataType (MPI_Datatype *const datatype) |
Defines an MPI datatype for the ParticleData struct. | |
A class for converting between Particle objects and ParticleData structs.
The ParticleParser class provides methods for converting between Particle objects and ParticleData structs, which are used for communication between MPI processes in the Peridigm code.
|
static |
Converts a Particle object to a ParticleData struct.
This static method converts a Particle object to a ParticleData struct, which can be used for communication between MPI processes.
p_class | The Particle object to convert. |
p_struct | The ParticleData struct to store the converted data in. |
|
static |
Defines an MPI datatype for the ParticleData struct.
This static method defines an MPI datatype for the ParticleData struct, allowing it to be used in MPI communication between processes.
datatype | The MPI_Datatype to define. |
|
static |
Converts a ParticleData struct to a Particle object.
This static method converts a ParticleData struct to a Particle object, using additional input data such as shape maps, etc.
p_class | The Particle object to store the converted data in. |
p_struct | The ParticleData struct to convert. |
shape_map | The unordered_map<int, Shape *> containing shape information for the particles. |