revision: v0.14
BaseCG Class Referenceabstract

Base class of all CG objects, needed to store the various CG objects in the CGHandler. More...

#include <BaseCG.h>

+ Inheritance diagram for BaseCG:

Public Member Functions

 BaseCG ()
 Simple constructor, sets default values. More...
 
 BaseCG (const BaseCG &p)=default
 Default copy constructor, copies all values. More...
 
 ~BaseCG () override=default
 Default destructor, does nothing. More...
 
void read (std::istream &is) override
 Currently, no read functions are implemented for the CGHandler, but the function is required for any derivative of BaseObject. More...
 
void write (std::ostream &os) const override
 Writes class content into an output stream, usually a stat file. More...
 
void clear ()
 This class seems to have no use (?), but is required for any derivative of BaseObject. More...
 
virtual BaseCGcopy () const =0
 Copy operator. Required for BaseHandler::copyAndAddObject. More...
 
virtual void initialise ()=0
 Called at the beginning of the DPM simulation to initialise the cg evaluation and to open the statFile. More...
 
virtual void evaluate ()=0
 Called after a given number of time steps (statFile::saveCount_) to evaluate the CG fields. More...
 
virtual void finish ()=0
 Called at the end of the DPM simulation to finish the cg evaluation and to close the statFile. More...
 
void setHandler (CGHandler *handler)
 Sets handler_, the pointer to the CGHandler. More...
 
CGHandlergetHandler () const
 Returns handler_, a pointer to the CGHandler. More...
 
virtual void setWidth (Mdouble width)=0
 Sets width_, the coarse-graining width. More...
 
virtual Mdouble getWidth () const =0
 Returns width_, the coarse-graining width. More...
 
void setNZ (std::size_t nZ)
 Sets nZ_, the number of spatial mesh points in the z-direction. More...
 
std::size_t getNZ () const
 Returns nZ_, the number of spatial mesh points in the z-direction. More...
 
void setNY (std::size_t nY)
 Sets nY_, the number of spatial mesh points in the y-direction. More...
 
std::size_t getNY () const
 Returns nY_, the number of spatial mesh points in the y-direction. More...
 
void setNX (std::size_t nX)
 Sets nX_, the number of spatial mesh points in the x-direction. More...
 
std::size_t getNX () const
 Returns nX_, the number of spatial mesh points in the x-direction. More...
 
void setN (std::size_t n)
 Sets nX_, nY_, nZ_, the number of spatial mesh points in each cartesian direction. More...
 
void setN (std::array< std::size_t, 3 > n)
 Sets nX_, nY_, nZ_, the number of spatial mesh points in each cartesian direction. More...
 
void setH (Mdouble h)
 Sets nX_, nY_, nZ_, the number of spatial mesh points in each cartesian direction. However, instead of explicitly defining n, the mesh size h=(max-min)/n is defined. More...
 
void setHX (Mdouble h)
 Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX, the mesh size hX=(max.X-min.X)/nX is defined. More...
 
void setHY (Mdouble h)
 Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX, the mesh size hX=(max.X-min.X)/nX is defined. More...
 
void setHZ (Mdouble h)
 Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX, the mesh size hX=(max.X-min.X)/nX is defined. More...
 
void setTimeMin (Mdouble timeMin)
 Sets timeMin_, the lower limit of the temporal domain. More...
 
void setTimeMax (Mdouble timeMax)
 Sets timeMax_, the upper limit of the temporal domain. More...
 
Mdouble getTimeMin () const
 Returns timeMin_, the lower limit of the temporal domain. More...
 
Mdouble getTimeMax () const
 Returns timeMax_, the upper limit of the temporal domain. More...
 
void setMin (Vec3D min)
 Sets max_, the lower limit of the spatial domain. More...
 
void setX (Mdouble min, Mdouble max)
 Sets min_.X, max_.X, the limits of the spatial domain in X. More...
 
void setY (Mdouble min, Mdouble max)
 Sets min_.Y, max_.Y, the limits of the spatial domain in Y. More...
 
void setZ (Mdouble min, Mdouble max)
 Sets min_.Z, max_.Z, the limits of the spatial domain in Z. More...
 
void setXGrid (Mdouble min, Mdouble max, Mdouble h)
 
void setYGrid (Mdouble min, Mdouble max, Mdouble h)
 
