CGHandlerRadialSelfTest.cpp File Reference
#include "Mercury3D.h"
#include "StatisticsVector.h"
#include "Walls/InfiniteWall.h"
#include "CG/CG.h"
#include "CG/TimeSmoothedCG.h"
#include "CG/TimeAveragedCG.h"
#include "CG/Functions/Lucy.h"
#include "CG/Functions/Linear.h"
#include "CG/Functions/Heaviside.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[] 
)
109 {
110  //declare the DPM problem and set the name
111  CGHandlerSelfTest problem;
112  problem.setTimeMax(1.0);
113  problem.setSaveCount(999999);
114 
117 // problem.cgHandler.copyAndAddObject(CG<CGCoordinates::XZ,CGFunctions::Gauss>());
118 // problem.cgHandler.copyAndAddObject(CG<CGCoordinates::RZ,CGFunctions::Gauss>());
119 
120  for (auto cg : problem.cgHandler)
121  {
122  cg->setN(100);
123  cg->setWidth(0.5/3.01);
124  cg->setTimeMin(problem.getTimeMax());
125  }
126 
127  //run the simulation
128  problem.solve(argc, argv);
129 
130  helpers::writeToFile("CGHandlerRadialSelfTest.0.gnu","p 'CGHandlerRadialSelfTest.0.stat' u 2:($3*16), 'CGHandlerRadialSelfTest.1.stat' u 2:($3*2*pi*$2*4)");
131  helpers::writeToFile("CGHandlerRadialSelfTest.1.gnu","p 'CGHandlerRadialSelfTest.0.stat' u 2:($14*16), 'CGHandlerRadialSelfTest.1.stat' u 2:($14*2*pi*$2*4)");
132 
133  //helpers::gnuplot("p 'CGHandlerRadialSelfTest.0.stat' u 2:($3*3), 'CGHandlerRadialSelfTest.1.stat' u 2:($3*2*pi*$2)\n");
134 }
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
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
Evaluates time-resolved continuum fields and writes the data into a stat file.
Definition: CG.h:76
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
CGHandler cgHandler
Object of the class cgHandler.
Definition: DPMBase.h:1473
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:888
bool writeToFile(std::string filename, std::string filecontent)
Writes a string to a file.
Definition: FileIOHelpers.cc:58

References DPMBase::cgHandler, BaseHandler< T >::copyAndAddObject(), DPMBase::getTimeMax(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::solve(), and helpers::writeToFile().