 |
revision: v0.14
|
Go to the documentation of this file.
29 #endif //BaseCluster_H
35 #ifdef MERCURY_USE_MPI
317 void write(std::ostream& os,
bool writeAllParticles)
const override;
void setPosition(Vec3D p)
This sets the value of position_, which is the position in which the cluster will be inserted.
Definition: BaseCluster.cc:60
int getNumberOfInternalStructurePoints() const
This returns the value of the number of particles used to compute internal structure.
Definition: BaseCluster.cc:209
void makeDataAnalysis()
This functions computes some important cluster information needed by the program.
Definition: BaseCluster.cc:1255
BaseCluster()
Default constructor.
Definition: BaseCluster.cc:31
void doEneOutput(bool isEneOutputOn)
This sets the bool variable that defines whether the cluster ene output will be written or not.
Definition: BaseCluster.cc:376
bool setRadiusCluster_
Definition: BaseCluster.h:497
void writeToCdatFile()
This writes on the cluster data output file.
Definition: BaseCluster.cc:1370
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:420
unsigned int getClusterId() const
This returns the value of the cluster ID.
Definition: BaseCluster.cc:175
void setNumberOfInternalStructurePoints(int gL)
This sets the value of the number of particles used to compute the internal structure.
Definition: BaseCluster.cc:217
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:215
bool readRestartFile(ReadOptions opt=ReadOptions::ReadAll)
Reads all the particle data corresponding to a given, existing . restart file (for more details regar...
Definition: DPMBase.cc:2921
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
Vec3D clusterVelocity_
Definition: BaseCluster.h:499
void setRadii()
Sets all radii according to particleRadius and sizeDispersityParticle.
Definition: BaseCluster.cc:983
void createAdjacencyMatrix()
This calculates the adjacency matrix of the cluster.
Definition: BaseCluster.cc:1539
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1241
bool isCdatOutputOn_
Definition: BaseCluster.h:518
void doOverlOutput(bool iOOO)
This sets the bool variable that defines whether the cluster overlap output will be written or not.
Definition: BaseCluster.cc:292
void setZero()
Sets all elements to zero.
Definition: Vector.cc:43
const Mdouble pi
Definition: ExtendedMath.h:45
Definition: BaseCluster.h:51
Mdouble velocityDampingInterval_
Definition: BaseCluster.h:610
void doIntStrucOutput(bool iISOO)
This sets the bool variable that defines whether the cluster internal structure output will be writte...
Definition: BaseCluster.cc:320
void doAmatOutput(bool iAOO)
This sets the bool variable that defines whether the cluster adjacency matrix output will be written ...
Definition: BaseCluster.cc:306
void setParticlesWriteVTK(bool writeParticlesVTK)
Sets whether particles are written in a VTK file.
Definition: DPMBase.cc:934
void clear() override
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0.
Definition: SpeciesHandler.h:54
Mdouble t0_
Definition: BaseCluster.h:598
void read(std::istream &is, ReadOptions opt=ReadOptions::ReadAll) override
Reads the MercuryBase from an input stream, for example a restart file.
Definition: MercuryBase.cc:104
Mdouble meanRelativeOverlap_
Definition: BaseCluster.h:566
bool isVtkOutputOn_
Definition: BaseCluster.h:526
std::vector< std::vector< int > > adjacencyMatrix_
Definition: BaseCluster.h:560
void setSpecies()
Sets species of particles.
Definition: BaseCluster.cc:1002
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:239
Mdouble getVelocityDampingModulus() const
This returns the value of the velocity damping modulus.
Definition: BaseCluster.cc:192
bool isOverlOutputOn_
Definition: BaseCluster.h:520
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Mdouble minRelativeOverlap_
Definition: BaseCluster.h:568
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1390
void dampForce()
This damps values of forceModulus (stage = 3).
Definition: BaseCluster.cc:1529
Mdouble X
the vector components
Definition: Vector.h:65
Vec3D getPosition() const
This returns the value of position_, which is the position in which the cluster will be inserted.
Definition: BaseCluster.cc:52
Mdouble dissipationDuration_
Definition: BaseCluster.h:615
void insertParticles()
Inserts particles inside the domain.
Definition: BaseCluster.cc:1077
Mdouble radiusParticle_
Definition: BaseCluster.h:481
Mdouble getMeanClusterRadius()
this returns meanClusterRadius (radius of an ideal perfectly spherical cluster, there's no setter).
Definition: BaseCluster.cc:383
bool checkParticleForInteraction(const BaseParticle &P) final
Checks if given BaseParticle has an interaction with a BaseWall or other BaseParticle.
Definition: MercuryBase.cc:594
void decreaseForce()
This linearly decreases values of forceModulus (stage = 2).
Definition: BaseCluster.cc:1521
void doCdatOutput(bool iCOO)
This sets the bool variable that defines whether the cluster data output will be written or not.
Definition: BaseCluster.cc:278
void makeAmatFile()
This creates the adjacency matrix file.
Definition: BaseCluster.cc:1562
ReadOptions
Definition: DPMBase.h:243
void setGroupId(unsigned groupId)
Definition: BaseObject.h:131
unsigned int getSize() const
Gets the size of the particleHandler (including mpi and periodic particles)
Definition: BaseHandler.h:655
void setSizeDispersityParticle(Mdouble sDP)
This sets the value of particles' dispersity in size.
Definition: BaseCluster.cc:117
This adds on the hierarchical grid code for 3D problems.
Definition: Mercury3D.h:37
Mdouble boxSize_
Definition: BaseCluster.h:554
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1451
bool setRadiusParticle_
Definition: BaseCluster.h:483
Mdouble maxRelativeOverlap_
Definition: BaseCluster.h:564
unsigned int idCluster_
Definition: BaseCluster.h:493
int getNumberOfParticles() const
This returns the value of the number of particles in the cluster.
Definition: BaseCluster.cc:126
bool particleInsertionSuccessful(int n)
This function tries to insert the n-th particle (returns true if it manage to do that)....
Definition: BaseCluster.cc:1198
virtual void setRadius(Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species)
Definition: BaseParticle.cc:542
void writeToOverlFile()
This writes on the cluster overlap output file.
Definition: BaseCluster.cc:1437
Mdouble radiusCluster_
Definition: BaseCluster.h:495
Mdouble meanCoordinationNumber_
Definition: BaseCluster.h:562
void increaseForce()
This linearly increases the value of forceModulus (stage = 1).
Definition: BaseCluster.cc:1499
bool isAmatOutputOn() const
This returns the bool variable that defines whether the cluster adjacency matrix output is written or...
Definition: BaseCluster.cc:299
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1441
Mdouble getMassFromRadius(Mdouble radius) const
Definition: ParticleSpecies.cc:122
void makeOverlFile()
Creates the cluster overlap output file.
Definition: BaseCluster.cc:1179
bool isEneOutputOn() const
This returns the bool variable that defines whether the cluster ene output is written or not.
Definition: BaseCluster.cc:369
Mdouble clusterTimeMax_
Definition: BaseCluster.h:600
double Mdouble
Definition: GeneralDefine.h:34
bool isIntStrucOutputOn_
Definition: BaseCluster.h:524
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:348
void read(std::istream &is, ReadOptions opt=ReadOptions::ReadAll) override
Overrides DPMBase read(): in this all variables needed by the program for restarting are read.
Definition: BaseCluster.cc:838
bool setNumberOfParticles_
Definition: BaseCluster.h:489
Mdouble fileOutputTimeInterval_
Definition: BaseCluster.h:584
Mdouble collisionTimeOverTimeStep_
Definition: BaseCluster.h:475
BaseParticle * getLargestParticle() const
Returns the pointer of the largest particle in the particle handler. When mercury is running in paral...
Definition: ParticleHandler.cc:530
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:350
bool isCdatOutputOn() const
This returns the bool variable that defines whether the cluster data output (which is NOT the mercury...
Definition: BaseCluster.cc:271
Mdouble radiusForSolidFraction_
Definition: BaseCluster.h:588
std::ofstream gnuplotFile_
Definition: BaseCluster.h:578
bool isFStatOutputOn_
Definition: BaseCluster.h:530
LL< Log::VERBOSE > VERBOSE
Verbose information.
Definition: Logger.cc:57
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
Mdouble getKineticEnergy() const
Returns the global kinetic energy stored in the system.
Definition: DPMBase.cc:1535
bool isFStatOutputOn() const
This returns the bool variable that defines whether the cluster fStat output is written or not.
Definition: BaseCluster.cc:355
Mdouble sin(Mdouble x)
Definition: ExtendedMath.cc:44
LinearPlasticViscoelasticFrictionSpecies * getParticleSpecies() const
This returns the species of the particle.
Definition: BaseCluster.cc:243
void setSpecies(const ParticleSpecies *species)
Definition: BaseParticle.cc:804
void setDomain(const Vec3D &min, const Vec3D &max)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1089
void makeCdatFile()
Creates the cluster data output file.
Definition: BaseCluster.cc:1136
static Mdouble getLength(const Vec3D &a)
Calculates the length of a Vec3D: .
Definition: Vector.cc:331
void makeGnuplotFile()
This creates the gnuplot file needed for printing force vs overlaps values.
Definition: BaseCluster.cc:1688
Mdouble maximumForceModulus_
Definition: BaseCluster.h:604
void doVtkOutput(bool iVOO)
This sets the bool variable that defines whether the cluster vtk output will be written or not.
Definition: BaseCluster.cc:334
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:805
std::ofstream overlFile_
Definition: BaseCluster.h:576
Contains material and contact force properties.
Definition: Species.h:35
LL< Log::WARN > WARN
Warning log level.
Definition: Logger.cc:54
Mdouble solidFraction_
Definition: BaseCluster.h:590
void write(std::ostream &os, bool writeAllParticles) const override
Overrides DPMBase write(): in this all variables needed by the program for restarting are written.
Definition: BaseCluster.cc:791
void clear() override
Empties the whole ParticleHandler by removing all BaseParticle.
Definition: ParticleHandler.cc:973
std::ofstream intStructFile_
Definition: BaseCluster.h:582
Mdouble getFinalMassFraction()
This gets the final value obtained for the mass fraction;.
Definition: BaseCluster.cc:165
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1385
Mdouble round(const Mdouble value, unsigned precision)
Definition: Helpers.cc:598
Vec3D getVelocity()
This gets the value of velocity after creation.
Definition: BaseCluster.cc:257
Mdouble solidFractionIntStruct_
Definition: BaseCluster.h:592
void writeAmatFile()
This writes on the adjacency matrix file.
Definition: BaseCluster.cc:1576
bool isRestartOutputOn() const
This returns the bool variable that defines whether the cluster restart output is written or not.
Definition: BaseCluster.cc:341
Vec3D position_
Definition: BaseCluster.h:471
std::ofstream amatFile_
Definition: BaseCluster.h:580
void setVelocity(Vec3D v)
This sets the value of velocity after creation.
Definition: BaseCluster.cc:264
Mdouble getElasticEnergy() const
Returns the global elastic energy within the system.
Definition: DPMBase.cc:1521
Mdouble massParticle_
Definition: BaseCluster.h:548
void actionsOnRestart() override
Overrides DPMBase actionsOnRestart(): in this all variables needed by the program for restarting are ...
Definition: BaseCluster.cc:884
Mdouble getEnergyRatioTolerance() const
This returns the value of the value of the energy ratio threshold under which the process can be cons...
Definition: BaseCluster.cc:226
Vec3D centerOfMass_
Definition: BaseCluster.h:556
void setVelocityDampingModulus(Mdouble vDM)
This sets the value of the velocity damping modulus.
Definition: BaseCluster.cc:200
Mdouble getAverageOverlap()
this returns the average overlap.
Definition: BaseCluster.cc:390
bool isIntStrucOutputOn() const
This returns the bool variable that defines whether the cluster internal structure output is written ...
Definition: BaseCluster.cc:313
Mdouble sizeDispersityParticle_
Definition: BaseCluster.h:485
void applyCentralForce()
This applies force on each particle.
Definition: BaseCluster.cc:1480
void setDomainLimits()
Sets domain limits.
Definition: BaseCluster.cc:1044
int stage_
Definition: BaseCluster.h:596
A spherical particle is the most simple particle used in MercuryDPM.
Definition: SphericalParticle.h:37
Mdouble velocityDampingModulus_
Definition: BaseCluster.h:505
void doFStatOutput(bool isfStatOutputOn)
This sets the bool variable that defines whether the cluster fStat output will be written or not.
Definition: BaseCluster.cc:362
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:870
bool isAmatOutputOn_
Definition: BaseCluster.h:522
Mdouble Y
Definition: Vector.h:65
Mdouble energyRatioTolerance_
Definition: BaseCluster.h:477
void getLineFromStringStream(std::istream &in, std::stringstream &out)
Reads a line from one stringstream into another, and prepares the latter for reading in.
Definition: Helpers.cc:423
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Definition: DPMBase.cc:397
Mdouble forceDampingModulus_
Definition: BaseCluster.h:617
bool isEneOutputOn_
Definition: BaseCluster.h:532
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
void dampVelocities()
This damps values of each particle velocity (stage = 1, stage = 2, stage = 3).
Definition: BaseCluster.cc:1508
void setNumberOfParticles(int nP)
This sets the value of the number of particles in the cluster.
Definition: BaseCluster.cc:134
bool isOverlOutputOn() const
This returns the bool variable that defines whether the cluster overlap output is written or not.
Definition: BaseCluster.cc:285
Mdouble meanClusterRadius_
Definition: BaseCluster.h:501
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
Mdouble forceTuningDuration_
Definition: BaseCluster.h:612
void calculateTimeStep()
Calculates the time step.
Definition: BaseCluster.cc:1059
Mdouble totalParticleVolume_
Definition: BaseCluster.h:550
void setRadiusParticle(Mdouble rP)
This sets the value of particles' radius if there's no dispersity in size.
Definition: BaseCluster.cc:97
void printTime() const override
Overrides DPMBase printTime(): this way variables of interest are shown.
Definition: BaseCluster.cc:944
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1446
bool isVtkOutputOn() const
This returns the bool variable that defines whether the cluster vtk output is written or not.
Definition: BaseCluster.cc:327
std::ofstream cdatFile_
Definition: BaseCluster.h:574
void write(std::ostream &os, bool writeAllParticles=true) const override
Writes all data into a restart file.
Definition: MercuryBase.cc:147
~BaseCluster() final
Default destructor.
Definition: BaseCluster.cc:38
int nParticles_
Definition: BaseCluster.h:487
bool isRestartOutputOn_
Definition: BaseCluster.h:528
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:379
const unsigned n
Definition: CG3DPackingUnitTest.cpp:32
Mdouble getCollisionTimeOverTimeStep() const
This returns the value of the ratio between collision time and time step.
Definition: BaseCluster.cc:68
const std::vector< T * >::const_iterator begin() const
Gets the begin of the const_iterator over all Object in this BaseHandler.
Definition: BaseHandler.h:690
Mdouble smallestRadius_
Definition: BaseCluster.h:546
Mdouble getRandomNumber()
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:142
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1338
Mdouble getRadiusParticle() const
This returns the value of particles' radius if there's no dispersity in size. In case of dispersity !...
Definition: BaseCluster.cc:88
Mdouble forceModulus_
Definition: BaseCluster.h:606
int nIntraClusterBonds_
Definition: BaseCluster.h:570
void actionsAfterTimeStep() override
Overrides DPMBase actionsAfterTimeStep(): in this compression and decompression are computed,...
Definition: BaseCluster.cc:621
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1395
Mdouble Z
Definition: Vector.h:65
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:406
void setEnergyRatioTolerance(Mdouble eRT)
This sets the value of the value of the energy ratio threshold under which the process can be conside...
Definition: BaseCluster.cc:234
Mdouble forceTuningInterval_
Definition: BaseCluster.h:608
void doRestartOutput(bool isRestartOutputOn)
This sets the bool variable that defines whether the cluster restart output will be written or not.
Definition: BaseCluster.cc:348
Mdouble getMass() const
Returns the particle's mass.
Definition: BaseParticle.h:322
void setClusterId(unsigned int iC)
This sets the value of the cluster ID.
Definition: BaseCluster.cc:183
void setParticleSpecies(LinearPlasticViscoelasticFrictionSpecies *particleSpecies)
This sets the species of the particle.
Definition: BaseCluster.cc:250
void makeIntenalStructureFile()
This creates the file needed for writing down datas from computeInternalStructure().
Definition: BaseCluster.cc:1719
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1436
const std::vector< T * >::const_iterator end() const
Gets the end of the const_iterator over all BaseBoundary in this BaseHandler.
Definition: BaseHandler.h:704
std::string name
Definition: MercuryProb.h:48
void setRadiusCluster(Mdouble rCR)
This sets the desired value of the cluster radius (there is no getter of this value,...
Definition: BaseCluster.cc:149
const Mdouble inf
Definition: GeneralDefine.h:44
std::vector< Mdouble > radii_
Definition: BaseCluster.h:544
LinearPlasticViscoelasticFrictionSpecies * particleSpecies_
Definition: BaseCluster.h:513
Mdouble getSizeDispersityParticle() const
This returns the value of particles' dispersity in size.
Definition: BaseCluster.cc:109
void actionsAfterSolve() override
Overrides DPMBase actionsAfterSolve(): in this cluster data file and cluster overlap file are closed ...
Definition: BaseCluster.cc:733
void setupInitialConditions() override
Overrides DPMBase setupInitialConditions(): in this initial conditions for the problem are set.
Definition: BaseCluster.cc:425
void computeInternalStructure()
This computes the internal structure of the cluster.
Definition: BaseCluster.cc:1602
int nInternalStructurePoints_
Definition: BaseCluster.h:509
Mdouble cos(Mdouble x)
Definition: ExtendedMath.cc:64
InteractionHandler interactionHandler
An object of the class InteractionHandler.
Definition: DPMBase.h:1425
void setCollisionTimeOverTimeStep(Mdouble cTOTS)
This sets the collisionTimeOverTimeStep number (which is the ratio between collision time and time st...
Definition: BaseCluster.cc:76