void setZGrid (Mdouble min, Mdouble max, Mdouble h)
 
void setGrid (Vec3D min, Vec3D max, Mdouble h)
 
void setMax (Vec3D max)
 Sets max_, the upper limit of the spatial domain. More...
 
Vec3D getMin () const
 Returns min_, the lower limit of the spatial domain. More...
 
Vec3D getMax () const
 Returns max_, the upper limit of the spatial domain. More...
 
void selectSpecies (unsigned speciesIndex)
 
void setSelectedParticle (const std::function< const bool(const BaseInteractable *)> &selectedParticle)
 
void setEps (Mdouble eps)
 
Mdouble getEps () const
 
void setAverageBeyondDomain (const bool val)
 
bool getAverageBeyondDomain () const
 
virtual void setStandardDeviation (Mdouble std)=0
 
virtual void setRadius (Mdouble radius)=0
 
- Public Member Functions inherited from BaseObject
 BaseObject ()=default
 Default constructor. More...
 
 BaseObject (const BaseObject &p)=default
 Copy constructor, copies all the objects BaseObject contains. More...
 
virtual ~BaseObject ()=default
 virtual destructor More...
 
virtual std::string getName () const =0
 A purely virtual function. More...
 
virtual void moveInHandler (unsigned int index)
 Except that it is virtual, it does the same thing as setIndex() does. More...
 
void setIndex (unsigned int index)
 Allows one to assign an index to an object in the handler/container. More...
 
void setId (unsigned long id)
 Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More...
 
unsigned int getIndex () const
 Returns the index of the object in the handler. More...
 
unsigned int getId () const
 Returns the unique identifier of any particular object. More...
 
void setGroupId (unsigned groupId)
 
unsigned getGroupId () const
 

Public Attributes

File statFile
 File class to handle the output into a .stat file. More...
 

Protected Attributes

CGHandlerhandler_
 
std::size_t nX_
 
std::size_t nY_
 
std::size_t nZ_
 
Mdouble eps_
 
Mdouble timeMin_
 
Mdouble timeMax_
 
Vec3D min_
 
Vec3D max_
 
std::function< bool(const BaseInteractable *)> selectedParticle_
 
bool averageBeyondDomain_ = true
 Determines whether particles outside the domain are considered when computing the averaged fields. More...
 

Detailed Description

Base class of all CG objects, needed to store the various CG objects in the CGHandler.

The CGHandler contains a set of BaseCG* pointers, which can contain different CG objects.

This class contains properties that any CG class needs:

  • a pointer to a handler_ object with set and get functions
  • the variables and functionality inherited from BaseObject
  • initialize, evaluate, and finalize functions called by the CGHandler
  • parameters that specify the options to initialize the mesh of CGPoints (min_, max_, nX_, nY_, nZ_) and properties of the CGFunction (width_)
  • parameters that specify when evaluate will be called (timeMin_, timeMax_)
  • the statFile into which statistical output is written.

Constructor & Destructor Documentation

◆ BaseCG() [1/2]

BaseCG::BaseCG ( )

Simple constructor, sets default values.

30 {
31  handler_ = nullptr;
32  statFile.getFstream().precision(8);
33  statFile.getFstream().setf(std::ios::left);
35  nX_ = 1;
36  nY_ = 1;
37  nZ_ = 1;
42  selectedParticle_ = [](const BaseInteractable* p) { return true; };
43  logger(DEBUG, "BaseCG::BaseCG() finished");
44 }

References FATAL, File::getFstream(), handler_, constants::inf, logger, max_, min_, NEVER, nX_, nY_, nZ_, selectedParticle_, File::setLastSavedTimeStep(), statFile, timeMax_, and timeMin_.

◆ BaseCG() [2/2]

BaseCG::BaseCG ( const BaseCG p)
default

Default copy constructor, copies all values.

◆ ~BaseCG()

BaseCG::~BaseCG ( )
overridedefault

Default destructor, does nothing.

Member Function Documentation

◆ clear()

void BaseCG::clear ( )

This class seems to have no use (?), but is required for any derivative of BaseObject.

47 {
48  logger(WARN, "BaseCG::clear(), this function shouldn't be called");
49 }

References logger, and WARN.

◆ copy()

◆ evaluate()

◆ finish()

◆ getAverageBeyondDomain()

bool BaseCG::getAverageBeyondDomain ( ) const
inline
277 {return averageBeyondDomain_;}

References averageBeyondDomain_.

◆ getEps()

Mdouble BaseCG::getEps ( ) const
97 {
98  return eps_;
99 }

References eps_.

◆ getHandler()

CGHandler * BaseCG::getHandler ( ) const

Returns handler_, a pointer to the CGHandler.

Returns
pointer to the CGHandler
81 {
82 #ifdef DEBUG_OUTPUT
83  if (handler_ == nullptr)
84  {
85  std::cerr << "error: handler_==0 " << std::endl;
86  }
87 #endif
88  return handler_;
89 }

References handler_.

◆ getMax()

Vec3D BaseCG::getMax ( ) const

Returns max_, the upper limit of the spatial domain.

161 {
162  return max_;
163 }

References max_.

◆ getMin()

Vec3D BaseCG::getMin ( ) const

Returns min_, the lower limit of the spatial domain.

156 {
157  return min_;
158 }

References min_.

◆ getNX()

std::size_t BaseCG::getNX ( ) const

Returns nX_, the number of spatial mesh points in the x-direction.

127 {
128  return nX_;
129 }

References nX_.

Referenced by commandLineCG(), and setHX().

◆ getNY()

std::size_t BaseCG::getNY ( ) const

Returns nY_, the number of spatial mesh points in the y-direction.

117 {
118  return nY_;
119 }

References nY_.

Referenced by commandLineCG(), and setHY().

◆ getNZ()

std::size_t BaseCG::getNZ ( ) const

Returns nZ_, the number of spatial mesh points in the z-direction.

107 {
108  return nZ_;
109 }

References nZ_.

Referenced by commandLineCG(), and setHZ().

◆ getTimeMax()

Mdouble BaseCG::getTimeMax ( ) const

Returns timeMax_, the upper limit of the temporal domain.

181 {
182  return timeMax_;
183 }

References timeMax_.

Referenced by CGHandler::evaluate(), and CGHandler::getTimeMax().

◆ getTimeMin()

Mdouble BaseCG::getTimeMin ( ) const

Returns timeMin_, the lower limit of the temporal domain.

176 {
177  return timeMin_;
178 }

References timeMin_.

Referenced by CGHandler::evaluate(), and CGHandler::getTimeMin().

◆ getWidth()

virtual Mdouble BaseCG::getWidth ( ) const
pure virtual

Returns width_, the coarse-graining width.

Implemented in CG< Coordinates, BaseFunction, Fields >.

Referenced by commandLineCG(), and write().

◆ initialise()

◆ read()

void BaseCG::read ( std::istream &  is)
overridevirtual

Currently, no read functions are implemented for the CGHandler, but the function is required for any derivative of BaseObject.

Implements BaseObject.

53 {
54 }

◆ selectSpecies()

void BaseCG::selectSpecies ( unsigned  speciesIndex)

sets selectedParticle_ such that only particles of a certain species are selected

Parameters
speciesIndex
229 {
230  selectedParticle_ = [speciesIndex](const BaseInteractable* p)
231  {
232  return p->getIndSpecies() == speciesIndex;
233  };
234 }

References selectedParticle_.

Referenced by commandLineCG().

◆ setAverageBeyondDomain()

void BaseCG::setAverageBeyondDomain ( const bool  val)
inline

References averageBeyondDomain_.

Referenced by commandLineCG().

◆ setEps()

void BaseCG::setEps ( Mdouble  eps)
92 {
93  eps_ = eps;
94 }

References eps_.

◆ setGrid()

void BaseCG::setGrid ( Vec3D  min,
Vec3D  max,
Mdouble  h 
)
222 {
223  setMin(min);
224  setMax(max);
225  setH(h);
226 }

References setH(), setMax(), and setMin().

◆ setH()

void BaseCG::setH ( Mdouble  h)

Sets nX_, nY_, nZ_, the number of spatial mesh points in each cartesian direction. However, instead of explicitly defining n, the mesh size h=(max-min)/n is defined.

242 {
243  setHX(h);
244  setHY(h);
245  setHZ(h);
246  logger(INFO, "min % max % h % nz %", min_, max_, h, nZ_);
247 }

