23 #ifndef __INITIALIZER_H__
24 #define __INITIALIZER_H__
66 BoundingBox(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax):
67 m_fXmin(xmin), m_fXmax(xmax), m_fYmin(ymin), m_fYmax(ymax), m_fZmin(zmin), m_fZmax(zmax),
68 m_iStartIndex(0), m_iNumber(0) {}
191 double m_fXmin, m_fXmax, m_fYmin, m_fYmax, m_fZmin, m_fZmax;
192 size_t m_iStartIndex;
237 Initializer(
const std::string& inputfileName,
const std::string& debugfileName=
"debug",
bool ifDebug=
false);
666 const std::string m_sDebugfileName;
676 double m_fWriteTimeInterval;
680 int m_iBoundaryObjNum;
681 bool m_iRandomDirSplitOrder;
687 double m_fInitParticleSpacing;
689 bool m_iMovingBoxForGhostParticle;
691 double m_fThresholdP;
697 std::size_t m_iMaxNeighbourNum;
698 std::size_t m_iMaxNeighbourNumInOneDir;
699 std::size_t m_iNumRow2ndOrder;
700 std::size_t m_iNumRow1stOrder;
701 std::size_t m_iNumCol2ndOrder;
702 std::size_t m_iNumCol1stOrder;
703 double m_fNeiSearchRadius;
704 double m_fInvalidPressure;
705 double m_fInvalidVolume;
707 double m_fContactLength;
714 std::size_t m_iCapacity;
715 std::size_t m_iFluidNum;
716 std::size_t m_iBoundaryNum;
719 std::size_t m_iFluidStartIndex;
720 std::size_t m_iBoundaryStartIndex;
721 std::size_t m_iGhostStartIndex;
722 std::vector<BoundingBox*> m_vFluidBoundingBox;
723 std::vector<Geometry*> m_vFluidObj;
724 std::vector<BoundingBox*> m_vBoundaryBoundingBox;
725 std::vector<Geometry*> m_vBoundaryObj;
726 std::vector<State*> m_vFluidObjState;
727 std::vector<std::string> m_vFluidObjNames;
728 std::vector<std::string> m_vFluidObjStateNames;
729 std::vector<std::string> m_vBoundaryObjNames;
730 std::vector<std::string> m_vBoundaryObjTypes;
732 size_t m_iNumParticleWithinSearchRadius;
738 double* m_vPositionX;
739 double* m_vPositionY;
740 double* m_vPositionZ;
741 double* m_vVelocityU;
742 double* m_vVelocityV;
743 double* m_vVelocityW;
746 double* m_vSoundSpeed;
759 void initParticleDataMemory();
765 void computeInitBoundingBox();
768 void initGeometryAndState();
771 size_t initGeometryAndState1D(
bool saveData);
774 size_t initGeometryAndStateOnHexPacking(
bool saveData,
const std::string& kind);
777 void computeNumParticleWithinSearchRadius();
780 void setBoundingBoxStartIndex();
791 #endif // __INITIALIZER_H__
This class is keeps the information of the boundaries of a fluid/boundary object. ...
Definition: initializer.h:51
void setYmin(double ymin)
Setter function of the minimum value in y-coordinate of the bounding box.
Definition: initializer.h:150
void setXmin(double xmin)
Setter function of the minimum value in x-coordinate of the bounding box.
Definition: initializer.h:136
bool getIfDebug() const
Getter function of the boolean value on whether to print debug information.
Definition: initializer.h:249
double getContactLength() const
Getter function of the specified length such that if the distance between two particles coming from d...
Definition: initializer.h:462
double * getSoundSpeed() const
Getter function of the array of sound speed of the initialized particles.
Definition: initializer.h:626
EOS * getEOS() const
Getter function of the pointer to an object in the EOS family.
Definition: initializer.h:648
double getWriteTimeInterval() const
Getter function of the specified physical time interval between writes.
Definition: initializer.h:284
void setNumber(size_t num)
Setter function of the number of particles of the fluid/boundary object inside this bounding box...
Definition: initializer.h:189
double * getVolume() const
Getter function of the array of volume of the initialized particles.
Definition: initializer.h:602
size_t getNumber()
Getter function of the number of particles of the fluid/boundary object inside this bounding box...
Definition: initializer.h:128
double getStartTime() const
Getter function of the specified simulation physical start time.
Definition: initializer.h:270
std::size_t getNumCol2ndOrder() const
Getter function of the theoretical minimum number of neighbours required in one direction of a partic...
Definition: initializer.h:402
~Initializer()
Destructor.
Definition: initializer.cpp:195
const std::vector< std::string > & getBoundaryObjTypes() const
Getter function of the types of the initialized boundary objects.
Definition: initializer.h:662
Initializer(const std::string &inputfileName, const std::string &debugfileName="debug", bool ifDebug=false)
Constructor.
Definition: initializer.cpp:21
int getTreeDepth() const
Getter function of the specified tree depth for the octree neighbour search algorithm.
Definition: initializer.h:446
double getThresholdP() const
Getter function of the specified threshold value on pressure if limiter is used.
Definition: initializer.h:356
std::size_t getNumRow1stOrder() const
Getter function of the specified minimum number of neighbours in one direction of a particle for usin...
Definition: initializer.h:391
double getZmin()
Getter function of the minimum value in z-coordinate of the bounding box.
Definition: initializer.h:103
int getEOSChoice() const
Getter function of the specified choice of equation of state (eos)
Definition: initializer.h:319
bool getRandomDirSplitOrder() const
Getter function of the specified boolean value on whether to use random order of Strang splitting or ...
Definition: initializer.h:305
double * getPositionY() const
Getter function of the array of y-coordinates of the initialized particles.
Definition: initializer.h:542
double getYmax()
Getter function of the maximum value in y-coordinate of the bounding box.
Definition: initializer.h:96
int getNumThreads() const
Getter function of the specified number of threads.
Definition: initializer.h:263
An abstract class for the initialization of the geometry of fluid objects.
Definition: geometry.h:38
std::size_t getGhostStartIndex() const
Getter function of the start index of ghost particles in the particle arrays of the ParticleData clas...
Definition: initializer.h:507
void setYmax(double ymax)
Setter function of the maximum value in y-coordinate of the bounding box.
Definition: initializer.h:157
double getZmax()
Getter function of the maximum value in z-coordinate of the bounding box.
Definition: initializer.h:110
double getYmin()
Getter function of the minimum value in y-coordinate of the bounding box.
Definition: initializer.h:89
double * getPositionX() const
Getter function of the array of x-coordinates of the initialized particles.
Definition: initializer.h:530
int getLPFOrder() const
Getter function of the specified order of Local Polynomial Fitting.
Definition: initializer.h:312
double getInvalidPressure() const
Getter function of the specified maximum/minimum pressure value a particle can possibly attain...
Definition: initializer.h:430
double getCFLCoeff() const
Getter function of the specified CFL coefficient.
Definition: initializer.h:291
std::size_t getNumRow2ndOrder() const
Getter function of the specified minimum number of neighbours in one direction of a particle for usin...
Definition: initializer.h:382
void setXmax(double xmax)
Setter function of the maximum value in x-coordinate of the bounding box.
Definition: initializer.h:143
An abstract class for the initialization of the state of fluid objects.
Definition: state.h:41
double getNeiSearchRadius() const
Getter function of the specified radius for neighbour search.
Definition: initializer.h:420
This class initializes the simulation.
Definition: initializer.h:227
bool getUseLimiter() const
Getter function of the specified boolean value on whether to use limiter or not.
Definition: initializer.h:348
An abstract class for the calculation of energy and sound speed based on different EOS models...
Definition: eos.h:42
void setStartIndex(size_t index)
Setter function of the start index in the particle arrays of the fluid/boundary object inside this bo...
Definition: initializer.h:181
bool getMovingBoxForGhostParticle() const
Getter function of the specified boolean value on whether to update the bounding box of fluid objects...
Definition: initializer.h:340
int * getObjectTag() const
Getter function of the array of "object tags" of the initialized particles.
Definition: initializer.h:636
double getEndTime() const
Getter function of the specified simulation physical end time.
Definition: initializer.h:277
std::size_t getMaxNeighbourNum() const
Getter function of the specified maximum number of neighbours of a particle.
Definition: initializer.h:364
void setZmax(double zmax)
Setter function of the maximum value in z-coordinate of the bounding box.
Definition: initializer.h:171
std::size_t getCapacity() const
Getter function of the specified array length for particle data arrays such as x, y...
Definition: initializer.h:472
double getInitParticleSpacing() const
Getter function of the specified initial inter-particle spacing.
Definition: initializer.h:326
std::string getDebugfileName() const
Getter function of the filename for printing debug information.
Definition: initializer.h:256
double * getVelocityW() const
Getter function of the array of velocity in z-coordinate of the initialized particles.
Definition: initializer.h:590
double * getVelocityU() const
Getter function of the array of velocity in x-coordinate of the initialized particles.
Definition: initializer.h:566
void setZmin(double zmin)
Setter function of the minimum value in z-coordinate of the bounding box.
Definition: initializer.h:164
std::size_t getNumCol1stOrder() const
Getter function of the theoretical minimum number of neighbours required in one direction of a partic...
Definition: initializer.h:413
int getDimension() const
Getter function of the specified dimension of simulation.
Definition: initializer.h:298
double * getPositionZ() const
Getter function of the array of z-coordinates of the initialized particles.
Definition: initializer.h:554
double getInvalidVolume() const
Getter function of the specified maximum/minimum volume value a particle can possibly attain...
Definition: initializer.h:439
std::size_t getMaxNeighbourNumInOneDir() const
Getter function of the specified maximum number of neighbours in one direction (eg. right-hand-side in the x-coordinate) of a particle.
Definition: initializer.h:373
const std::vector< BoundingBox * > & getFluidBoundingBox() const
Getter function of the bounding boxes for the initialized fluid objects.
Definition: initializer.h:655
size_t getStartIndex()
Getter function of the start index in the particle arrays of the fluid/boundary object inside this bo...
Definition: initializer.h:120
std::size_t getFluidNum() const
Getter function of the number of fluid particles initialized.
Definition: initializer.h:479
double getXmin()
Getter function of the minimum value in x-coordinate of the bounding box.
Definition: initializer.h:75
double getGravity() const
Getter function of the specified gravity value.
Definition: initializer.h:333
std::size_t getBoundaryNum() const
Getter function of the number of boundary particles initialized.
Definition: initializer.h:486
double * getPressure() const
Getter function of the array of pressure of the initialized particles.
Definition: initializer.h:614
std::size_t getFluidStartIndex() const
Getter function of the start index of fluid particles in the particle data arrays.
Definition: initializer.h:493
std::size_t getNumParticleWithinSearchRadius() const
Getter function of the number of particles located inside the specified radius of neighbour search at...
Definition: initializer.h:517
BoundingBox(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
Constructor.
Definition: initializer.h:66
double getXmax()
Getter function of the maximum value in x-coordinate of the bounding box.
Definition: initializer.h:82
double * getVelocityV() const
Getter function of the array of velocity in y-coordinate of the initialized particles.
Definition: initializer.h:578
std::size_t getBoundaryStartIndex() const
Getter function of the start index of boundary particles in the particle data arrays.
Definition: initializer.h:500