NetDEM v1.0
Loading...
Searching...
No Matches
netdem::ParticleParser Class Reference

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.
 

Detailed Description

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.

Member Function Documentation

◆ ClassToStruct()

void ParticleParser::ClassToStruct ( const Particle *const p_class,
ParticleData *const p_struct )
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.

Parameters
p_classThe Particle object to convert.
p_structThe ParticleData struct to store the converted data in.

◆ DefineMPIDataType()

void ParticleParser::DefineMPIDataType ( MPI_Datatype *const datatype)
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.

Parameters
datatypeThe MPI_Datatype to define.

◆ StructToClass()

void ParticleParser::StructToClass ( Particle *const p_class,
const ParticleData *const p_struct,
const std::unordered_map< int, Shape * > & shape_map )
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.

Parameters
p_classThe Particle object to store the converted data in.
p_structThe ParticleData struct to convert.
shape_mapThe unordered_map<int, Shape *> containing shape information for the particles.

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