References INFO, logger, max_, min_, nZ_, setHX(), setHY(), and setHZ().

Referenced by commandLineCG(), and setGrid().

◆ setHandler()

void BaseCG::setHandler ( CGHandler handler)

Sets handler_, the pointer to the CGHandler.

73 {
74  handler_ = handler;
75 }

References handler_.

Referenced by CGHandler::addObject().

◆ setHX()

void BaseCG::setHX ( Mdouble  h)

Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX, the mesh size hX=(max.X-min.X)/nX is defined.

250 {
251  logger.assert_debug(h > 0, "setHX(%): h has to be positive");
252  logger.assert_debug(max_.X!=constants::inf && min_.X!=-constants::inf,
253  "setHX(%) can only be used after setting min and max values", h);
254  setNX(static_cast<size_t>(std::ceil((max_.X - min_.X) / h)));
255  logger.assert_always(getNX() > 0, "setHX(%) generated nX=% for %<x<%", h, getNX(), min_.X, max_.X);
256 }

References getNX(), constants::inf, logger, max_, min_, setNX(), and Vec3D::X.

Referenced by commandLineCG(), setH(), and setXGrid().

◆ setHY()

void BaseCG::setHY ( Mdouble  h)

Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX, the mesh size hX=(max.X-min.X)/nX is defined.

259 {
260  logger.assert_debug(h > 0, "setHY(%): h has to be positive");
261  logger.assert_debug(max_.Y!=constants::inf && min_.Y!=-constants::inf,
262  "setHY(%) can only be used after setting min and max values", h);
263  setNY(static_cast<size_t>(std::ceil((max_.Y - min_.Y) / h)));
264  logger.assert_always(getNY() > 0, "setHY(%) generated nY=% for %<y<%", h, getNY(), min_.Y, max_.Y);
265 }

References getNY(), constants::inf, logger, max_, min_, setNY(), and Vec3D::Y.

Referenced by commandLineCG(), setH(), and setYGrid().

◆ setHZ()

void BaseCG::setHZ ( Mdouble  h)

Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX, the mesh size hX=(max.X-min.X)/nX is defined.

268 {
269  logger.assert_debug(h > 0, "setHZ(%): h has to be positive");
270  logger.assert_debug(max_.Z!=constants::inf && min_.Z!=-constants::inf,
271  "setHZ(%) can only be used after setting min and max values", h);
272  setNZ(static_cast<size_t>(std::ceil((max_.Z - min_.Z) / h)));
273  logger.assert_always(getNZ() > 0, "setHZ(%) generated nZ=% for %<z<%", h, getNZ(), min_.Z, max_.Z);
274 }

References getNZ(), constants::inf, logger, max_, min_, setNZ(), and Vec3D::Z.

Referenced by commandLineCG(), setH(), and setZGrid().

◆ setMax()

void BaseCG::setMax ( Vec3D  max)

Sets max_, the upper limit of the spatial domain.

171 {
172  max_ = max;
173 }

References max_.

Referenced by commandLineCG(), and setGrid().

◆ setMin()

void BaseCG::setMin ( Vec3D  min)

Sets max_, the lower limit of the spatial domain.

166 {
167  min_ = min;
168 }

References min_.

Referenced by commandLineCG(), and setGrid().

◆ setN() [1/2]

void BaseCG::setN ( std::array< std::size_t, 3 >  n)

Sets nX_, nY_, nZ_, the number of spatial mesh points in each cartesian direction.

139 {
140  nX_ = n[0];
141  nY_ = n[1];
142  nZ_ = n[2];
143 }

References n, nX_, nY_, and nZ_.

◆ setN() [2/2]

void BaseCG::setN ( std::size_t  n)

Sets nX_, nY_, nZ_, the number of spatial mesh points in each cartesian direction.

132 {
133  nX_ = n;
134  nY_ = n;
135  nZ_ = n;
136 }

References n, nX_, nY_, and nZ_.

Referenced by commandLineCG(), and main().

◆ setNX()

void BaseCG::setNX ( std::size_t  nX)

Sets nX_, the number of spatial mesh points in the x-direction.

122 {
123  nX_ = nX;
124 }

References nX_.

Referenced by commandLineCG(), main(), and setHX().

◆ setNY()

