58 void read(std::istream& is)
override;
63 void write(std::ostream& os)
const override;
118 void setNZ(std::size_t nZ);
123 std::size_t
getNZ()
const;
128 void setNY(std::size_t nY);
133 std::size_t
getNY()
const;
138 void setNX(std::size_t nX);
143 std::size_t
getNX()
const;
148 void setN(std::size_t
n);
153 void setN(std::array<std::size_t, 3>
n);
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
double Mdouble
Definition: GeneralDefine.h:13
float * p
Definition: Tutorial_Map_using.cpp:9
Base class of all CG objects, needed to store the various CG objects in the CGHandler.
Definition: BaseCG.h:36
virtual Mdouble getWidth() const =0
Returns width_, the coarse-graining width.
void setHX(Mdouble h)
Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX,...
Definition: BaseCG.cc:229
void setNY(std::size_t nY)
Sets nY_, the number of spatial mesh points in the y-direction.
Definition: BaseCG.cc:91
Mdouble getTimeMax() const
Returns timeMax_, the upper limit of the temporal domain.
Definition: BaseCG.cc:160
~BaseCG() override=default
Default destructor, does nothing.
void setMax(Vec3D max)
Sets max_, the upper limit of the spatial domain.
Definition: BaseCG.cc:150
void setVerbose(const bool verbose)
Definition: BaseCG.h:258
bool averageBeyondDomain_
Determines whether particles outside the domain are considered when computing the averaged fields.
Definition: BaseCG.h:355
BaseCG(const BaseCG &p)=default
Default copy constructor, copies all values.
void setSelectedParticle(const std::function< const bool(const BaseInteractable *)> &selectedParticle)
Definition: BaseCG.cc:216
Mdouble timeMin_
Definition: BaseCG.h:320
void setZ(Mdouble min, Mdouble max)
Sets min_.Z, max_.Z, the limits of the spatial domain in Z.
Definition: BaseCG.cc:177
File statFile
File class to handle the output into a .stat file.
Definition: BaseCG.h:363
void setNX(std::size_t nX)
Sets nX_, the number of spatial mesh points in the x-direction.
Definition: BaseCG.cc:101
std::size_t getNY() const
Returns nY_, the number of spatial mesh points in the y-direction.
Definition: BaseCG.cc:96
Mdouble getEps() const
Definition: BaseCG.cc:76
void setHY(Mdouble h)
Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX,...
Definition: BaseCG.cc:238
void setYGrid(Mdouble min, Mdouble max, Mdouble h)
Definition: BaseCG.cc:189
void setHandler(CGHandler *handler)
Sets handler_, the pointer to the CGHandler.
Definition: BaseCG.cc:52
virtual void setWidth(Mdouble width)=0
Sets width_, the coarse-graining width.
virtual Mdouble getTimeStep() const
Definition: BaseCG.cc:272
virtual void evaluate()=0
Called after a given number of time steps (statFile::saveCount_) to evaluate the CG fields.
std::size_t nY_
Definition: BaseCG.h:301
virtual void setWidthTime(Mdouble widthTime)
Definition: BaseCG.cc:256
void clear()
This class seems to have no use (?), but is required for any derivative of BaseObject.
Definition: BaseCG.cc:25
Vec3D min_
Definition: BaseCG.h:332
Mdouble eps_
Definition: BaseCG.h:312
BaseCG()
Simple constructor, sets default values.
Definition: BaseCG.cc:8
void setTimeMin(Mdouble timeMin)
Sets timeMin_, the lower limit of the temporal domain.
Definition: BaseCG.cc:125
void setX(Mdouble min, Mdouble max)
Sets min_.X, max_.X, the limits of the spatial domain in X.
Definition: BaseCG.cc:165
void setH(Mdouble h)
Sets nX_, nY_, nZ_, the number of spatial mesh points in each cartesian direction....
Definition: BaseCG.cc:221
CGHandler * getHandler() const
Returns handler_, a pointer to the CGHandler.
Definition: BaseCG.cc:60
virtual void finish()=0
Called at the end of the DPM simulation to finish the cg evaluation and to close the statFile.
void setAverageBeyondDomain(const bool val)
Definition: BaseCG.h:254
std::function< bool(const BaseInteractable *)> selectedParticle_
Definition: BaseCG.h:342
Vec3D getMin() const
Returns min_, the lower limit of the spatial domain.
Definition: BaseCG.cc:135
void setXGrid(Mdouble min, Mdouble max, Mdouble h)
Definition: BaseCG.cc:183
Mdouble getTimeMin() const
Returns timeMin_, the lower limit of the temporal domain.
Definition: BaseCG.cc:155
void setEps(Mdouble eps)
Definition: BaseCG.cc:71
std::size_t nZ_
Definition: BaseCG.h:306
void write(std::ostream &os) const override
Writes class content into an output stream, usually a stat file.
Definition: BaseCG.cc:38
void setMin(Vec3D min)
Sets max_, the lower limit of the spatial domain.
Definition: BaseCG.cc:145
virtual void initialise()=0
Called at the beginning of the DPM simulation to initialise the cg evaluation and to open the statFil...
void setZGrid(Mdouble min, Mdouble max, Mdouble h)
Definition: BaseCG.cc:195
void selectSpecies(unsigned speciesIndex)
Definition: BaseCG.cc:208
virtual void setRadius(Mdouble radius)=0
bool getVerbose() const
Definition: BaseCG.h:260
void setNZ(std::size_t nZ)
Sets nZ_, the number of spatial mesh points in the z-direction.
Definition: BaseCG.cc:81
virtual BaseCG * copy() const =0
Copy operator. Required for BaseHandler::copyAndAddObject.
std::size_t getNZ() const
Returns nZ_, the number of spatial mesh points in the z-direction.
Definition: BaseCG.cc:86
void setTimeMax(Mdouble timeMax)
Sets timeMax_, the upper limit of the temporal domain.
Definition: BaseCG.cc:130
void setGrid(Vec3D min, Vec3D max, Mdouble h)
Definition: BaseCG.cc:201
void setN(std::size_t n)
Sets nX_, nY_, nZ_, the number of spatial mesh points in each cartesian direction.
Definition: BaseCG.cc:111
std::size_t nX_
Definition: BaseCG.h:296
std::size_t getNX() const
Returns nX_, the number of spatial mesh points in the x-direction.
Definition: BaseCG.cc:106
Mdouble timeMax_
Definition: BaseCG.h:325
CGHandler * handler_
Definition: BaseCG.h:287
void setHZ(Mdouble h)
Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX,...
Definition: BaseCG.cc:247
virtual Mdouble getWidthTime() const
Definition: BaseCG.cc:266
bool verbose_
Definition: BaseCG.h:357
void read(std::istream &is) override
Currently, no read functions are implemented for the CGHandler, but the function is required for any ...
Definition: BaseCG.cc:31
virtual void setStandardDeviation(Mdouble std)=0
bool getAverageBeyondDomain() const
Definition: BaseCG.h:256
Vec3D max_
Definition: BaseCG.h:337
Vec3D getMax() const
Returns max_, the upper limit of the spatial domain.
Definition: BaseCG.cc:140
virtual void setTimeStep(Mdouble timeStep)
Definition: BaseCG.cc:261
void setY(Mdouble min, Mdouble max)
Sets min_.Y, max_.Y, the limits of the spatial domain in Y.
Definition: BaseCG.cc:171
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:34
It is an abstract base class due to the purely virtual functions declared below. Even if the function...
Definition: BaseObject.h:30
Container that stores all CG objects.
Definition: CGHandler.h:45
Definition: Kernel/Math/Vector.h:30
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
double eps
Definition: crbond_bessel.cc:24
val
Definition: calibrate.py:119
bool verbose
Definition: statXZ.cpp:7