CGHandlerLargeSelfTest.cpp File Reference
#include "Mercury3D.h"
#include "StatisticsVector.h"
#include "Walls/InfiniteWall.h"
#include "CG/CG.h"
#include "CG/Functions/Gauss.h"
#include <cmath>
#include <iostream>
#include <iomanip>
#include <Species/LinearViscoelasticSpecies.h>

Classes

class  CGHandlerSelfTest
 In this file a cubic packing of 5^3 particles in a tri-axial box is created and allowed to settle under small gravity. After that Z statistics are calculated. More...
 

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
86 {
87  CGHandlerSelfTest problem;
88  problem.setName("CGHandlerSelfTest");
90 
91  //set the number of particles
92  problem.N = 5;
93  problem.setSystemDimensions(3);
95  problem.setGravity(Vec3D(0., 0., -1.));
96  species->setCollisionTimeAndRestitutionCoefficient(.01, .1, 1.);
97  problem.setTimeStep(.0002);
98  problem.setTimeMax(1.5 - 1e-10);
99  problem.setSaveCount(7500);
100 
101 // CG<CGCoordinates::XY,CGFunctions::Gauss> cg0;
102 // cg0.setWidth(0);
103 // problem.cgHandler.copyAndAddObject(cg0);
104 //
105 // CG<CGCoordinates::Z,CGFunctions::Gauss> cg1;
106 // cg1.setNZ(100);
107 // cg1.setWidth(0.1);
108 // problem.cgHandler.copyAndAddObject(cg1);
109 
111  cg2.setNX(20);
112  cg2.setNZ(30);
113  cg2.setWidth(0.5);
114  cg2.statFile.setSaveCount(20000);
115  problem.cgHandler.copyAndAddObject(cg2);
116 
117 // CG<CGCoordinates::XYZ,CGFunctions::Gauss> cg3;
118 // cg3.setNX(10);
119 // cg3.setNY(10);
120 // cg3.setNZ(10);
121 // cg3.setWidth(0.1);
122 // problem.cgHandler.copyAndAddObject(cg3);
123 
124  problem.solve(argc, argv);
125  //p 'CGHandlerSelfTest.1.stat' u 7:32 w l, '' u 7:11 w l
126  //sp [][][0:] 'CGHandlerSelfTest.2.stat' u 7:9:34, '' u 7:9:13
127 }
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
Definition: LinearViscoelasticSpecies.h:33
File statFile
File class to handle the output into a .stat file.
Definition: BaseCG.h:376
void setNX(std::size_t nX)
Sets nX_, the number of spatial mesh points in the x-direction.
Definition: BaseCG.cc:122
void setNZ(std::size_t nZ)
Sets nZ_, the number of spatial mesh points in the z-direction.
Definition: BaseCG.cc:102
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
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
In this file a cubic packing of 5^3 particles in a tri-axial box is created and allowed to settle und...
Definition: CGHandlerLargeSelfTest.cpp:39
int N
Definition: CGHandlerLargeSelfTest.cpp:81
Evaluates time-resolved continuum fields and writes the data into a stat file.
Definition: CG.h:76
void setWidth(Mdouble width) override
Definition: CG.h:220
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
CGHandler cgHandler
Object of the class cgHandler.
Definition: DPMBase.h:1473
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void setSystemDimensions(unsigned int newDim)
Sets the system dimensionality.
Definition: DPMBase.cc:1417
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1383
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_.
Definition: File.cc:273
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
Definition: Vector.h:51
const Mdouble pi
Definition: ExtendedMath.h:45

References DPMBase::cgHandler, BaseHandler< T >::copyAndAddObject(), BaseHandler< T >::getObject(), CGHandlerSelfTest::N, constants::pi, ParticleSpecies::setDensity(), DPMBase::setGravity(), DPMBase::setName(), BaseCG::setNX(), BaseCG::setNZ(), DPMBase::setSaveCount(), File::setSaveCount(), DPMBase::setSystemDimensions(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), CG< Coordinates, BaseFunction, Fields >::setWidth(), DPMBase::solve(), DPMBase::speciesHandler, and BaseCG::statFile.