MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ClusterGenerator.cc
Go to the documentation of this file.
1 //Copyright (c) 2013-2020, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #include "ClusterGenerator.h"
27 
28 
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 }
120 
125 {
126  logger(DEBUG, "ClusterGenerator::~ClusterGenerator() finished");
127 }
128 
133 {
134 
136 }
ClusterGenerator()
This constructor initializes all variables to default values. After initialization all values are pas...
void setCollisionTimeOverTimeStep(Mdouble cTOTS)
This sets the collisionTimeOverTimeStep number (which is the ratio between collision time and time st...
Definition: BaseCluster.cc:76
void solve()
The work horse of the code.
Definition: DPMBase.cc:3968
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.
~ClusterGenerator()
Default destructor.
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 create()
runs the simulation that creates the cluster.
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