void BaseCG::setNY ( std::size_t  nY)

Sets nY_, the number of spatial mesh points in the y-direction.

112 {
113  nY_ = nY;
114 }

References nY_.

Referenced by commandLineCG(), and setHY().

◆ setNZ()

void BaseCG::setNZ ( std::size_t  nZ)

Sets nZ_, the number of spatial mesh points in the z-direction.

102 {
103  nZ_ = nZ;
104 }

References nZ_.

Referenced by commandLineCG(), main(), setCGHandler(), and setHZ().

◆ setRadius()

◆ setSelectedParticle()

void BaseCG::setSelectedParticle ( const std::function< const bool(const BaseInteractable *)> &  selectedParticle)
237 {
238  selectedParticle_ = selectedParticle;
239 }

References selectedParticle_.

◆ setStandardDeviation()

◆ setTimeMax()

void BaseCG::setTimeMax ( Mdouble  timeMax)

Sets timeMax_, the upper limit of the temporal domain.

151 {
152  timeMax_ = timeMax;
153 }

References timeMax_.

Referenced by commandLineCG(), and main().

◆ setTimeMin()

void BaseCG::setTimeMin ( Mdouble  timeMin)

Sets timeMin_, the lower limit of the temporal domain.

146 {
147  timeMin_ = timeMin;
148 }

References timeMin_.

Referenced by commandLineCG(), and main().

◆ setWidth()

virtual void BaseCG::setWidth ( Mdouble  width)
pure virtual

◆ setX()

void BaseCG::setX ( Mdouble  min,
Mdouble  max 
)

Sets min_.X, max_.X, the limits of the spatial domain in X.

186 {
187  min_.X = min;
188  max_.X = max;
189 }

References max_, min_, and Vec3D::X.

Referenced by commandLineCG(), and setXGrid().

◆ setXGrid()

void BaseCG::setXGrid ( Mdouble  min,
Mdouble  max,
Mdouble  h 
)
204 {
205  setX(min,max);
206  setHX(h);
207 }

References setHX(), and setX().

◆ setY()

void BaseCG::setY ( Mdouble  min,
Mdouble  max 
)

Sets min_.Y, max_.Y, the limits of the spatial domain in Y.

192 {
193  min_.Y = min;
194  max_.Y = max;
195 }

References max_, min_, and Vec3D::Y.

Referenced by commandLineCG(), and setYGrid().

◆ setYGrid()

void BaseCG::setYGrid ( Mdouble  min,
Mdouble  max,
Mdouble  h 
)
210 {
211  setY(min,max);
212  setHY(h);
213 }

References setHY(), and setY().

◆ setZ()

void BaseCG::setZ ( Mdouble  min,
Mdouble  max 
)

Sets min_.Z, max_.Z, the limits of the spatial domain in Z.

198 {
199  min_.Z = min;
200  max_.Z = max;
201 }

References max_, min_, and Vec3D::Z.

Referenced by commandLineCG(), and setZGrid().

◆ setZGrid()

void BaseCG::setZGrid ( Mdouble  min,
Mdouble  max,
Mdouble  h 
)
216 {
217  setZ(min,max);
218  setHZ(h);
219 }

References setHZ(), and setZ().

◆ write()

void BaseCG::write ( std::ostream &  os) const
overridevirtual

Writes class content into an output stream, usually a stat file.

Parameters
[out]osoutput stream to which data is written

Implements BaseObject.

Reimplemented in TimeSmoothedCG< Coordinates, BaseFunction, Fields >, TimeAveragedCG< Coordinates, BaseFunction, Fields >, TimeAveragedCG< CGCoordinates::XYZ, BaseFunction, CGFields::StandardFields >, CG< Coordinates, BaseFunction, Fields >, CG< CGCoordinates::XYZ, BaseFunction, CGFields::StandardFields >, CG< Coordinates, CGFunctions::Lucy, CGFields::StandardFields >, and CG< CGCoordinates::O, CGFunctions::Lucy, CGFields::StandardFields >.

60 {
61  //BaseObject::write(os);
62  os << getName();
63  os << " min " << min_;
64  os << " max " << max_;
65  if (!std::isinf(timeMin_)) os << " timeMin " << timeMin_;
66  if (!std::isinf(timeMax_)) os << " timeMax " << timeMax_;
67  os << " n " << nX_ << " " << nY_ << " " << nZ_;
68  os << " width " << getWidth();
69  //statFile
70 }

