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

A class for converting between Particle objects and ParticleDataGPU structs. More...

#include <particle_parser_gpu.hpp>

Static Public Member Functions

static void ClassToStruct (const Particle *const p_class, ParticleDataGPU *const p_struct)
 Converts a Particle object to a ParticleDataGPU struct.
 
static void StructToClass (Particle *const p_class, const ParticleDataGPU *const p_struct, const std::unordered_map< int, Shape * > &shape_map)
 Converts a ParticleDataGPU struct to a Particle object.
 

Detailed Description

A class for converting between Particle objects and ParticleDataGPU structs.

The ParticleParser class provides methods for converting between Particle objects and ParticleDataGPU structs, which are used for communication between MPI processes in the Peridigm code.

Member Function Documentation

◆ ClassToStruct()

void ParticleParserGPU::ClassToStruct ( const Particle *const p_class,
ParticleDataGPU *const p_struct )
static

Converts a Particle object to a ParticleDataGPU struct.

This static method converts a Particle object to a ParticleDataGPU struct, which can be used for communication between MPI processes.

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

◆ StructToClass()

void ParticleParserGPU::StructToClass ( Particle *const p_class,
const ParticleDataGPU *const p_struct,
const std::unordered_map< int, Shape * > & shape_map )
static

Converts a ParticleDataGPU struct to a Particle object.

This static method converts a ParticleDataGPU 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 ParticleDataGPU 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: