ClusterGenerator Class Reference

This class allows the user to create clusters of particles. All particles will be of LinearPlasticViscoelasticSpecies and will have a final overlap defined by the user. More...

#include <ClusterGenerator.h>

Public Member Functions

 ClusterGenerator ()
 This constructor initializes all variables to default values. After initialization all values are passed to ClusterDPM with setters. More...
 
 ~ClusterGenerator ()
 Default destructor. More...
 
void create ()
 runs the simulation that creates the cluster. More...
 

Public Attributes

BaseCluster clusterProperties
 
ParticleHandler fakeParticleHandler
 

Private Attributes

Vec3D position_
 
Mdouble collisionTimeOverTimeStep_
 Ratio between collision time and time step: should be at least 50. More...
 
Mdouble sizeDispersityParticle_
 Size dispersity of particles: must be between 0 and 1. More...
 
int nParticles_
 Total number of particles. More...
 
unsigned int idCluster_
 Total number of particles. More...
 
Mdouble clusterSizeSafetyFactor_
 safety factor for the initial size of the cluster: this must be greater than 1. More...
 
Mdouble velocityDampingModulus_
 Value of damping modulus for velocity. More...
 
int internalStructureGridLength_
 Number of points used for creating internal structure's grid. More...
 
Mdouble energyRatioTolerance_
 Energy ratio threshold under wich the simulation can be considered static. More...
 
bool isCdatOutputOn_
 bool used to define whether or not cluster data output must be created. More...
 
bool isOverlOutputOn_
 bool used to define whether or not overlap data output must be created. More...
 
bool isAmatOutputOn_
 bool used to define whether or not adjacency matrix output must be created. More...
 
bool isIntStrucOutputOn_
 bool used to define whether or not cluster internal structure output must be created. More...
 
bool isVtkOutputOn_
 bool used to define whether or not vtk output must be created. More...
 
bool isDataOutputOn_
 bool used to define whether or not data output must be created. More...
 
bool isRestartOutputOn_
 bool used to define whether or not restart output must be created. More...
 
bool isFStatOutputOn_
 bool used to define whether or not fStat output must be created. More...
 
bool isEneOutputOn_
 bool used to define whether or not eneOutput output must be created. More...
 
bool restartSelfTest_
 bool used to define whether or not the restart self test is being computed. More...
 

Detailed Description

This class allows the user to create clusters of particles. All particles will be of LinearPlasticViscoelasticSpecies and will have a final overlap defined by the user.

Constructor & Destructor Documentation

◆ ClusterGenerator()

ClusterGenerator::ClusterGenerator ( )

This constructor initializes all variables to default values. After initialization all values are passed to ClusterDPM with setters.

This constructor initializes all variables to default values. After initialization all values are passed to ClusterDPM with setters. IMPORTANT: radiusParticle here is not initialized nor passed to ClusterDPM in order to force the user to set it, and same is for the species.