References BaseObject::getName(), getWidth(), max_, min_, nX_, nY_, nZ_, timeMax_, and timeMin_.

Member Data Documentation

◆ averageBeyondDomain_

bool BaseCG::averageBeyondDomain_ = true
protected

Determines whether particles outside the domain are considered when computing the averaged fields.

If set to true, then the average of field f over a coordinate direction x is computed as \(\frac{1}{x_{max}-x_{min}}\int_{-\infty}^{\infty} f dx\) If set to false, then the average of field f over a coordinate direction x is computed as \(\frac{1}{x_{max}-x_{min}}\int_{x_{min}}^{x_{max}} f dx\)

Todo:

should the default be false?

currently, the above description is not implemented; it simply ignores particles outside the domain.

Referenced by getAverageBeyondDomain(), and setAverageBeyondDomain().

◆ eps_

Mdouble BaseCG::eps_
protected

Finite difference step size used to computed derivatives of CG functions

Referenced by getEps(), and setEps().

◆ handler_

CGHandler* BaseCG::handler_
protected

the pointer to the CGHandler, used to get data from the CGHandler.

Referenced by BaseCG(), getHandler(), and setHandler().

◆ max_

Vec3D BaseCG::max_
protected

see min_.

Referenced by BaseCG(), getMax(), setH(), setHX(), setHY(), setHZ(), setMax(), setX(), setY(), setZ(), and write().

◆ min_

Vec3D BaseCG::min_
protected

min_ and max_ define the spatial dimensions of the coarse-graining volume; if these parameters are not defined by the user, they are set to the system dimensions (DPMBase::min_ and DPMBase::max_) in CG::initialize.

Referenced by BaseCG(), getMin(), setH(), setHX(), setHY(), setHZ(), setMin(), setX(), setY(), setZ(), and write().

◆ nX_

std::size_t BaseCG::nX_
protected

nX_, nY_, and nZ_ define the size of the mesh of CGPoints, i.e. the spatial positions at which the cg variables are evaluated. nX_, nY_, and nZ_ are the number of points in x-, y-, and z-direction. the is used to set the width of the These values are set to 1 by default, unless modified by the user.

Referenced by BaseCG(), getNX(), setN(), setNX(), and write().

◆ nY_

std::size_t BaseCG::nY_
protected

see nX_

Referenced by BaseCG(), getNY(), setN(), setNY(), and write().

◆ nZ_

std::size_t BaseCG::nZ_
protected

see nZ_

Referenced by BaseCG(), getNZ(), setH(), setN(), setNZ(), and write().

◆ selectedParticle_

std::function<bool(const BaseInteractable*)> BaseCG::selectedParticle_
protected

A function returning true for each particle that should be included in the statistics (all by default).

Referenced by BaseCG(), selectSpecies(), and setSelectedParticle().

◆ statFile

File BaseCG::statFile

File class to handle the output into a .stat file.

Referenced by BaseCG(), commandLineCG(), CGHandler::evaluate(), CGHandler::finish(), main(), and setCGHandler().

◆ timeMax_

Mdouble BaseCG::timeMax_
protected

see timeMin_

Referenced by BaseCG(), getTimeMax(), setTimeMax(), and write().

◆ timeMin_

Mdouble BaseCG::timeMin_
protected

timeMin_ and timeMax_ define the temporal dimensions of the coarse-graining volume; these parameters are set to \(\pm\infty\) by default, unless modified by the user; otherwise, timeMin_ is set to DPMBase::time_ in CG::initialize.

Referenced by BaseCG(), getTimeMin(), setTimeMin(), and write().


