MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.

Definition at line 38 of file ClusterGenerator.h.

Constructor & Destructor Documentation

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.

Definition at line 36 of file ClusterGenerator.cc.

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_.

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 }
void setCollisionTimeOverTimeStep(Mdouble cTOTS)
This sets the collisionTimeOverTimeStep number (which is the ratio between collision time and time st...
Definition: BaseCluster.cc:76
Mdouble clusterSizeSafetyFactor_
safety factor for the initial size of the cluster: this must be greater than 1.
Mdouble velocityDampingModulus_
Value of damping modulus for velocity.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
BaseCluster clusterProperties
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 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 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 setSizeDispersityParticle(Mdouble sDP)
This sets the value of particles' dispersity in size.
Definition: BaseCluster.cc:117
bool isEneOutputOn_
bool used to define whether or not eneOutput output must be created.
Mdouble sizeDispersityParticle_
Size dispersity of particles: must be between 0 and 1.
int internalStructureGridLength_
Number of points used for creating internal structure's grid.
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
bool isDataOutputOn_
bool used to define whether or not data output must be created.
bool isOverlOutputOn_
bool used to define whether or not overlap data output must be created.
bool isAmatOutputOn_
bool used to define whether or not adjacency matrix output must be created.
void setVelocityDampingModulus(Mdouble vDM)
This sets the value of the velocity damping modulus.
Definition: BaseCluster.cc:200
bool isRestartOutputOn_
bool used to define whether or not restart output must be created.
unsigned int idCluster_
Total number of particles.
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
bool isVtkOutputOn_
bool used to define whether or not vtk output must be created.
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
bool isFStatOutputOn_
bool used to define whether or not fStat output must be created.
Mdouble collisionTimeOverTimeStep_
Ratio between collision time and time step: should be at least 50.
bool isCdatOutputOn_
bool used to define whether or not cluster data output must be created.
void setNumberOfParticles(int nP)
This sets the value of the number of particles in the cluster.
Definition: BaseCluster.cc:134
bool isIntStrucOutputOn_
bool used to define whether or not cluster internal structure output must be created.
bool restartSelfTest_
bool used to define whether or not the restart self test is being computed.
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
int nParticles_
Total number of particles.
Mdouble energyRatioTolerance_
Energy ratio threshold under wich the simulation can be considered static.
void setClusterId(unsigned int iC)
This sets the value of the cluster ID.
Definition: BaseCluster.cc:183
ClusterGenerator::~ClusterGenerator ( )

Default destructor.

Default destructor

Definition at line 124 of file ClusterGenerator.cc.

References DEBUG, and logger.

125 {
126  logger(DEBUG, "ClusterGenerator::~ClusterGenerator() finished");
127 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")

Member Function Documentation

void ClusterGenerator::create ( )

runs the simulation that creates the cluster.

runs the simulation that creates the cluster.

Definition at line 132 of file ClusterGenerator.cc.

References clusterProperties, and DPMBase::solve().

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

Member Data Documentation

BaseCluster ClusterGenerator::clusterProperties

Definition at line 59 of file ClusterGenerator.h.

Referenced by ClusterGenerator(), and create().

Mdouble ClusterGenerator::clusterSizeSafetyFactor_
private

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

Definition at line 92 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

Mdouble ClusterGenerator::collisionTimeOverTimeStep_
private

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

Definition at line 80 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

Mdouble ClusterGenerator::energyRatioTolerance_
private

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

Definition at line 104 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

ParticleHandler ClusterGenerator::fakeParticleHandler

Definition at line 61 of file ClusterGenerator.h.

unsigned int ClusterGenerator::idCluster_
private

Total number of particles.

Definition at line 90 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

int ClusterGenerator::internalStructureGridLength_
private

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

Definition at line 100 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

bool ClusterGenerator::isAmatOutputOn_
private

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

Definition at line 112 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

bool ClusterGenerator::isCdatOutputOn_
private

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

Definition at line 108 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

bool ClusterGenerator::isDataOutputOn_
private

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

Definition at line 118 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

bool ClusterGenerator::isEneOutputOn_
private

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

Definition at line 124 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

bool ClusterGenerator::isFStatOutputOn_
private

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

Definition at line 122 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

bool ClusterGenerator::isIntStrucOutputOn_
private

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

Definition at line 114 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

bool ClusterGenerator::isOverlOutputOn_
private

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

Definition at line 110 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

bool ClusterGenerator::isRestartOutputOn_
private

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

Definition at line 120 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

bool ClusterGenerator::isVtkOutputOn_
private

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

Definition at line 116 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

int ClusterGenerator::nParticles_
private

Total number of particles.

Definition at line 86 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

Vec3D ClusterGenerator::position_
private

Definition at line 76 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

bool ClusterGenerator::restartSelfTest_
private

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

Definition at line 128 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

Mdouble ClusterGenerator::sizeDispersityParticle_
private

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

Definition at line 84 of file ClusterGenerator.h.

Referenced by ClusterGenerator().

Mdouble ClusterGenerator::velocityDampingModulus_
private

Value of damping modulus for velocity.

Definition at line 96 of file ClusterGenerator.h.

Referenced by ClusterGenerator().


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