MercuryDPM  0.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FreeCoolingDemo.cpp File Reference
#include <iostream>
#include <Species/LinearViscoelasticSpecies.h>
#include "Mercury2D.h"
#include "Particles/BaseParticle.h"
#include "Walls/InfiniteWall.h"

Go to the source code of this file.

Classes

class  FreeCoolingDemoProblem
 todo{This code is not working as is wanted} More...
 

Functions

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

Function Documentation

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

Now do the same problem with the HGrid turned on, simple done by create a new problem from the old problem.

Definition at line 79 of file FreeCoolingDemo.cpp.

References FreeCoolingDemoProblem::N, DPMBase::setGravity(), MercuryBase::setHGridCellOverSizeRatio(), MercuryBase::setHGridMaxLevels(), MercuryBase::setHGridUpdateEachTimeStep(), Files::setName(), Files::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), and DPMBase::solve().

80 {
81  std::cout<<"In this file 32^2 particles with the same velocity are placed "
82  "in a bi-axial box. This makes them collide with the walls and eachother. "
83  "Afterwards the same run is performed with hgrid on. It tests the working "
84  "(and speedup) of the hgrid."<<std::endl;
85 
87  FreeCoolingDemoProblem problem;
88  problem.setName("FreeCoolingDemo");
89 
90  problem.N=1024;
91  problem.setGravity(Vec3D(0.0,0.0,0.0));
92  problem.setTimeStep(5e-5);
93  problem.setSaveCount(10);
94  problem.setTimeMax(0.05);
95 
96  problem.setHGridMaxLevels(1);
97  problem.setHGridCellOverSizeRatio(1.2);
98  problem.setHGridUpdateEachTimeStep(false);
99  problem.solve();
100 }
void solve()
The work horse of the code.
Definition: DPMBase.cc:1895
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
Definition: DPMBase.cc:179
void setHGridUpdateEachTimeStep(bool updateEachTimeStep)
Sets whether or not the HGrid must be updated every time step.
Definition: MercuryBase.cc:172
todo{This code is not working as is wanted}
void setGravity(Vec3D newGravity)
Allows to modify the gravity vector.
Definition: DPMBase.cc:431
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: Files.cc:149
void setHGridCellOverSizeRatio(Mdouble cellOverSizeRatio)
Sets the ratio of the smallest cell over the smallest particle.
Definition: MercuryBase.cc:487
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: Files.cc:138
void setHGridMaxLevels(unsigned int HGridMaxLevels)
Sets the maximum number of levels of the HGrid in this MercuryBase.
Definition: MercuryBase.cc:500
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
Definition: DPMBase.cc:353
Implementation of a 3D vector (by Vitaliy).
Definition: Vector.h:45