79 problem.
setName(
"NewtonsCradleSelfTest");
84 species->setDensity(6./
constants::pi/8*(2*problem.
N+.5)*1.05*1.05);
86 species->setCollisionTimeAndRestitutionCoefficient(.01,.1,1.);
90 std::cout <<
"Relax the packing" << std::endl;
93 std::cout <<
"Get statistics" << std::endl;
96 str[1]=
"HeavisideSphere";
102 stats1.setZMinStat(-.5);
103 stats1.setZMaxStat(2*problem.
N);
104 stats1.setXMinStat(0.5);
105 stats1.setXMaxStat(1.55);
106 stats1.setYMinStat(0.5);
107 stats1.setYMaxStat(1.55);
108 std::cout << stats1.getName() +
"_" + str[i] +
"T_XYZ.stat" << std::endl;
109 stats1.statFile.setName(stats1.getName() +
"_" + str[i] +
"T_XYZ.stat");
110 stats1.set_h(0.0005);
111 stats1.setCGWidth(w);
112 stats1.setSuperExact(
false);
113 stats1.setCGShape(str[i].c_str());
114 stats1.setCGTimeMin(problem.
getTimeMax()*1.00000999999);
115 stats1.setTimeMaxStat(1e20);
116 stats1.statistics_from_fstat_and_data();
118 for (
int i=0; i<3; i++) {
121 if (i==2) w*=2*sqrt(3);
124 stats0.setZMinStat(-0.5);
125 stats0.statFile.setName(stats0.getName() +
"_" + str[i] +
"T_XYZ.stat");
127 stats0.setCGWidth(w);
128 stats0.setSuperExact(
true);
129 stats0.setCGShape(str[i].c_str());
130 stats0.setCGTimeMin(problem.
getTimeMax()*.999999);
131 stats0.setTimeMaxStat(1e20);
132 stats0.statistics_from_fstat_and_data();
135 stats2.setZMinStat(-0.5);
136 stats2.statFile.setName(stats2.getName() +
"_" + str[i] +
"T_XYZ.stat");
139 stats2.setCGWidth(w);
140 stats2.setSuperExact(
true);
141 stats2.setCGShape(str[i].c_str());
142 stats2.setCGTimeMin(problem.
getTimeMax()*.999999);
143 stats2.setTimeMaxStat(1e20);
144 stats2.statistics_from_fstat_and_data();
void solve()
The work horse of the code.
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
void setParticleDimensions(unsigned int particleDimensions)
Allows the dimension of the particle (f.e. for mass) to be changed. e.g. discs or spheres...
void setSystemDimensions(unsigned int newDim)
Allows for the dimension of the simulation to be changed.
void setGravity(Vec3D newGravity)
Allows to modify the gravity vector.
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
U * copyAndAddObject(const U &O)
Creates a copy of a Object and adds it to the BaseHandler.
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
This class is used to extract statistical data from MD simulations.
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
Implementation of a 3D vector (by Vitaliy).
Mdouble getTimeMax() const
Allows the user to access the total simulation time during the simulation. Cannot change it though...