ls1-MarDyn
ls1-MarDyn molecular dynamics code
ObjectGenerator.h
1#ifndef SRC_IO_OBJECTGENERATOR_H_
2#define SRC_IO_OBJECTGENERATOR_H_
3
4#include <memory>
5
6#include "io/InputBase.h"
7
9
10class Object;
11
13
14class MoleculeIdPool;
15
22class ObjectGenerator : public InputBase {
23public:
24 ObjectGenerator() : _filler(nullptr), _object(nullptr), _velocityAssigner(nullptr), _moleculeIdPool(nullptr) {};
25
38 virtual void readXML(XMLfileUnits& xmlconfig);
39
40 void setFiller(std::shared_ptr<ObjectFillerBase> filler) { _filler = filler; }
41
42 void setObject(std::shared_ptr<Object> object) { _object = object; }
43
44 void setVelocityAssigner(std::shared_ptr<VelocityAssignerBase> vAssigner) { _velocityAssigner = vAssigner; }
45
46 void setMoleculeIDPool(std::shared_ptr<MoleculeIdPool> moleculeIdPool) { _moleculeIdPool = moleculeIdPool; }
47
48 void readPhaseSpaceHeader(Domain* /*domain*/, double /*timestep*/) {}
49
50 unsigned long readPhaseSpace(ParticleContainer* particleContainer, Domain* domain, DomainDecompBase* domainDecomp);
51
52private:
53 std::shared_ptr<ObjectFillerBase> _filler;
54 std::shared_ptr<Object> _object;
55 std::shared_ptr<VelocityAssignerBase> _velocityAssigner;
56 std::shared_ptr<MoleculeIdPool> _moleculeIdPool;
57};
58
59#endif // SRC_IO_OBJECTGENERATOR_H_
handle boundary region and multiple processes
Definition: DomainDecompBase.h:51
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
interface for any kind of input class
Definition: InputBase.h:18
The MoleculeIdPool manages molecule ID handling.
Definition: MoleculeIdPool.h:14
Definition: ObjectFillerBase.h:11
The ObjectGenerator sets up a phase space by filling volumetric objects.
Definition: ObjectGenerator.h:22
void readPhaseSpaceHeader(Domain *, double)
read the phase space components and header information
Definition: ObjectGenerator.h:48
unsigned long readPhaseSpace(ParticleContainer *particleContainer, Domain *domain, DomainDecompBase *domainDecomp)
read the actual phase space information
Definition: ObjectGenerator.cpp:98
virtual void readXML(XMLfileUnits &xmlconfig)
Read in XML configuration for ObjectGenerator and all its included objects.
Definition: ObjectGenerator.cpp:20
Definition: Objects.h:25
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
Definition: VelocityAssignerBase.h:8
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25