37 {
38  /*
39  * ----------------------------------------------------
40  * Initializing variables to default values
41  * ----------------------------------------------------
42  */
43 
44  //Position
45  position_={0,0,0};
46 
47  // Time
49 
50  // Particles
52  nParticles_ = 100;
53 
54  // Cluster
56  idCluster_ = 0;
57 
58  // Central force
60 
61  // Data analysis
63 
64  // Energy
65  energyRatioTolerance_ = 1.0e-8;
66 
67  // File
68  isCdatOutputOn_ = true;//true;
69  isOverlOutputOn_ = true;//true;
70  isAmatOutputOn_ = false;//true;
71  isIntStrucOutputOn_ = false; // Computational intensive
72  isVtkOutputOn_ = false;
73  isDataOutputOn_= true;
74  isRestartOutputOn_ = false;//true;
75  isFStatOutputOn_ = false;
76  isEneOutputOn_ = false;
77 
78  // Restart self test
79  restartSelfTest_ = false;
80 
81 
82  /*
83  * ----------------------------------------------------
84  * Passing values to BaseCluster
85  * ----------------------------------------------------
86  */
87 
89 
91 
93 
95 
97 
98  clusterProperties.setInternalStructureGridLength(internalStructureGridLength_);
99 
101 
103 
105 
107 
109 
111 
113 
115 
117 
118  logger(DEBUG, "ClusterGenerator::ClusterGenerator() finished");
119 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ DEBUG
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 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
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
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
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 setNumberOfParticles(int nP)
This sets the value of the number of particles in the cluster.
Definition: BaseCluster.cc:134
void setVelocityDampingModulus(Mdouble vDM)
This sets the value of the velocity damping modulus.
Definition: BaseCluster.cc:200
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
void setSizeDispersityParticle(Mdouble sDP)
This sets the value of particles' dispersity in size.
Definition: BaseCluster.cc:117
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 setClusterId(unsigned int iC)
This sets the value of the cluster ID.
Definition: BaseCluster.cc:183
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 setCollisionTimeOverTimeStep(Mdouble cTOTS)
This sets the collisionTimeOverTimeStep number (which is the ratio between collision time and time st...
Definition: BaseCluster.cc:76
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
Vec3D position_
Definition: ClusterGenerator.h:76
bool isVtkOutputOn_
bool used to define whether or not vtk output must be created.
Definition: ClusterGenerator.h:116
Mdouble energyRatioTolerance_
Energy ratio threshold under wich the simulation can be considered static.
Definition: ClusterGenerator.h:104
bool isRestartOutputOn_
bool used to define whether or not restart output must be created.
Definition: ClusterGenerator.h:120
Mdouble velocityDampingModulus_
Value of damping modulus for velocity.
Definition: ClusterGenerator.h:96
BaseCluster clusterProperties
Definition: ClusterGenerator.h:59
unsigned int idCluster_
Total number of particles.
Definition: ClusterGenerator.h:90
int internalStructureGridLength_
Number of points used for creating internal structure's grid.
Definition: ClusterGenerator.h:100
bool isCdatOutputOn_
bool used to define whether or not cluster data output must be created.
Definition: ClusterGenerator.h:108
Mdouble clusterSizeSafetyFactor_
safety factor for the initial size of the cluster: this must be greater than 1.
Definition: ClusterGenerator.h:92
bool isIntStrucOutputOn_
bool used to define whether or not cluster internal structure output must be created.
Definition: ClusterGenerator.h:114
bool isOverlOutputOn_
bool used to define whether or not overlap data output must be created.
Definition: ClusterGenerator.h:110
bool restartSelfTest_
bool used to define whether or not the restart self test is being computed.
Definition: ClusterGenerator.h:128
bool isAmatOutputOn_
bool used to define whether or not adjacency matrix output must be created.
Definition: ClusterGenerator.h:112
bool isDataOutputOn_
bool used to define whether or not data output must be created.
Definition: ClusterGenerator.h:118
Mdouble collisionTimeOverTimeStep_
Ratio between collision time and time step: should be at least 50.
Definition: ClusterGenerator.h:80
int nParticles_
Total number of particles.
Definition: ClusterGenerator.h:86
bool isFStatOutputOn_
bool used to define whether or not fStat output must be created.
Definition: ClusterGenerator.h:122
bool isEneOutputOn_
bool used to define whether or not eneOutput output must be created.
Definition: ClusterGenerator.h:124
Mdouble sizeDispersityParticle_
Size dispersity of particles: must be between 0 and 1.
Definition: ClusterGenerator.h:84

References clusterProperties, clusterSizeSafetyFactor_, collisionTimeOverTimeStep_, DEBUG, BaseCluster::doAmatOutput(), BaseCluster::doCdatOutput(), BaseCluster::doEneOutput(), BaseCluster::doFStatOutput(), BaseCluster::doIntStrucOutput(), BaseCluster::doOverlOutput(), BaseCluster::doRestartOutput(), BaseCluster::doVtkOutput(), energyRatioTolerance_, idCluster_, internalStructureGridLength_, isAmatOutputOn_, isCdatOutputOn_, isDataOutputOn_, isEneOutputOn_, isFStatOutputOn_, isIntStrucOutputOn_, isOverlOutputOn_, isRestartOutputOn_, isVtkOutputOn_, logger, nParticles_, position_, restartSelfTest_, BaseCluster::setClusterId(), BaseCluster::setCollisionTimeOverTimeStep(), BaseCluster::setEnergyRatioTolerance(), BaseCluster::setNumberOfParticles(), BaseCluster::setSizeDispersityParticle(), BaseCluster::setVelocityDampingModulus(), sizeDispersityParticle_, and velocityDampingModulus_.

◆ ~ClusterGenerator()

ClusterGenerator::~ClusterGenerator ( )

Default destructor.

Default destructor

125 {
126  logger(DEBUG, "ClusterGenerator::~ClusterGenerator() finished");
127 }

References DEBUG, and logger.

Member Function Documentation

◆ create()

void ClusterGenerator::create ( )

runs the simulation that creates the cluster.

runs the simulation that creates the cluster.

133 {
134 
136 }
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270

References clusterProperties, and DPMBase::solve().

Member Data Documentation

◆ clusterProperties

BaseCluster ClusterGenerator::clusterProperties

Referenced by ClusterGenerator(), and create().

◆ clusterSizeSafetyFactor_

Mdouble ClusterGenerator::clusterSizeSafetyFactor_
private

safety factor for the initial size of the cluster: this must be greater than 1.

Referenced by ClusterGenerator().

◆ collisionTimeOverTimeStep_

Mdouble ClusterGenerator::collisionTimeOverTimeStep_
private

Ratio between collision time and time step: should be at least 50.

Referenced by ClusterGenerator().

◆ energyRatioTolerance_

Mdouble ClusterGenerator::energyRatioTolerance_
private

Energy ratio threshold under wich the simulation can be considered static.

Referenced by ClusterGenerator().

◆ fakeParticleHandler

ParticleHandler ClusterGenerator::fakeParticleHandler

◆ idCluster_

unsigned int ClusterGenerator::idCluster_
private

Total number of particles.

Referenced by ClusterGenerator().

◆ internalStructureGridLength_

int ClusterGenerator::internalStructureGridLength_
private

Number of points used for creating internal structure's grid.

Referenced by ClusterGenerator().

◆ isAmatOutputOn_

bool ClusterGenerator::isAmatOutputOn_
private

bool used to define whether or not adjacency matrix output must be created.

Referenced by ClusterGenerator().

◆ isCdatOutputOn_

bool ClusterGenerator::isCdatOutputOn_
private

bool used to define whether or not cluster data output must be created.

Referenced by ClusterGenerator().

◆ isDataOutputOn_

bool ClusterGenerator::isDataOutputOn_
private

bool used to define whether or not data output must be created.

Referenced by ClusterGenerator().

◆ isEneOutputOn_

bool ClusterGenerator::isEneOutputOn_
private

bool used to define whether or not eneOutput output must be created.

Referenced by ClusterGenerator().

◆ isFStatOutputOn_

bool ClusterGenerator::isFStatOutputOn_
private

bool used to define whether or not fStat output must be created.

Referenced by ClusterGenerator().

◆ isIntStrucOutputOn_

bool ClusterGenerator::isIntStrucOutputOn_
private

bool used to define whether or not cluster internal structure output must be created.

Referenced by ClusterGenerator().

◆ isOverlOutputOn_

bool ClusterGenerator::isOverlOutputOn_
private

bool used to define whether or not overlap data output must be created.

Referenced by ClusterGenerator().

◆ isRestartOutputOn_

bool ClusterGenerator::isRestartOutputOn_
private

bool used to define whether or not restart output must be created.

Referenced by ClusterGenerator().

◆ isVtkOutputOn_

bool ClusterGenerator::isVtkOutputOn_
private

bool used to define whether or not vtk output must be created.

Referenced by ClusterGenerator().

◆ nParticles_

int ClusterGenerator::nParticles_
private

Total number of particles.

Referenced by ClusterGenerator().

◆ position_

Vec3D ClusterGenerator::position_
private

Referenced by ClusterGenerator().

◆ restartSelfTest_

bool ClusterGenerator::restartSelfTest_
private

bool used to define whether or not the restart self test is being computed.

Referenced by ClusterGenerator().

◆ sizeDispersityParticle_

Mdouble ClusterGenerator::sizeDispersityParticle_
private

Size dispersity of particles: must be between 0 and 1.

Referenced by ClusterGenerator().

◆ velocityDampingModulus_

Mdouble ClusterGenerator::velocityDampingModulus_
private

Value of damping modulus for velocity.

Referenced by ClusterGenerator().


The documentation for this class was generated from the following files: