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[] 
)
65 {
67  problem.setName("CGHandlerSelfTest");
68  auto species = problem.speciesHandler.copyAndAddObject(LinearViscoelasticSpecies());
69 
70  //set the number of particles
71  problem.N = 5;
72  problem.setSystemDimensions(3);
73  problem.speciesHandler.getObject(0)->setDensity(6.0 / constants::pi);
74  problem.setGravity(Vec3D(0., 0., -1.));
75  species->setCollisionTimeAndRestitutionCoefficient(.01, .1, 1.);
76  problem.setTimeStep(.0002);
77  problem.setTimeMax(1.5 - 1e-10);
78  problem.setSaveCount(7500);
79 
80 // CG<CGCoordinates::XY,CGFunctions::Gauss> cg0;
81 // cg0.setWidth(0);
82 // problem.cgHandler.copyAndAddObject(cg0);
83 //
84 // CG<CGCoordinates::Z,CGFunctions::Gauss> cg1;
85 // cg1.setNZ(100);
86 // cg1.setWidth(0.1);
87 // problem.cgHandler.copyAndAddObject(cg1);
88 
90  cg2.setNX(20);
91  cg2.setNZ(30);
92  cg2.setWidth(0.5);
93  cg2.statFile.setSaveCount(20000);
94  problem.cgHandler.copyAndAddObject(cg2);
95 
96 // CG<CGCoordinates::XYZ,CGFunctions::Gauss> cg3;
97 // cg3.setNX(10);
98 // cg3.setNY(10);
99 // cg3.setNZ(10);
100 // cg3.setWidth(0.1);
101 // problem.cgHandler.copyAndAddObject(cg3);
102 
103  problem.solve(argc, argv);
104  //p 'CGHandlerSelfTest.1.stat' u 7:32 w l, '' u 7:11 w l
105  //sp [][][0:] 'CGHandlerSelfTest.2.stat' u 7:9:34, '' u 7:9:13
106 }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
Definition: LinearViscoelasticSpecies.h:11
File statFile
File class to handle the output into a .stat file.
Definition: BaseCG.h:363
void setNX(std::size_t nX)
Sets nX_, the number of spatial mesh points in the x-direction.
Definition: BaseCG.cc:101
void setNZ(std::size_t nZ)
Sets nZ_, the number of spatial mesh points in the z-direction.
Definition: BaseCG.cc:81
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:18
Evaluates time-resolved continuum fields and writes the data into a stat file.
Definition: CG.h:55
void setWidth(Mdouble width) override
Definition: CG.h:199
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_.
Definition: File.cc:251
Definition: Kernel/Math/Vector.h:30
const Mdouble pi
Definition: ExtendedMath.h:23
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References e(), constants::pi, problem, BaseCG::setNX(), BaseCG::setNZ(), File::setSaveCount(), CG< Coordinates, BaseFunction, Fields >::setWidth(), and BaseCG::statFile.