Problem.h File Reference
#include <cereal/cereal.hpp>
#include <Mercury3D.h>

Go to the source code of this file.

Classes

class  SerializedProblem
 

Functions

template<class Archive >
void load (Archive &ar, SerializedProblem &base)
 
template<class Archive >
void save (Archive &ar, const SerializedProblem &base)
 

Function Documentation

◆ load()

template<class Archive >
void load ( Archive &  ar,
SerializedProblem base 
)
24  {
25  using namespace cereal;
26 
28  Mdouble tMax;
29  Mdouble tStep;
30  Vec3D gravity;
31  Vec3D minimum;
32  Vec3D maximum;
33 
34  ar( CEREAL_NVP( name )
35  ,CEREAL_NVP( tMax )
36  ,CEREAL_NVP( tStep )
37  ,CEREAL_NVP( gravity )
38  ,CEREAL_NVP( minimum )
39  ,CEREAL_NVP( maximum )
40  ,cereal::make_nvp("particles", base.particleHandler)
41  ,cereal::make_nvp("walls", base.wallHandler)
42  );
43 
44  base.setName( name );
45  base.setTimeMax( tMax );
46  base.setTimeStep( tStep );
47  base.setGravity( gravity );
48  base.setXMin(minimum.X);
49  base.setYMin(minimum.Y);
50  base.setZMin(minimum.Z);
51 
52  base.setXMax(maximum.X);
53  base.setYMax(maximum.Y);
54  base.setZMax(maximum.Z);
55 }
void setYMin(Mdouble newYMin)
Sets the value of YMin, the lower bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1025
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Definition: DPMBase.h:1453
void setYMax(Mdouble newYMax)
Sets the value of YMax, the upper bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1182
void setZMin(Mdouble newZMin)
Sets the value of ZMin, the lower bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1049
void setXMax(Mdouble newXMax)
Sets the value of XMax, the upper bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1156
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1443
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1208
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:864
void setXMin(Mdouble newXMin)
Sets the value of XMin, the lower bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1001
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1374
Definition: Kernel/Math/Vector.h:30
Mdouble Y
Definition: Kernel/Math/Vector.h:45
Mdouble Z
Definition: Kernel/Math/Vector.h:45
Mdouble X
the vector components
Definition: Kernel/Math/Vector.h:45
void gravity(const double &t, const Vector< double > &xi, Vector< double > &b)
Definition: ConstraintElementsUnitTest.cpp:20
Definition: MortaringCantileverCompareToNonMortaring.cpp:176
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
string name
Definition: plotDoE.py:33

References Gravity::gravity(), plotDoE::name, DPMBase::particleHandler, DPMBase::setGravity(), DPMBase::setName(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::setXMax(), DPMBase::setXMin(), DPMBase::setYMax(), DPMBase::setYMin(), DPMBase::setZMax(), DPMBase::setZMin(), oomph::Global_string_for_annotation::string(), DPMBase::wallHandler, Vec3D::X, Vec3D::Y, and Vec3D::Z.

◆ save()

template<class Archive >
void save ( Archive &  ar,
const SerializedProblem base 
)
58  {
59  Vec3D minimum;
60  Vec3D maximum;
61 
62  minimum.X = base.getXMin();
63  minimum.Y = base.getYMin();
64  minimum.Z = base.getZMin();
65  maximum.X = base.getXMax();
66  maximum.Y = base.getYMax();
67  maximum.Z = base.getZMax();
68 
69  ar ( cereal::make_nvp("name", base.getName())
70  ,CEREAL_NVP(minimum)
71  ,CEREAL_NVP(maximum)
72  ,cereal::make_nvp("tMax", base.getTimeMax())
73  ,cereal::make_nvp("tStep", base.getTimeStep())
74  ,cereal::make_nvp("gravity", base.getGravity())
75  ,cereal::make_nvp("particles", base.particleHandler)
76  ,cereal::make_nvp("walls", base.wallHandler)
77  );
78 }
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:603
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax.
Definition: DPMBase.h:610
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:616
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1241
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Definition: DPMBase.cc:377
Vec3D getGravity() const
Returns the gravitational acceleration.
Definition: DPMBase.cc:1382
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:622
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:879
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:634
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin.
Definition: DPMBase.h:628

References DPMBase::getGravity(), DPMBase::getName(), DPMBase::getTimeMax(), DPMBase::getTimeStep(), DPMBase::getXMax(), DPMBase::getXMin(), DPMBase::getYMax(), DPMBase::getYMin(), DPMBase::getZMax(), DPMBase::getZMin(), DPMBase::particleHandler, DPMBase::wallHandler, Vec3D::X, Vec3D::Y, and Vec3D::Z.