The documentation for this class was generated from the following files:
BaseCG::getNZ
std::size_t getNZ() const
Returns nZ_, the number of spatial mesh points in the z-direction.
Definition: BaseCG.cc:106
BaseCG::setNZ
void setNZ(std::size_t nZ)
Sets nZ_, the number of spatial mesh points in the z-direction.
Definition: BaseCG.cc:101
BaseObject::getName
virtual std::string getName() const =0
A purely virtual function.
BaseCG::setH
void setH(Mdouble h)
Sets nX_, nY_, nZ_, the number of spatial mesh points in each cartesian direction....
Definition: BaseCG.cc:241
logger
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Vec3D::X
Mdouble X
the vector components
Definition: Vector.h:65
BaseCG::setNY
void setNY(std::size_t nY)
Sets nY_, the number of spatial mesh points in the y-direction.
Definition: BaseCG.cc:111
BaseCG::setHX
void setHX(Mdouble h)
Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX,...
Definition: BaseCG.cc:249
BaseCG::getNY
std::size_t getNY() const
Returns nY_, the number of spatial mesh points in the y-direction.
Definition: BaseCG.cc:116
BaseCG::eps_
Mdouble eps_
Definition: BaseCG.h:320
INFO
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
BaseCG::getNX
std::size_t getNX() const
Returns nX_, the number of spatial mesh points in the x-direction.
Definition: BaseCG.cc:126
BaseInteractable
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:55
BaseCG::averageBeyondDomain_
bool averageBeyondDomain_
Determines whether particles outside the domain are considered when computing the averaged fields.
Definition: BaseCG.h:363
Vec3D
Definition: Vector.h:50
BaseCG::setMax
void setMax(Vec3D max)
Sets max_, the upper limit of the spatial domain.
Definition: BaseCG.cc:170
BaseCG::setNX
void setNX(std::size_t nX)
Sets nX_, the number of spatial mesh points in the x-direction.
Definition: BaseCG.cc:121
BaseCG::min_
Vec3D min_
Definition: BaseCG.h:340
WARN
LL< Log::WARN > WARN
Warning log level.
Definition: Logger.cc:54
Log::FATAL
@ FATAL
BaseCG::setY
void setY(Mdouble min, Mdouble max)
Sets min_.Y, max_.Y, the limits of the spatial domain in Y.
Definition: BaseCG.cc:191
BaseCG::statFile
File statFile
File class to handle the output into a .stat file.
Definition: BaseCG.h:369
BaseCG::selectedParticle_
std::function< bool(const BaseInteractable *)> selectedParticle_
Definition: BaseCG.h:350
BaseCG::setMin
void setMin(Vec3D min)
Sets max_, the lower limit of the spatial domain.
Definition: BaseCG.cc:165
BaseCG::nY_
std::size_t nY_
Definition: BaseCG.h:309
File::setLastSavedTimeStep
void setLastSavedTimeStep(unsigned int lastSavedTimeStep)
Sets File::nextSavedTimeStep_.
Definition: File.cc:302
Vec3D::Y
Mdouble Y
Definition: Vector.h:65
BaseCG::handler_
CGHandler * handler_
Definition: BaseCG.h:295
BaseCG::nX_
std::size_t nX_
Definition: BaseCG.h:304
NEVER
const unsigned NEVER
Definition: File.h:35
BaseCG::setHY
void setHY(Mdouble h)
Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX,...
Definition: BaseCG.cc:258
BaseCG::getWidth
virtual Mdouble getWidth() const =0
Returns width_, the coarse-graining width.
BaseCG::max_
Vec3D max_
Definition: BaseCG.h:345
BaseCG::timeMin_
Mdouble timeMin_
Definition: BaseCG.h:328
n
const unsigned n
Definition: CG3DPackingUnitTest.cpp:32
BaseCG::setZ
void setZ(Mdouble min, Mdouble max)
Sets min_.Z, max_.Z, the limits of the spatial domain in Z.
Definition: BaseCG.cc:197
BaseCG::setHZ
void setHZ(Mdouble h)
Sets nX_ the number of spatial mesh points in the X-direction. Instead of explicitly defining nX,...
Definition: BaseCG.cc:267
BaseCG::setX
void setX(Mdouble min, Mdouble max)
Sets min_.X, max_.X, the limits of the spatial domain in X.
Definition: BaseCG.cc:185
Vec3D::Z
Mdouble Z
Definition: Vector.h:65
File::getFstream
std::fstream & getFstream()
Allows to access the member variable File::fstream_.
Definition: File.cc:153
BaseCG::timeMax_
Mdouble timeMax_
Definition: BaseCG.h:333
constants::inf
const Mdouble inf
Definition: GeneralDefine.h:44
BaseCG::nZ_
std::size_t nZ_
Definition: BaseCG.h:314