NetDEM v1.0
Loading...
Searching...
No Matches
particle_parser.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "particle.hpp"
4#include "particle_data.hpp"
5#include <mpi.h>
6
7namespace netdem {
8
18public:
28 static void ClassToStruct(const Particle *const p_class,
29 ParticleData *const p_struct);
30
42 static void StructToClass(Particle *const p_class,
43 const ParticleData *const p_struct,
44 const std::unordered_map<int, Shape *> &shape_map);
45
54 static void DefineMPIDataType(MPI_Datatype *const datatype);
55};
56
57} // namespace netdem
Definition particle.hpp:26
A class for converting between Particle objects and ParticleData structs.
Definition particle_parser.hpp:17
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.
Definition particle_parser.cpp:73
static void ClassToStruct(const Particle *const p_class, ParticleData *const p_struct)
Converts a Particle object to a ParticleData struct.
Definition particle_parser.cpp:7
static void DefineMPIDataType(MPI_Datatype *const datatype)
Defines an MPI datatype for the ParticleData struct.
Definition particle_parser.cpp:144
Definition bond_entry.hpp:7
A struct defining the particle data for MPI communication.
Definition particle_data.hpp:17