MercuryDPM
Alpha
|
The DPMBase header includes quite a few header files, defining all the handlers, which are essential. Moreover, it defines and solves a DPM problem. It is inherited from FilesAndRunNumber (public). More...
#include <DPMBase.h>
Public Member Functions | |
void | constructor () |
A function which initialises the member variables to default values, so that the problem can be solved off the shelf; sets up a basic two dimensional problem which can be solved off the shelf. It is called in the constructor DPMBase(). More... | |
DPMBase () | |
Constructor that calls the "void constructor()". More... | |
DPMBase (const FilesAndRunNumber &other) | |
Copy constructor type-1. More... | |
DPMBase (const DPMBase &other) | |
Copy constructor type-2. More... | |
virtual | ~DPMBase () |
virtual destructor More... | |
void | solve () |
The work horse of the code. More... | |
void | checkSettings () |
Checks if the essentials are set properly to go ahead with solving the problem. More... | |
virtual void | writeOutputFiles () |
Writes the simulation data onto all the files i.e. .data, .ene, .fstat ... More... | |
void | solve (int argc, char *argv[]) |
The solve function is the work horse of the code with the user input. More... | |
virtual void | setupInitialConditions () |
This function allows to set the initial conditions for our problem to be solved, by default particle locations are randomly set. Remember particle properties must also be defined here. More... | |
virtual void | writeXBallsScript () const |
This writes a script which can be used to load the xballs problem to display the data just generated. More... | |
virtual double | getInfo (const BaseParticle &P) const |
A virtual method that allows the user to overrride and set what is written into the info column in the data file. By default it returns the Species ID number. More... | |
virtual void | writeRestartFile () |
Stores all the particle data for current save time step. Calls the write function. More... | |
bool | readRestartFile (bool restarted=true) |
Reads all the particle data corresponding to the current saved time step. Which is what the restart file basically stores. The problem description with the latest particle data. Returns 0 if it is successful, 1 otherwise. More... | |
int | readRestartFile (std::string fileName) |
The same as readRestartFile(bool), but also reads all the particle data corresponding to the current saved time step. More... | |
virtual void | write (std::ostream &os, bool writeAllParticles=true) const |
Loads all MD data and plots statistics for all timesteps in the .data file. More... | |
virtual void | read (std::istream &is) |
Reads all data from a restart file, e.g. domain data and particle data. More... | |
virtual bool | readUserDefinedWall (std::string type, std::istream &is) |
virtual void | readOld (std::istream &is) |
Reads all data from a restart file, e.g. domain data and particle data; old version. More... | |
bool | readDataFile (const std::string fileName, unsigned int format=0) |
This allows particle data to be reloaded from data files. More... | |
bool | readParAndIniFiles (const std::string fileName) |
Allows the user to read par.ini files (useful to read MDCLR files) More... | |
bool | readNextDataFile (unsigned int format=0) |
Reads the next data file with default format=0. However, one can modify the format based on whether the particle data corresponds to 3D or 2D data. See XBalls/xballs.txt. More... | |
bool | findNextExistingDataFile (Mdouble tMin, bool verbose=true) |
Useful when fileType is chosen as Multiple Files or Multiple files with padded. More... | |
bool | readArguments (int argc, char *argv[]) |
Can interpret main function input arguments that are passed by the driver codes. More... | |
virtual bool | readNextArgument (int &i, int argc, char *argv[]) |
Interprets the i^th command-line argument. More... | |
virtual bool | checkParticleForInteraction (const BaseParticle &P) |
Checks if the particle having any interaction with walls or other particles. More... | |
virtual bool | checkParticleForInteractionLocal (const BaseParticle &P) |
Checks if a particle P has any interaction with walls or other particles in the local domain. More... | |
bool | checkParticleForInteractionLocalPeriodic (const BaseParticle &P) |
Mdouble | getTime () const |
Access function for the time. More... | |
unsigned int | getNtimeSteps () const |
Returns the current counter of time steps. More... | |
void | setTime (Mdouble time) |
Access function for the time. More... | |
void | setTimeMax (Mdouble newTMax) |
Allows the upper time limit to be changed. More... | |
Mdouble | getTimeMax () const |
Allows the user to access the total simulation time during the simulation. Cannot change it though. More... | |
void | setDoCGAlways (bool newDoCGFlag) |
void | setRotation (bool newRotFlag) |
Allows to set the flag for enabling or disabling particle rotation in the simulations. More... | |
bool | getRotation () const |
Returns a flag indicating if particle rotation is enabled or disabled. More... | |
void | setWallsWriteVTK (FileType writeWallsVTK) |
Allows to set the flag for enabling or disabling particle rotation in the simulations. More... | |
void | setParticlesWriteVTK (bool writeParticlesVTK) |
Allows to set the flag for enabling or disabling particle rotation in the simulations. More... | |
FileType | getWallsWriteVTK () const |
Returns a flag indicating if particle rotation is enabled or disabled. More... | |
bool | getParticlesWriteVTK () const |
Returns a flag indicating if particle rotation is enabled or disabled. More... | |
bool | getDoCGAlways () const |
Vec3D | getMin () const |
Return the "bottom left" corner of the domain, a vector with xMin_, yMin_ and zMin_. More... | |
Vec3D | getMax () const |
Return the "upper right" corner of the domain, a vector with xMin_, yMin_ and zMin_. More... | |
Mdouble | getXMin () const |
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin,. More... | |
Mdouble | getXMax () const |
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax,. More... | |
Mdouble | getYMin () const |
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin,. More... | |
Mdouble | getYMax () const |
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax,. More... | |
Mdouble | getZMin () const |
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin,. More... | |
Mdouble | getZMax () const |
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax,. More... | |
void | setMin (Vec3D min) |
Sets the values xMin, yMin, zMin of the problem domain, which is [xMin,xMax]x[yMin,yMax]x[zMin,zMax]. More... | |
void | setMax (Vec3D max) |
Sets the values xMax, yMax, zMax of the problem domain, which is [xMin,xMax]x[yMin,yMax]x[zMin,zMax]. More... | |
void | setXMin (Mdouble newXMin) |
If the length of the problem domain in x-direction is XMax - XMin, this method sets XMin. More... | |
void | setYMin (Mdouble newYMin) |
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMin. More... | |
void | setZMin (Mdouble newZMin) |
If the length of the problem domain in z-direction is ZMax - ZMin, this method sets ZMin. More... | |
void | setXMax (Mdouble newXMax) |
If the length of the problem domain in x-direction is XMax - XMin, this method sets XMax. More... | |
void | setYMax (Mdouble newYMax) |
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMax. More... | |
void | setZMax (Mdouble newZMax) |
If the length of the problem domain in z-direction is XMax - XMin, this method sets ZMax. More... | |
int | getAddLarge () const |
returns the number of large particles that are to be added on restart. More... | |
int | getAddSmall () const |
returns the number of small particles that are to be added on restart. More... | |
void | setAddLarge (int new_addL) |
sets the number of large particles that are to be added on restart. More... | |
void | setAddSmall (int new_addS) |
sets the number of small particles that are to be added on restart. More... | |
void | setTimeStep (Mdouble newDt) |
Allows the time step dt to be changed. More... | |
Mdouble | getTimeStep () const |
Allows the time step dt to be accessed. More... | |
void | setXBallsColourMode (int newCMode) |
Set the xball output mode. More... | |
int | getXBallsColourMode () const |
Get the xball colour mode (CMode) More... | |
void | setXBallsVectorScale (double newVScale) |
Set the scale of vectors in xballs. More... | |
double | getXBallsVectorScale () const |
Returns the scale of vectors used in xballs. More... | |
void | setXBallsAdditionalArguments (std::string newXBArgs) |
Set the additional arguments for xballs. More... | |
std::string | getXBallsAdditionalArguments () const |
Returns the additional arguments for xballs. More... | |
void | setXBallsScale (Mdouble newScale) |
Sets the scale of the view (either normal, zoom in or zoom out) to display in xballs. The default is fit to screen. More... | |
double | getXBallsScale () const |
Returns the scale of the view in xballs. More... | |
void | setGravity (Vec3D newGravity) |
Allows to modify the gravity vector. More... | |
Vec3D | getGravity () const |
Returns the gravity vector. More... | |
void | setDimension (unsigned int newDim) |
Sets the system and particle dimension. More... | |
void | setSystemDimensions (unsigned int newDim) |
Allows for the dimension of the simulation to be changed. More... | |
unsigned int | getSystemDimensions () const |
Returns the dimension of the simulation. Note there is also a particle dimension. More... | |
void | setParticleDimensions (unsigned int particleDimensions) |
Allows the dimension of the particle (f.e. for mass) to be changed. e.g. discs or spheres. More... | |
unsigned int | getParticleDimensions () const |
Returns the particle dimensions. More... | |
std::string | getRestartVersion () const |
This is to take into account for different Mercury versions. Returns the version of the restart file. More... | |
void | setRestartVersion (std::string newRV) |
Sets restart_version. More... | |
bool | getRestarted () const |
Returns the flag denoting if the simulation was restarted or not. More... | |
void | setRestarted (bool newRestartedFlag) |
Allows to set the flag stating if the simulation is to be restarted or not. More... | |
bool | getAppend () const |
Returns the flag denoting if the append option is on or off. More... | |
void | setAppend (bool newAppendFlag) |
Allows to set the append option. More... | |
Mdouble | getElasticEnergy () const |
Returns the global elastic energy within the system. More... | |
Mdouble | getKineticEnergy () const |
Returns the global kinetic energy stored in the system. More... | |
Mdouble | getGravitationalEnergy () const |
Returns the global gravitational potential energy stored in the system. More... | |
bool | areInContact (const BaseParticle *pI, const BaseParticle *pJ) const |
Checks if two particle are in contact or is there any positive overlap. More... | |
virtual void | hGridInsertParticle (BaseParticle *obj UNUSED) |
no implementation but can be overidden in its derived classes. More... | |
virtual void | hGridUpdateParticle (BaseParticle *obj UNUSED) |
no implementation but can be overidden in its derived classes. More... | |
virtual void | hGridRemoveParticle (BaseParticle *obj UNUSED) |
no implementation but can be overidden in its derived classes. More... | |
virtual void | hGridUpdateMove (BaseParticle *, Mdouble) |
no implementation but can be overidden in its derived classes. More... | |
virtual void | gatherContactStatistics (unsigned int index1 UNUSED, int index2 UNUSED, Vec3D Contact UNUSED, Mdouble delta UNUSED, Mdouble ctheta UNUSED, Mdouble fdotn UNUSED, Mdouble fdott UNUSED, Vec3D P1_P2_normal_ UNUSED, Vec3D P1_P2_tangential UNUSED) |
//Not unsigned index because of possible wall collisions. More... | |
Public Member Functions inherited from FilesAndRunNumber | |
FilesAndRunNumber () | |
Constructor. More... | |
FilesAndRunNumber (const FilesAndRunNumber &other) | |
Copy constructor. More... | |
virtual | ~FilesAndRunNumber () |
Constructor. More... | |
void | constructor () |
a function called by the FilesAndRunNumber() (constructor) More... | |
void | incrementRunNumberInFile () |
Increment the run Number (counter value) stored in the file_counter (COUNTER_DONOTDEL) by 1 and store the new value in the counter file. More... | |
int | readRunNumberFromFile () |
Read the run number or the counter from the counter file (COUNTER_DONOTDEL) More... | |
void | autoNumber () |
The autoNumber() function is the trigger. It calls three functions. setRunNumber(), readRunNumberFromFile() and incrementRunNumberInFile(). More... | |
std::vector< int > | get2DParametersFromRunNumber (int size_x, int size_y) |
This turns a counter into two indices which is an amazing feature for doing two dimensional parameter studies. The indices run from 1:size_x and 1:size_y, while the study number starts at 0 ( initially the counter=1 in COUNTER_DONOTDEL) More... | |
int | launchNewRun (const char *name, bool quick=false) |
This launches a code from within this code. Please pass the name of the code to run. More... | |
void | setRunNumber (int runNumber) |
This sets the counter/Run number, overriding the defaults. More... | |
int | getRunNumber () const |
This returns the current value of the counter (runNumber_) More... | |
void | read (std::istream &is) |
Accepts an input stream std::istream. More... | |
void | write (std::ostream &os) const |
Accepts an output stream read function, which accepts an input stream std::ostream. More... | |
Public Member Functions inherited from Files | |
Files () | |
A constructor. More... | |
virtual | ~Files () |
A destructor, watch out its a virtual destructor. More... | |
Files (const Files &other) | |
Copy constructor. More... | |
MERCURY_DEPRECATED File & | getDataFile () |
The non const version. Allows one to edit the File::dataFile. More... | |
MERCURY_DEPRECATED File & | getEneFile () |
The non const version. Allows to edit the File::eneFile. More... | |
MERCURY_DEPRECATED File & | getFStatFile () |
The non const version. Allows to edit the File::fStatFile. More... | |
MERCURY_DEPRECATED File & | getRestartFile () |
The non const version. Allows to edit the File::restartFile. More... | |
MERCURY_DEPRECATED File & | getStatFile () |
The non const version. Allows to edit the File::statFile. More... | |
MERCURY_DEPRECATED const File & | getDataFile () const |
The const version. Does not allow for any editing of the File::dataFile. More... | |
MERCURY_DEPRECATED const File & | getEneFile () const |
The const version. Does not allow for any editing of the File::eneFile. More... | |
MERCURY_DEPRECATED const File & | getFStatFile () const |
The const version. Does not allow for any editing of the File::fStatFile. More... | |
MERCURY_DEPRECATED const File & | getRestartFile () const |
The const version. Does not allow for any editing of the File::restartFile. More... | |
MERCURY_DEPRECATED const File & | getStatFile () const |
The const version. Does not allow for any editing of the File::statFile. More... | |
const std::string & | getName () const |
Returns the name of the file. Does not allow to change it though. More... | |
void | setName (const std::string &name) |
Allows to set the name of all the files (ene, data, fstat, restart, stat) More... | |
void | setName (const char *name) |
Calls setName(std::string) More... | |
void | setSaveCount (unsigned int saveCount) |
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat) More... | |
void | setFileType (FileType fileType) |
Sets File::fileType_ for all files (ene, data, fstat, restart, stat) More... | |
void | setOpenMode (std::fstream::openmode openMode) |
Sets File::openMode_ for all files (ene, data, fstat, restart, stat) More... | |
void | resetFileCounter () |
Resets the file counter for each file i.e. for ene, data, fstat, restart, stat) More... | |
void | read (std::istream &is) |
Extracts data from the input stream (which is basically a file you want to read from) into name_, restartFile .... More... | |
void | write (std::ostream &os) const |
Writes data into a file from the member variables name_, restartFile, dataFile etc. More... | |
void | openFiles () |
Opens all the files (ene, data, fstat, restart, stat) for reading and writing purposes. More... | |
void | closeFiles () |
Closes all files (ene, data, fstat, restart, stat) that were opened to read or write. More... | |
void | setNextSavedTimeStep (unsigned int nextSavedTimeStep) |
Sets the next time step for all the files (ene, data, fstat, restart, stat) at which the data is to be written or saved. More... | |
Public Attributes | |
SpeciesHandler | speciesHandler |
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera. More... | |
RNG | random |
This is a random generator, often used for setting up the initial conditions etc... More... | |
ParticleHandler | particleHandler |
An object of the class ParticleHandler, contains the pointers to all the particles created. More... | |
WallHandler | wallHandler |
An object of the class WallHandler. Contains pointers to all the walls created. More... | |
BoundaryHandler | boundaryHandler |
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or from regions. More... | |
InteractionHandler | interactionHandler |
An object of the class InteractionHandler. More... | |
Public Attributes inherited from Files | |
File | dataFile |
An instance of class File to handle in- and output into a .data file. More... | |
File | fStatFile |
An instance of class File to handle in- and output into a .fstat file. More... | |
File | eneFile |
An instance of class File to handle in- and output into a .ene file. More... | |
File | restartFile |
An instance of class File to handle in- and output into a .restart file. More... | |
File | statFile |
An instance of class File to handle in- and output into a .stat file. More... | |
Protected Member Functions | |
virtual void | computeAllForces () |
Computes all the forces acting on the particles by using the setTorque and setForce methods. See BaseInteractible.cc. More... | |
virtual void | computeInternalForces (BaseParticle *i) |
Computes the forces between particles (internal in the sense that the sum over all these forces is zero i.e. fully modelled forces) More... | |
virtual void | computeInternalForces (BaseParticle *P1, BaseParticle *P2) |
Computes the forces between particles (internal in the sense that the sum over all these forces is zero i.e. fully modelled forces) More... | |
virtual void | computeExternalForces (BaseParticle *PI) |
Computes the external forces acting on particles (e.g. gravitational) More... | |
virtual void | computeForcesDueToWalls (BaseParticle *PI) |
Computes the forces on the particles due to the walls (normals are outward normals) More... | |
virtual void | actionsOnRestart () |
A virtual function where the users can add extra code which is executed only when the code is restarted. More... | |
virtual void | actionsBeforeTimeLoop () |
A virtual function. Allows one to carry out any operations before the start of the time loop. More... | |
virtual void | hGridActionsBeforeTimeLoop () |
A virtual function that allows one to carry out hGrid operations before the start of the time loop. More... | |
virtual void | hGridActionsBeforeTimeStep () |
A virtual function that allows one to set or execute hGrid parameters or operations before every simulation time step. More... | |
virtual bool | getHGridUpdateEachTimeStep () const |
virtual void | actionsBeforeTimeStep () |
A virtual function which allows to define operations to be executed before the new time step. More... | |
virtual void | actionsAfterSolve () |
A virtual function which allows to define operations to be executed after the solve(). More... | |
virtual void | actionsAfterTimeStep () |
A virtual function which allows to define operations to be executed after time step. More... | |
virtual void | outputXBallsData (std::ostream &os) const |
This function writes the location of the walls and particles in a format the XBalls program can read. See XBalls/xballs.txt. However, MercuryDPM supports a much better viewer now called Paraview. See the tutorials section in the documentation. More... | |
virtual void | outputXBallsDataParticle (const unsigned int i, const unsigned int format, std::ostream &os) const |
This function writes out the particle locations into an output stream in a format the XBalls program can read. More... | |
virtual void | writeEneHeader (std::ostream &os) const |
Writes a header with a certain format for ENE file. More... | |
virtual void | writeFstatHeader (std::ostream &os) const |
Writes a header with a certain format for FStat file. More... | |
virtual void | writeEneTimestep (std::ostream &os) const |
This function enables one to write the global energy available in the system after each time step. The default is to compute the rotational and translational kinetic energy, potential energy and the centre of mass. More... | |
virtual void | initialiseStatistics () |
no implementation but can be overidden in its derived classes. More... | |
virtual void | outputStatistics () |
no implementation but can be overidden in its derived classes. More... | |
void | gatherContactStatistics () |
virtual void | processStatistics (bool usethese UNUSED) |
no implementation but can be overidden in its derived classes. More... | |
virtual void | finishStatistics () |
no implementation but can be overidden in its derived classes. More... | |
virtual void | integrateBeforeForceComputation () |
This is were the integration is done, at the moment it is velocity Verlet integration and is done before the forces are computed. See http://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet. More... | |
virtual void | integrateAfterForceComputation () |
Integration is done after force computations. We apply the Velocity verlet scheme. See http://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet. More... | |
virtual void | checkInteractionWithBoundaries () |
There are a range of boundaries one could implement depending on ones' problem. This methods checks for interactions between particles and such range of boundaries. See BaseBoundary.h and all the boundaries in the Boundaries folder. More... | |
virtual void | hGridActionsBeforeIntegration () |
no implementation but can be overidden in its derived classes. More... | |
virtual void | hGridActionsAfterIntegration () |
no implementation but can be overidden in its derived classes. More... | |
virtual void | broadPhase (BaseParticle *i) |
By broad one means to screen and determine an approximate number of particles that a given particle can be in contact with. Hence the word "Broad phase" of contact detection. More... | |
void | setFixedParticles (unsigned int n) |
void | initialiseTangentialSprings () |
virtual void | printTime () const |
Displays the current simulation time onto your screen for example. More... | |
virtual bool | continueSolve () const |
void | outputInteractionDetails () const |
Displays the interaction details corresponding to the pointer objects in the interaction handler. More... | |
bool | isTimeEqualTo (Mdouble time) const |
Checks if the input variable "time" is the current time in the simulation. More... | |
void | removeDuplicatePeriodicParticles () |
Removes periodic duplicate Particles. More... | |
void | checkAndDuplicatePeriodicParticles () |
In case of periodic boundaries, the below methods checks and adds particles when necessary into the particle handler. See DPMBase.cc and PeriodicBoundary.cc for more details. More... | |
Mdouble | domainSize () const |
void | writeVTK () const |
Private Attributes | |
unsigned int | systemDimensions_ |
The dimensions of the simulation i.e. 2D or 3D. More... | |
unsigned int | particleDimensions_ |
determines if 2D or 3D particle volume is used for mass calculations More... | |
Vec3D | gravity_ |
Gravity vector. More... | |
Mdouble | xMin_ |
If the length of the problem domain in x-direction is XMax - XMin, the above variable stores XMin. More... | |
Mdouble | xMax_ |
If the length of the problem domain in x-direction is XMax - XMin, the above variable stores XMax. More... | |
Mdouble | yMin_ |
If the length of the problem domain in y-direction is YMax - YMin, the above variable stores YMin. More... | |
Mdouble | yMax_ |
If the length of the problem domain in y-direction is YMax - XMin, the above variable stores YMax. More... | |
Mdouble | zMin_ |
If the length of the problem domain in z-direction is ZMax - ZMin, the above variable stores ZMin. More... | |
Mdouble | zMax_ |
If the length of the problem domain in z-direction is ZMax - ZMin, the above variable stores ZMax. More... | |
int | addL_ |
Stores the number of large particles that are to be added on restart. More... | |
int | addS_ |
Stores the number of small particles that are to be added on restart. More... | |
Mdouble | time_ |
Stores the current simulation time. More... | |
unsigned int | ntimeSteps_ |
Stores the number of time steps. More... | |
Mdouble | timeStep_ |
Stores the simulation time step. More... | |
Mdouble | timeMax_ |
Stores the duration of the simulation. More... | |
Mdouble | elasticEnergy_ |
used in force calculations More... | |
std::string | restartVersion_ |
Previous versions of MercuryDPM had a different restart file format, the below member variable allows one to specify the version in order to choose between the available version support. More... | |
bool | restarted_ |
A bool to check if the simulation was restarted or not, ie. if setupInitialConditionsShould be run and the fileCounters reset. More... | |
bool | append_ |
A flag to determine if the file has to be appended or not. See DPMBase::Solve() for example. More... | |
bool | rotation_ |
A flag to turn on/off particle rotation. More... | |
FileType | writeWallsVTK_ |
A flag to turn on/off the vtk writer for walls. More... | |
bool | writeParticlesVTK_ |
A flag to turn on/off the vtk writer for particles. More... | |
int | xBallsColourMode_ |
XBalls is a package to view the particle data. As an alternative MercuryDPM also supports Paraview. The below variable is used to set the argument cmode in xballs script (see XBalls/xballs.txt) More... | |
Mdouble | xBallsVectorScale_ |
sets the xballs argument vscale (see XBalls/xballs.txt) More... | |
Mdouble | xBallsScale_ |
sets the xballs argument scale (see XBalls/xballs.txt) More... | |
std::string | xBallsAdditionalArguments_ |
A string of additional arguments for xballs can be specified (see XBalls/xballs.txt). e.g. "-solidf -v0". More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const DPMBase &md) |
Operator overloading of DPMBase class, writes the StatType to the given ostream. More... | |
The DPMBase header includes quite a few header files, defining all the handlers, which are essential. Moreover, it defines and solves a DPM problem. It is inherited from FilesAndRunNumber (public).
DPMBase::DPMBase | ( | ) |
Constructor that calls the "void constructor()".
Definition at line 143 of file DPMBase.cc.
References constructor().
DPMBase::DPMBase | ( | const FilesAndRunNumber & | other | ) |
Copy constructor type-1.
[in] | other |
Definition at line 87 of file DPMBase.cc.
References constructor().
DPMBase::DPMBase | ( | const DPMBase & | other | ) |
Copy constructor type-2.
[in] | other |
Definition at line 96 of file DPMBase.cc.
References append_, boundaryHandler, elasticEnergy_, gravity_, interactionHandler, ntimeSteps_, particleDimensions_, particleHandler, random, restarted_, restartVersion_, rotation_, BaseHandler< T >::setDPMBase(), speciesHandler, systemDimensions_, time_, timeMax_, timeStep_, wallHandler, writeParticlesVTK_, writeWallsVTK_, xBallsAdditionalArguments_, xBallsColourMode_, xBallsScale_, xBallsVectorScale_, xMax_, xMin_, yMax_, yMin_, zMax_, and zMin_.
|
virtual |
|
protectedvirtual |
A virtual function which allows to define operations to be executed after the solve().
no implementation but can be overidden in its derived classes.
Definition at line 786 of file DPMBase.cc.
Referenced by solve(), and Mercury3DRestart::writeOutputFiles().
|
protectedvirtual |
A virtual function which allows to define operations to be executed after time step.
no implementation but can be overidden in its derived classes.
Definition at line 793 of file DPMBase.cc.
Referenced by solve().
|
protectedvirtual |
A virtual function. Allows one to carry out any operations before the start of the time loop.
no implementation but can be overriden in its derived classes.
Definition at line 722 of file DPMBase.cc.
Referenced by solve().
|
protectedvirtual |
A virtual function which allows to define operations to be executed before the new time step.
no implementation but can be overidden in its derived classes.
Reimplemented in Chute, and ChuteBottom.
Definition at line 779 of file DPMBase.cc.
Referenced by helpers::loadingTest(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), and solve().
|
protectedvirtual |
A virtual function where the users can add extra code which is executed only when the code is restarted.
no implementation but can be overidden in its derived classes.
Definition at line 736 of file DPMBase.cc.
Referenced by solve().
bool DPMBase::areInContact | ( | const BaseParticle * | pI, |
const BaseParticle * | pJ | ||
) | const |
Checks if two particle are in contact or is there any positive overlap.
[in] | pI | |
[in] | pJ |
Definition at line 713 of file DPMBase.cc.
References Vec3D::getDistanceSquared(), BaseParticle::getInteractionRadius(), BaseInteractable::getPosition(), and mathsFunc::square().
Referenced by Mercury3D::hGridHasContactsInTargetCell().
|
protectedvirtual |
By broad one means to screen and determine an approximate number of particles that a given particle can be in contact with. Hence the word "Broad phase" of contact detection.
[in] | i |
Reimplemented in MercuryBase.
Definition at line 866 of file DPMBase.cc.
References BaseHandler< T >::begin(), computeInternalForces(), and particleHandler.
Referenced by computeInternalForces().
|
protected |
In case of periodic boundaries, the below methods checks and adds particles when necessary into the particle handler. See DPMBase.cc and PeriodicBoundary.cc for more details.
Definition at line 2782 of file DPMBase.cc.
References boundaryHandler, BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), and particleHandler.
Referenced by solve().
|
protectedvirtual |
There are a range of boundaries one could implement depending on ones' problem. This methods checks for interactions between particles and such range of boundaries. See BaseBoundary.h and all the boundaries in the Boundaries folder.
\\ calls checkBoundaryAfterParticleMoved()
Definition at line 1763 of file DPMBase.cc.
References BaseHandler< T >::begin(), boundaryHandler, BaseHandler< T >::end(), and particleHandler.
Referenced by solve().
|
virtual |
Checks if the particle having any interaction with walls or other particles.
A very useful feature. For example, when one wants to have an initial condition with particles free of interactions with other particles or walls, one could use this to see if a particle about to be inserted would have interactions. If yes, then the particle would not be considered for insertion.
However can prove expensive if the number of particles is large.
[in] | p | The particle for which one wants to detect collisions (or the lack thereof). |
true
if and only if there are no interactions with other particles or walls. Reimplemented in MercuryBase.
Definition at line 2632 of file DPMBase.cc.
References checkParticleForInteractionLocal(), and checkParticleForInteractionLocalPeriodic().
Referenced by InsertionBoundary::checkBoundaryBeforeTimeStep().
|
virtual |
Checks if a particle P has any interaction with walls or other particles in the local domain.
A very useful feature. For example, when one wants to have an initial condition with particles free of interactions with other particles or walls, one could use this method and whether particles are interacting. If yes, then it would not consider this particle for insertion and continue onto the next particle. However can prove expensive if the number of particles is large.
Returns true if and only if there are no interactions with other particles in the local domain or walls.
[in] | p | The particle for which one wants to detect collisions (or the lack thereof). |
Reimplemented in MercuryBase.
Definition at line 2718 of file DPMBase.cc.
References Vec3D::getDistanceSquared(), BaseParticle::getInteractionRadius(), BaseInteractable::getPosition(), particleHandler, mathsFunc::square(), and wallHandler.
Referenced by checkParticleForInteraction(), and checkParticleForInteractionLocalPeriodic().
bool DPMBase::checkParticleForInteractionLocalPeriodic | ( | const BaseParticle & | p | ) |
Extends the capability of detecting intersecting particles to periodic systems
p |
Definition at line 2680 of file DPMBase.cc.
References boundaryHandler, checkParticleForInteractionLocal(), PeriodicBoundary::getDistance(), BaseParticle::getInteractionRadius(), ParticleHandler::getLargestParticle(), BaseHandler< T >::getNumberOfObjects(), particleHandler, and PeriodicBoundary::shiftPosition().
Referenced by checkParticleForInteraction(), and MercuryBase::checkParticleForInteraction().
void DPMBase::checkSettings | ( | ) |
Checks if the essentials are set properly to go ahead with solving the problem.
Definition at line 2115 of file DPMBase.cc.
References BaseHandler< T >::getNumberOfObjects(), getParticleDimensions(), getSystemDimensions(), getTimeStep(), and speciesHandler.
Referenced by solve().
|
protectedvirtual |
Computes all the forces acting on the particles by using the setTorque and setForce methods. See BaseInteractible.cc.
Reset all forces to zero
Now loop over all particles contacts computing force contributions
Now loop over all other particles looking for contacts
Definition at line 1841 of file DPMBase.cc.
References computeExternalForces(), computeInternalForces(), PossibleContact::getNext(), PossibleContact::getP1(), PossibleContact::getP2(), particleHandler, and wallHandler.
Referenced by solve().
|
protectedvirtual |
Computes the external forces acting on particles (e.g. gravitational)
[in] | CI |
Definition at line 1703 of file DPMBase.cc.
References BaseInteractable::addForce(), computeForcesDueToWalls(), getGravity(), BaseParticle::getMass(), and BaseParticle::isFixed().
Referenced by computeAllForces().
|
protectedvirtual |
Computes the forces on the particles due to the walls (normals are outward normals)
[in] | pI |
Definition at line 1717 of file DPMBase.cc.
References BaseInteractable::addForce(), BaseInteractable::addTorque(), Vec3D::cross(), BaseParticle::getPeriodicFromParticle(), BaseInteractable::getPosition(), getRotation(), getTime(), getTimeStep(), interactionHandler, and wallHandler.
Referenced by computeExternalForces().
|
protectedvirtual |
Computes the forces between particles (internal in the sense that the sum over all these forces is zero i.e. fully modelled forces)
[in] | i |
Definition at line 1888 of file DPMBase.cc.
References broadPhase().
Referenced by broadPhase(), computeAllForces(), Mercury3D::hGridFindContactsWithinTargetCell(), Mercury2D::hGridFindContactsWithinTargetCell(), Mercury2D::hGridFindContactsWithTargetCell(), and Mercury3D::hGridFindContactsWithTargetCell().
|
protectedvirtual |
Computes the forces between particles (internal in the sense that the sum over all these forces is zero i.e. fully modelled forces)
[in] | P1 | |
[in] | P2 |
Definition at line 1657 of file DPMBase.cc.
References BaseInteractable::addForce(), BaseInteractable::addTorque(), Vec3D::cross(), BaseObject::getId(), BaseParticle::getInteractionWith(), BaseParticle::getPeriodicFromParticle(), BaseInteractable::getPosition(), getRotation(), getTime(), getTimeStep(), interactionHandler, and BaseParticle::isFixed().
void DPMBase::constructor | ( | ) |
A function which initialises the member variables to default values, so that the problem can be solved off the shelf; sets up a basic two dimensional problem which can be solved off the shelf. It is called in the constructor DPMBase().
Definition at line 905 of file DPMBase.cc.
References boundaryHandler, gravity_, interactionHandler, loggerOutput, logWriteAndDie(), NO_FILE, ntimeSteps_, LoggerOutput::onFatal, particleHandler, random, setAppend(), BaseHandler< T >::setDPMBase(), Files::setName(), setParticleDimensions(), RNG::setRandomSeed(), setRestarted(), Files::setSaveCount(), BaseHandler< T >::setStorageCapacity(), setSystemDimensions(), speciesHandler, time_, timeMax_, timeStep_, wallHandler, writeParticlesVTK_, writeWallsVTK_, xBallsAdditionalArguments_, xBallsColourMode_, xBallsScale_, xBallsVectorScale_, xMax_, xMin_, yMax_, yMin_, zMax_, and zMin_.
Referenced by DPMBase().
|
protectedvirtual |
|
protected |
Definition at line 2818 of file DPMBase.cc.
References getXMax(), getXMin(), getYMax(), getYMin(), getZMax(), and getZMin().
bool DPMBase::findNextExistingDataFile | ( | Mdouble | tMin, |
bool | verbose = true |
||
) |
Useful when fileType is chosen as Multiple Files or Multiple files with padded.
[in] | tMin | |
[in] | verbose |
Definition at line 1401 of file DPMBase.cc.
References Files::dataFile, File::getCounter(), File::getFileType(), File::getFstream(), File::getName(), MULTIPLE_FILES, MULTIPLE_FILES_PADDED, and File::openNextFile().
|
protectedvirtual |
no implementation but can be overidden in its derived classes.
Reimplemented in StatisticsVector< T >.
Definition at line 838 of file DPMBase.cc.
Referenced by solve(), and Mercury3DRestart::writeOutputFiles().
|
virtual |
//Not unsigned index because of possible wall collisions.
no implementation but can be overidden in its derived classes.
Reimplemented in StatisticsVector< T >.
Definition at line 822 of file DPMBase.cc.
Referenced by BaseInteraction::gatherContactStatistics().
|
protected |
Definition at line 811 of file DPMBase.cc.
References interactionHandler.
int DPMBase::getAddLarge | ( | ) | const |
returns the number of large particles that are to be added on restart.
Definition at line 327 of file DPMBase.cc.
References addL_.
int DPMBase::getAddSmall | ( | ) | const |
returns the number of small particles that are to be added on restart.
Definition at line 335 of file DPMBase.cc.
References addS_.
bool DPMBase::getAppend | ( | ) | const |
Returns the flag denoting if the append option is on or off.
Definition at line 643 of file DPMBase.cc.
References append_.
Referenced by solve(), and writeEneHeader().
bool DPMBase::getDoCGAlways | ( | ) | const |
Mdouble DPMBase::getElasticEnergy | ( | ) | const |
Returns the global elastic energy within the system.
Definition at line 659 of file DPMBase.cc.
References interactionHandler.
Referenced by writeEneTimestep().
Mdouble DPMBase::getGravitationalEnergy | ( | ) | const |
Returns the global gravitational potential energy stored in the system.
Definition at line 686 of file DPMBase.cc.
References Vec3D::dot(), getGravity(), and particleHandler.
Vec3D DPMBase::getGravity | ( | ) | const |
Returns the gravity vector.
Definition at line 545 of file DPMBase.cc.
References gravity_.
Referenced by computeExternalForces(), getGravitationalEnergy(), ChuteWithHopper::getMaximumVelocityInducedByGravity(), Chute::setChuteAngle(), write(), and writeEneTimestep().
|
protectedvirtual |
Reimplemented in MercuryBase.
Definition at line 771 of file DPMBase.cc.
|
virtual |
A virtual method that allows the user to overrride and set what is written into the info column in the data file. By default it returns the Species ID number.
Definition at line 703 of file DPMBase.cc.
References BaseObject::getId(), and BaseInteractable::getSpecies().
Referenced by ParticleHandler::writeVTK().
Mdouble DPMBase::getKineticEnergy | ( | ) | const |
Returns the global kinetic energy stored in the system.
Definition at line 672 of file DPMBase.cc.
References particleHandler.
|
inline |
Return the "upper right" corner of the domain, a vector with xMin_, yMin_ and zMin_.
Definition at line 335 of file DPMBase.h.
References xMax_, yMax_, and zMax_.
Referenced by InfiniteWall::createVTK(), FileReader::read(), AxisymmetricIntersectionOfWalls::writeVTK(), and WallHandler::writeVTKBoundingBox().
|
inline |
Return the "bottom left" corner of the domain, a vector with xMin_, yMin_ and zMin_.
Definition at line 330 of file DPMBase.h.
References xMin_, yMin_, and zMin_.
Referenced by InfiniteWall::createVTK(), FileReader::read(), AxisymmetricIntersectionOfWalls::writeVTK(), and WallHandler::writeVTKBoundingBox().
unsigned int DPMBase::getNtimeSteps | ( | ) | const |
Returns the current counter of time steps.
Definition at line 177 of file DPMBase.cc.
References ntimeSteps_.
Referenced by FileReader::read(), and readNextArgument().
unsigned int DPMBase::getParticleDimensions | ( | ) | const |
Returns the particle dimensions.
Definition at line 599 of file DPMBase.cc.
References particleDimensions_.
Referenced by checkSettings(), BaseParticle::getParticleDimensions(), ParticleSpecies::getVolumeFromRadius(), and write().
bool DPMBase::getParticlesWriteVTK | ( | ) | const |
Returns a flag indicating if particle rotation is enabled or disabled.
Definition at line 271 of file DPMBase.cc.
References writeParticlesVTK_.
Referenced by writeVTK().
bool DPMBase::getRestarted | ( | ) | const |
Returns the flag denoting if the simulation was restarted or not.
Definition at line 626 of file DPMBase.cc.
References restarted_.
Referenced by solve(), and writeOutputFiles().
std::string DPMBase::getRestartVersion | ( | ) | const |
This is to take into account for different Mercury versions. Returns the version of the restart file.
Definition at line 608 of file DPMBase.cc.
References restartVersion_.
Referenced by Chute::read().
bool DPMBase::getRotation | ( | ) | const |
Returns a flag indicating if particle rotation is enabled or disabled.
Definition at line 239 of file DPMBase.cc.
References rotation_.
Referenced by computeForcesDueToWalls(), and computeInternalForces().
unsigned int DPMBase::getSystemDimensions | ( | ) | const |
Returns the dimension of the simulation. Note there is also a particle dimension.
Definition at line 575 of file DPMBase.cc.
References systemDimensions_.
Referenced by checkSettings(), HGridOptimiser::initialise(), outputXBallsData(), readNextDataFile(), StatisticsVector< T >::setNZ(), and write().
Mdouble DPMBase::getTime | ( | ) | const |
Access function for the time.
Definition at line 169 of file DPMBase.cc.
References time_.
Referenced by StatisticsVector< T >::check_current_time_for_statistics(), computeForcesDueToWalls(), computeInternalForces(), HertzianSinterInteraction::computeSinterForce(), LeesEdwardsBoundary::getCurrentShift(), LeesEdwardsBoundary::getCurrentVelocity(), integrateAfterForceComputation(), integrateBeforeForceComputation(), isTimeEqualTo(), helpers::loadingTest(), main(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), outputXBallsData(), Chute::printTime(), printTime(), FileReader::read(), ShearBoxBoundary::shiftHorizontalPosition(), LeesEdwardsBoundary::shiftVerticalPosition(), solve(), LeesEdwardsBoundary::write(), write(), writeEneTimestep(), writeFstatHeader(), and writeVTK().
Mdouble DPMBase::getTimeMax | ( | ) | const |
Allows the user to access the total simulation time during the simulation. Cannot change it though.
Definition at line 214 of file DPMBase.cc.
References timeMax_.
Referenced by StatisticsVector< T >::getTimeMaxStat(), helpers::loadingTest(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), Chute::printTime(), printTime(), Mercury3DRestart::readNextArgument(), readNextArgument(), solve(), and write().
Mdouble DPMBase::getTimeStep | ( | ) | const |
Allows the time step dt to be accessed.
Definition at line 465 of file DPMBase.cc.
References timeStep_.
Referenced by StatisticsVector< T >::check_current_time_for_statistics(), checkSettings(), computeForcesDueToWalls(), SlidingFrictionInteraction::computeFrictionForce(), FrictionInteraction::computeFrictionForce(), MindlinInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), computeInternalForces(), SinterInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), ChuteWithHopper::getTimeStepRatio(), integrateAfterForceComputation(), integrateBeforeForceComputation(), isTimeEqualTo(), ChuteBottom::makeRoughBottom(), readNextArgument(), readParAndIniFiles(), and write().
FileType DPMBase::getWallsWriteVTK | ( | ) | const |
Returns a flag indicating if particle rotation is enabled or disabled.
Definition at line 263 of file DPMBase.cc.
References writeWallsVTK_.
Referenced by writeVTK().
std::string DPMBase::getXBallsAdditionalArguments | ( | ) | const |
Returns the additional arguments for xballs.
Definition at line 513 of file DPMBase.cc.
References xBallsAdditionalArguments_.
Referenced by write().
int DPMBase::getXBallsColourMode | ( | ) | const |
Get the xball colour mode (CMode)
Definition at line 481 of file DPMBase.cc.
References xBallsColourMode_.
double DPMBase::getXBallsScale | ( | ) | const |
Returns the scale of the view in xballs.
Definition at line 529 of file DPMBase.cc.
References xBallsScale_.
double DPMBase::getXBallsVectorScale | ( | ) | const |
Returns the scale of vectors used in xballs.
Definition at line 497 of file DPMBase.cc.
References xBallsVectorScale_.
Mdouble DPMBase::getXMax | ( | ) | const |
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax,.
Definition at line 287 of file DPMBase.cc.
References xMax_.
Referenced by Chute::cleanChute(), Chute::createBottom(), domainSize(), ChuteWithHopper::getChuteLength(), Chute::getChuteLength(), ChuteWithHopper::getMaximumVelocityInducedByGravity(), StatisticsVector< T >::getXMaxStat(), HGridOptimiser::initialise(), outputXBallsData(), readParAndIniFiles(), ChuteWithHopper::setHopperShift(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), setXMin(), write(), and writeFstatHeader().
Mdouble DPMBase::getXMin | ( | ) | const |
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin,.
Definition at line 279 of file DPMBase.cc.
References xMin_.
Referenced by Chute::cleanChute(), Chute::createBottom(), domainSize(), StatisticsVector< T >::getXMinStat(), HGridOptimiser::initialise(), outputXBallsData(), readParAndIniFiles(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), setXMax(), write(), and writeFstatHeader().
Mdouble DPMBase::getYMax | ( | ) | const |
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax,.
Definition at line 303 of file DPMBase.cc.
References yMax_.
Referenced by ChuteWithHopper::addHopper(), Chute::createBottom(), domainSize(), Chute::getChuteWidth(), StatisticsVector< T >::getYMaxStat(), HGridOptimiser::initialise(), outputXBallsData(), readParAndIniFiles(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), ChuteWithHopper::setupInitialConditions(), Chute::setupSideWalls(), setYMin(), write(), and writeFstatHeader().
Mdouble DPMBase::getYMin | ( | ) | const |
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin,.
Definition at line 295 of file DPMBase.cc.
References yMin_.
Referenced by ChuteWithHopper::addHopper(), Chute::createBottom(), domainSize(), StatisticsVector< T >::getYMinStat(), HGridOptimiser::initialise(), outputXBallsData(), readParAndIniFiles(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), ChuteWithHopper::setupInitialConditions(), Chute::setupSideWalls(), setYMax(), write(), and writeFstatHeader().
Mdouble DPMBase::getZMax | ( | ) | const |
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax,.
Definition at line 319 of file DPMBase.cc.
References zMax_.
Referenced by domainSize(), StatisticsVector< T >::getZMaxStat(), HGridOptimiser::initialise(), outputXBallsData(), readParAndIniFiles(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), setZMin(), write(), and writeFstatHeader().
Mdouble DPMBase::getZMin | ( | ) | const |
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin,.
Definition at line 311 of file DPMBase.cc.
References zMin_.
Referenced by Chute::createBottom(), domainSize(), StatisticsVector< T >::getZMinStat(), HGridOptimiser::initialise(), outputXBallsData(), readParAndIniFiles(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), setZMax(), write(), and writeFstatHeader().
|
protectedvirtual |
no implementation but can be overidden in its derived classes.
Reimplemented in MercuryBase.
Definition at line 859 of file DPMBase.cc.
Referenced by solve().
|
protectedvirtual |
no implementation but can be overidden in its derived classes.
Reimplemented in MercuryBase.
Definition at line 852 of file DPMBase.cc.
Referenced by solve().
|
protectedvirtual |
A virtual function that allows one to carry out hGrid operations before the start of the time loop.
no implementation but can be overidden in its derived classes.
Reimplemented in MercuryBase.
Definition at line 729 of file DPMBase.cc.
Referenced by solve().
|
protectedvirtual |
A virtual function that allows one to set or execute hGrid parameters or operations before every simulation time step.
no implementation but can be overidden in its derived classes.
Reimplemented in MercuryBase.
Definition at line 743 of file DPMBase.cc.
Referenced by solve().
|
virtual |
no implementation but can be overidden in its derived classes.
Definition at line 750 of file DPMBase.cc.
Referenced by ParticleHandler::addObject().
|
virtual |
no implementation but can be overidden in its derived classes.
Definition at line 764 of file DPMBase.cc.
Referenced by ParticleHandler::removeLastObject(), and ParticleHandler::removeObject().
|
virtual |
no implementation but can be overidden in its derived classes.
Reimplemented in MercuryBase.
Definition at line 845 of file DPMBase.cc.
Referenced by BaseParticle::integrateBeforeForceComputation().
|
virtual |
no implementation but can be overidden in its derived classes.
Definition at line 757 of file DPMBase.cc.
Referenced by ParticleHandler::addObject(), MercuryBase::hGridActionsBeforeTimeStep(), and MercuryBase::hGridRebuild().
|
protectedvirtual |
no implementation but can be overidden in its derived classes.
Reimplemented in StatisticsVector< T >.
Definition at line 800 of file DPMBase.cc.
Referenced by solve().
|
protected |
|
protectedvirtual |
Integration is done after force computations. We apply the Velocity verlet scheme. See http://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet.
Definition at line 1779 of file DPMBase.cc.
References BaseHandler< T >::begin(), BaseHandler< T >::end(), getTime(), getTimeStep(), particleHandler, and wallHandler.
Referenced by solve().
|
protectedvirtual |
This is were the integration is done, at the moment it is velocity Verlet integration and is done before the forces are computed. See http://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet.
Definition at line 1748 of file DPMBase.cc.
References BaseHandler< T >::begin(), BaseHandler< T >::end(), getTime(), getTimeStep(), particleHandler, and wallHandler.
Referenced by solve().
|
protected |
Checks if the input variable "time" is the current time in the simulation.
Definition at line 2813 of file DPMBase.cc.
References getTime(), and getTimeStep().
|
protected |
Displays the interaction details corresponding to the pointer objects in the interaction handler.
Skims through all the object pointers of type BaseInteraction in the interaction handler. Outputs the type of interaction between two particles P and I.
Definition at line 2798 of file DPMBase.cc.
References interactionHandler.
|
protectedvirtual |
no implementation but can be overidden in its derived classes.
Reimplemented in StatisticsVector< T >.
Definition at line 807 of file DPMBase.cc.
|
protectedvirtual |
This function writes the location of the walls and particles in a format the XBalls program can read. See XBalls/xballs.txt. However, MercuryDPM supports a much better viewer now called Paraview. See the tutorials section in the documentation.
[in] | os |
Definition at line 1147 of file DPMBase.cc.
References BaseHandler< T >::getNumberOfObjects(), getSystemDimensions(), getTime(), getXMax(), getXMin(), getYMax(), getYMin(), getZMax(), getZMin(), outputXBallsDataParticle(), and particleHandler.
Referenced by writeOutputFiles().
|
protectedvirtual |
This function writes out the particle locations into an output stream in a format the XBalls program can read.
Referenced by outputXBallsData().
|
protectedvirtual |
Displays the current simulation time onto your screen for example.
Reimplemented in Chute.
Definition at line 886 of file DPMBase.cc.
References getTime(), and getTimeMax().
Referenced by Mercury3DRestart::readNextArgument(), and writeOutputFiles().
|
protectedvirtual |
no implementation but can be overidden in its derived classes.
Reimplemented in StatisticsVector< T >.
Definition at line 831 of file DPMBase.cc.
|
virtual |
Reads all data from a restart file, e.g. domain data and particle data.
[in] | is |
todo{Do we want to calculate the mass?}
Reimplemented in ChuteWithHopper, MercuryBase, and Chute.
Definition at line 1955 of file DPMBase.cc.
References boundaryHandler, BaseHandler< T >::clear(), ParticleHandler::clear(), ERROR, FATAL, helpers::getLineFromStringStream(), gravity_, INFO, interactionHandler, logger, NO_FILE, ntimeSteps_, particleDimensions_, particleHandler, random, RNG::read(), FilesAndRunNumber::read(), BaseHandler< T >::read(), BoundaryHandler::readObject(), WallHandler::readObject(), ParticleHandler::readObject(), readOld(), restartVersion_, BaseHandler< T >::setStorageCapacity(), InteractionHandler::setWriteVTK(), setXBallsAdditionalArguments(), speciesHandler, systemDimensions_, time_, timeMax_, timeStep_, wallHandler, writeParticlesVTK_, writeWallsVTK_, xMax_, xMin_, yMax_, yMin_, zMax_, and zMin_.
Referenced by MercuryBase::read(), and readRestartFile().
bool DPMBase::readArguments | ( | int | argc, |
char * | argv[] | ||
) |
Can interpret main function input arguments that are passed by the driver codes.
[in] | argc | |
[in] | *argv[] |
Definition at line 2320 of file DPMBase.cc.
References readNextArgument().
Referenced by solve().
bool DPMBase::readDataFile | ( | const std::string | fileName, |
unsigned int | format = 0 |
||
) |
This allows particle data to be reloaded from data files.
E.g. If one has a data file. This function loads data from the .data file i.e. you get position, velocity, angular velocty, radius .. info. See also MD::readRestartFile For XBalls: Can read in format_ 14 - 8 or format_ 7 data format. This code saves in format_ 8 for 2D and format_ 14 for 3D. So if no extra parameters are specified it will assume things many parameters, like density cannot be set using the data file.
[in] | fileName | |
[in] | format | (format for specifying if its for 2D or 3D data) |
Definition at line 1202 of file DPMBase.cc.
References File::close(), Files::dataFile, File::getFileType(), File::getFstream(), File::getName(), ONE_FILE, File::open(), readNextDataFile(), File::setFileType(), and File::setName().
Referenced by readNextArgument().
|
virtual |
Interprets the i^th command-line argument.
[in] | i | |
[in] | argc | |
[in] | *argv[] |
argv[i+1] interpreted as argument of type char*, Mdouble, integer or boolean unless noted
-gravity_ requires three arguments
-restart or -r loads a restart file. By default, it loads <name>.restart. If an argument "arg" is given it loads the file "arg", or "arg".restart (if the ending is not given).
-clean of -c removes all files <name>.*.
Reimplemented in MercuryBase, ChuteWithHopper, Chute, and Mercury3DRestart.
Definition at line 2349 of file DPMBase.cc.
References FilesAndRunNumber::autoNumber(), Files::dataFile, Files::eneFile, Files::fStatFile, Files::getName(), getNtimeSteps(), File::getSaveCount(), getTimeMax(), getTimeStep(), random, RNG::randomise(), readDataFile(), readRestartFile(), Files::restartFile, setAddLarge(), setAddSmall(), setAppend(), File::setFileType(), Files::setFileType(), setFixedParticles(), setGravity(), Files::setName(), Files::setNextSavedTimeStep(), FilesAndRunNumber::setRunNumber(), File::setSaveCount(), Files::setSaveCount(), setSystemDimensions(), setTimeMax(), setTimeStep(), setXMax(), setXMin(), setYMax(), setYMin(), setZMax(), setZMin(), Files::statFile, and to_string_padded().
Referenced by readArguments(), and MercuryBase::readNextArgument().
bool DPMBase::readNextDataFile | ( | unsigned int | format = 0 | ) |
Reads the next data file with default format=0. However, one can modify the format based on whether the particle data corresponds to 3D or 2D data. See XBalls/xballs.txt.
[in] | format |
Definition at line 1434 of file DPMBase.cc.
References ParticleHandler::computeAllMasses(), BaseHandler< T >::copyAndAddObject(), Files::dataFile, File::getFstream(), BaseHandler< T >::getLastObject(), helpers::getLineFromStringStream(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), getSystemDimensions(), INFO, logger, File::openNextFile(), particleHandler, ParticleHandler::removeLastObject(), BaseParticle::setSpecies(), setTime(), setXMax(), setXMin(), setYMax(), setYMin(), setZMax(), setZMin(), speciesHandler, time_, BaseParticle::unfix(), Vec3D::X, xMax_, xMin_, Vec3D::Y, yMax_, yMin_, Vec3D::Z, zMax_, and zMin_.
Referenced by main(), and readDataFile().
|
virtual |
Reads all data from a restart file, e.g. domain data and particle data; old version.
[in] | is |
Definition at line 2063 of file DPMBase.cc.
References boundaryHandler, Files::dataFile, Files::eneFile, Files::fStatFile, gravity_, particleHandler, BaseHandler< T >::read(), Files::restartFile, File::setFileType(), Files::setName(), File::setSaveCount(), speciesHandler, Files::statFile, systemDimensions_, time_, timeMax_, timeStep_, wallHandler, xMax_, xMin_, yMax_, yMin_, zMax_, and zMin_.
Referenced by read().
bool DPMBase::readParAndIniFiles | ( | const std::string | fileName | ) |
Allows the user to read par.ini files (useful to read MDCLR files)
[in] | fileName |
Definition at line 1231 of file DPMBase.cc.
References SpeciesHandler::addObject(), boundaryHandler, BaseHandler< T >::clear(), BaseHandler< T >::copyAndAddObject(), Files::dataFile, Files::fStatFile, BaseHandler< T >::getObject(), getTimeStep(), getXMax(), getXMin(), getYMax(), getYMin(), getZMax(), getZMin(), PeriodicBoundary::set(), InfiniteWall::set(), setGravity(), setParticleDimensions(), File::setSaveCount(), Files::setSaveCount(), BaseWall::setSpecies(), setTime(), setTimeMax(), setTimeStep(), speciesHandler, and wallHandler.
bool DPMBase::readRestartFile | ( | bool | restarted = true | ) |
Reads all the particle data corresponding to the current saved time step. Which is what the restart file basically stores. The problem description with the latest particle data. Returns 0 if it is successful, 1 otherwise.
Calls the read() and sets the restarted_ flag to true (if the file is found)
Definition at line 1629 of file DPMBase.cc.
References File::close(), File::getFstream(), File::open(), read(), Files::restartFile, and setRestarted().
Referenced by main(), Mercury3DRestart::readNextArgument(), readNextArgument(), and readRestartFile().
int DPMBase::readRestartFile | ( | std::string | fileName | ) |
The same as readRestartFile(bool), but also reads all the particle data corresponding to the current saved time step.
[in] | fileName |
Definition at line 1647 of file DPMBase.cc.
References readRestartFile(), Files::restartFile, and File::setName().
|
inlinevirtual |
|
protected |
Removes periodic duplicate Particles.
Removes particles created by CheckAndDuplicatePeriodicParticle(int i, int nWallPeriodic)). Note that between these two functions it is not allowed to create additional functions
Definition at line 2765 of file DPMBase.cc.
References BaseInteractable::getInteractions(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), BaseParticle::getPeriodicFromParticle(), interactionHandler, particleHandler, ParticleHandler::removeObject(), and InteractionHandler::removeObjectKeepingPeriodics().
Referenced by solve().
void DPMBase::setAddLarge | ( | int | addL | ) |
sets the number of large particles that are to be added on restart.
[in] | addL |
Definition at line 351 of file DPMBase.cc.
References addL_.
Referenced by readNextArgument().
void DPMBase::setAddSmall | ( | int | addS | ) |
sets the number of small particles that are to be added on restart.
[in] | addS |
Definition at line 343 of file DPMBase.cc.
References addS_.
Referenced by readNextArgument().
void DPMBase::setAppend | ( | bool | newAppendFlag | ) |
Allows to set the append option.
[in] | newAppendFlag |
Definition at line 651 of file DPMBase.cc.
References append_.
Referenced by constructor(), Mercury3DRestart::readNextArgument(), and readNextArgument().
void DPMBase::setDimension | ( | unsigned int | newDim | ) |
Sets the system and particle dimension.
[in] | newDim |
Definition at line 553 of file DPMBase.cc.
References setParticleDimensions(), and setSystemDimensions().
void DPMBase::setDoCGAlways | ( | bool | newDoCGFlag | ) |
|
protected |
[in] | n |
Definition at line 877 of file DPMBase.cc.
References BaseParticle::fixParticle(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), and particleHandler.
Referenced by readNextArgument().
void DPMBase::setGravity | ( | Vec3D | newGravity | ) |
Allows to modify the gravity vector.
[in] | newGravity |
Definition at line 537 of file DPMBase.cc.
References gravity_.
Referenced by readNextArgument(), readParAndIniFiles(), and Chute::setChuteAngleAndMagnitudeOfGravity().
void DPMBase::setMax | ( | Vec3D | max | ) |
Sets the values xMax, yMax, zMax of the problem domain, which is [xMin,xMax]x[yMin,yMax]x[zMin,zMax].
[in] | newXMax |
Definition at line 395 of file DPMBase.cc.
References setXMax(), setYMax(), setZMax(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
Referenced by helpers::loadingTest(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), and FileReader::read().
void DPMBase::setMin | ( | Vec3D | min | ) |
Sets the values xMin, yMin, zMin of the problem domain, which is [xMin,xMax]x[yMin,yMax]x[zMin,zMax].
[in] | newXMax |
Definition at line 405 of file DPMBase.cc.
References setXMin(), setYMin(), setZMin(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
Referenced by helpers::loadingTest(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), and FileReader::read().
void DPMBase::setParticleDimensions | ( | unsigned int | particleDimensions | ) |
Allows the dimension of the particle (f.e. for mass) to be changed. e.g. discs or spheres.
[in] | particleDimensions |
Definition at line 583 of file DPMBase.cc.
References ParticleHandler::computeAllMasses(), logger, particleDimensions_, particleHandler, and WARN.
Referenced by Mercury2D::constructor(), Mercury3D::constructor(), constructor(), helpers::loadingTest(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), SpeciesHandler::readOldObject(), readParAndIniFiles(), and setDimension().
void DPMBase::setParticlesWriteVTK | ( | bool | writeParticlesVTK | ) |
Allows to set the flag for enabling or disabling particle rotation in the simulations.
[in] | writeParticlesVTK |
Definition at line 255 of file DPMBase.cc.
References writeParticlesVTK_.
void DPMBase::setRestarted | ( | bool | newRestartedFlag | ) |
Allows to set the flag stating if the simulation is to be restarted or not.
[in] | newRestartedFlag |
Definition at line 634 of file DPMBase.cc.
References restarted_.
Referenced by constructor(), and readRestartFile().
void DPMBase::setRestartVersion | ( | std::string | newRV | ) |
Sets restart_version.
[in] | newRV |
Definition at line 617 of file DPMBase.cc.
References restartVersion_.
void DPMBase::setRotation | ( | bool | newRotFlag | ) |
Allows to set the flag for enabling or disabling particle rotation in the simulations.
[in] | newRotFlag |
Definition at line 231 of file DPMBase.cc.
References rotation_.
Referenced by SpeciesHandler::addObject(), and SpeciesHandler::removeObject().
void DPMBase::setSystemDimensions | ( | unsigned int | newDim | ) |
Allows for the dimension of the simulation to be changed.
[in] | newDim |
Definition at line 562 of file DPMBase.cc.
References ERROR, logger, and systemDimensions_.
Referenced by Mercury2D::constructor(), Mercury3D::constructor(), constructor(), helpers::loadingTest(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), readNextArgument(), and setDimension().
void DPMBase::setTime | ( | Mdouble | time | ) |
Access function for the time.
[in] | time |
Definition at line 185 of file DPMBase.cc.
References interactionHandler, and time_.
Referenced by FileReader::read(), readNextDataFile(), readParAndIniFiles(), and solve().
void DPMBase::setTimeMax | ( | Mdouble | newTMax | ) |
Allows the upper time limit to be changed.
[in] | newTMmax |
Definition at line 199 of file DPMBase.cc.
References ERROR, logger, and timeMax_.
Referenced by helpers::loadingTest(), ChuteBottom::makeRoughBottom(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), readNextArgument(), and readParAndIniFiles().
void DPMBase::setTimeStep | ( | Mdouble | timeStep | ) |
Allows the time step dt to be changed.
[in] | timeStep |
Definition at line 451 of file DPMBase.cc.
References ERROR, logger, and timeStep_.
Referenced by helpers::loadingTest(), ChuteBottom::makeRoughBottom(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), readNextArgument(), and readParAndIniFiles().
|
virtual |
This function allows to set the initial conditions for our problem to be solved, by default particle locations are randomly set. Remember particle properties must also be defined here.
A virtual function with no implementation but can be overriden.
This sets up the particles initial conditions it is as you expect the user to override this. By default the particles are randomly disibuted
Reimplemented in ChuteWithHopper, Chute, ChuteBottom, and Mercury2PVD.
Definition at line 966 of file DPMBase.cc.
Referenced by helpers::loadingTest(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), and solve().
void DPMBase::setWallsWriteVTK | ( | FileType | writeWallsVTK | ) |
Allows to set the flag for enabling or disabling particle rotation in the simulations.
[in] | writeWallsVTK |
Definition at line 247 of file DPMBase.cc.
References writeWallsVTK_.
void DPMBase::setXBallsAdditionalArguments | ( | std::string | newXBArgs | ) |
Set the additional arguments for xballs.
[in] | newXBArgs |
Definition at line 505 of file DPMBase.cc.
References xBallsAdditionalArguments_.
Referenced by read().
void DPMBase::setXBallsColourMode | ( | int | newCMode | ) |
Set the xball output mode.
[in] | newCMode |
Definition at line 473 of file DPMBase.cc.
References xBallsColourMode_.
void DPMBase::setXBallsScale | ( | Mdouble | newScale | ) |
Sets the scale of the view (either normal, zoom in or zoom out) to display in xballs. The default is fit to screen.
[in] | newScale |
Definition at line 521 of file DPMBase.cc.
References xBallsScale_.
void DPMBase::setXBallsVectorScale | ( | double | newVScale | ) |
Set the scale of vectors in xballs.
[in] | newVScale |
Definition at line 489 of file DPMBase.cc.
References xBallsVectorScale_.
void DPMBase::setXMax | ( | Mdouble | xMax | ) |
If the length of the problem domain in x-direction is XMax - XMin, this method sets XMax.
[in] | newXMax |
Definition at line 415 of file DPMBase.cc.
References getXMin(), logger, WARN, and xMax_.
Referenced by readNextArgument(), readNextDataFile(), ChuteWithHopper::setChuteLength(), Chute::setChuteLength(), ChuteWithHopper::setHopperShift(), and setMax().
void DPMBase::setXMin | ( | Mdouble | xMin | ) |
If the length of the problem domain in x-direction is XMax - XMin, this method sets XMin.
[in] | newXMin |
Definition at line 359 of file DPMBase.cc.
References getXMax(), logger, WARN, and xMin_.
Referenced by readNextArgument(), readNextDataFile(), ChuteWithHopper::setChuteLength(), and setMin().
void DPMBase::setYMax | ( | Mdouble | yMax | ) |
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMax.
[in] | newYMax |
Definition at line 427 of file DPMBase.cc.
References getYMin(), logger, WARN, and yMax_.
Referenced by readNextArgument(), readNextDataFile(), Chute::setChuteWidth(), and setMax().
void DPMBase::setYMin | ( | Mdouble | yMin | ) |
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMin.
[in] | newYMin |
Definition at line 371 of file DPMBase.cc.
References getYMax(), logger, WARN, and yMin_.
Referenced by readNextArgument(), readNextDataFile(), and setMin().
void DPMBase::setZMax | ( | Mdouble | zMax | ) |
If the length of the problem domain in z-direction is XMax - XMin, this method sets ZMax.
[in] | newZMax |
Definition at line 439 of file DPMBase.cc.
References getZMin(), logger, WARN, and zMax_.
Referenced by ChuteWithHopper::addHopper(), Chute::readNextArgument(), readNextArgument(), readNextDataFile(), Chute::setInflowHeight(), and setMax().
void DPMBase::setZMin | ( | Mdouble | zMin | ) |
If the length of the problem domain in z-direction is ZMax - ZMin, this method sets ZMin.
[in] | newZMin |
Definition at line 383 of file DPMBase.cc.
References getZMax(), logger, WARN, and zMin_.
Referenced by readNextArgument(), readNextDataFile(), and setMin().
void DPMBase::solve | ( | ) |
The work horse of the code.
Initialise the time and sets up the initial conditions for the simulation
Definition at line 2188 of file DPMBase.cc.
References actionsAfterSolve(), InteractionHandler::actionsAfterTimeStep(), actionsAfterTimeStep(), actionsBeforeTimeLoop(), actionsBeforeTimeStep(), actionsOnRestart(), boundaryHandler, checkAndDuplicatePeriodicParticles(), checkInteractionWithBoundaries(), checkSettings(), Files::closeFiles(), computeAllForces(), ParticleHandler::computeAllMasses(), continueSolve(), DEBUG, InteractionHandler::eraseOldInteractions(), finishStatistics(), getAppend(), Files::getName(), getRestarted(), FilesAndRunNumber::getRunNumber(), getTime(), getTimeMax(), hGridActionsAfterIntegration(), hGridActionsBeforeIntegration(), hGridActionsBeforeTimeLoop(), hGridActionsBeforeTimeStep(), INFO, initialiseStatistics(), integrateAfterForceComputation(), integrateBeforeForceComputation(), interactionHandler, logger, ntimeSteps_, particleHandler, removeDuplicatePeriodicParticles(), Files::resetFileCounter(), Files::restartFile, Files::setName(), Files::setNextSavedTimeStep(), File::setOpenMode(), Files::setOpenMode(), setTime(), setupInitialConditions(), time_, timeStep_, and writeOutputFiles().
Referenced by ChuteBottom::makeRoughBottom(), and solve().
void DPMBase::solve | ( | int | argc, |
char * | argv[] | ||
) |
The solve function is the work horse of the code with the user input.
[in] | argc | |
[in] | argv |
Definition at line 160 of file DPMBase.cc.
References readArguments(), and solve().
|
virtual |
Loads all MD data and plots statistics for all timesteps in the .data file.
Writes all data into a restart file
[in] | os | |
[in] | writeAllParticles |
Reimplemented in ChuteWithHopper, MercuryBase, and Chute.
Definition at line 1897 of file DPMBase.cc.
References boundaryHandler, helpers::compare(), getGravity(), BaseHandler< T >::getNumberOfObjects(), BaseHandler< T >::getObject(), getParticleDimensions(), getSystemDimensions(), getTime(), getTimeMax(), getTimeStep(), InteractionHandler::getWriteVTK(), getXBallsAdditionalArguments(), getXMax(), getXMin(), getYMax(), getYMin(), getZMax(), getZMin(), interactionHandler, ntimeSteps_, particleHandler, random, speciesHandler, wallHandler, RNG::write(), SpeciesHandler::write(), InteractionHandler::write(), FilesAndRunNumber::write(), ParticleHandler::write(), writeParticlesVTK_, and writeWallsVTK_.
Referenced by operator<<(), MercuryBase::write(), and writeRestartFile().
|
protectedvirtual |
Writes a header with a certain format for ENE file.
[in] | os |
todo{Why is there a +6 here? TW: to get the numbers and title aligned}
Definition at line 973 of file DPMBase.cc.
References getAppend().
Referenced by writeOutputFiles().
|
protectedvirtual |
This function enables one to write the global energy available in the system after each time step. The default is to compute the rotational and translational kinetic energy, potential energy and the centre of mass.
[in] | os |
todo{Why is there a +6 here? TW: to ensure the numbers fit into a constant width column}
Definition at line 1044 of file DPMBase.cc.
References Vec3D::dot(), getElasticEnergy(), getGravity(), getTime(), and particleHandler.
Referenced by writeOutputFiles().
|
protectedvirtual |
Writes a header with a certain format for FStat file.
[in] | os |
Definition at line 994 of file DPMBase.cc.
References ParticleHandler::getLargestParticle(), BaseParticle::getRadius(), ParticleHandler::getSmallestParticle(), getTime(), getXMax(), getXMin(), getYMax(), getYMin(), getZMax(), getZMin(), interactionHandler, and particleHandler.
Referenced by writeOutputFiles().
|
virtual |
Writes the simulation data onto all the files i.e. .data, .ene, .fstat ...
Reimplemented in Mercury3DRestart, and StatisticsVector< T >.
Definition at line 2139 of file DPMBase.cc.
References File::close(), Files::dataFile, Files::eneFile, Files::fStatFile, File::getCounter(), File::getFileType(), File::getFstream(), getRestarted(), MULTIPLE_FILES, MULTIPLE_FILES_PADDED, NO_FILE, ntimeSteps_, outputXBallsData(), printTime(), Files::restartFile, File::saveCurrentTimestep(), writeEneHeader(), writeEneTimestep(), writeFstatHeader(), writeRestartFile(), writeVTK(), and writeXBallsScript().
Referenced by FileReader::read(), solve(), and Mercury3DRestart::writeOutputFiles().
|
virtual |
Stores all the particle data for current save time step. Calls the write function.
/// See also MD::readRestartFile
Definition at line 1618 of file DPMBase.cc.
References File::getFstream(), Files::restartFile, and write().
Referenced by writeOutputFiles().
|
protected |
Definition at line 1080 of file DPMBase.cc.
References Files::getName(), getParticlesWriteVTK(), getTime(), getWallsWriteVTK(), InteractionHandler::getWriteVTK(), INFO, interactionHandler, logger, MULTIPLE_FILES, MULTIPLE_FILES_PADDED, NO_FILE, ONE_FILE, particleHandler, wallHandler, helpers::writeToFile(), WallHandler::writeVTK(), InteractionHandler::writeVTK(), and ParticleHandler::writeVTK().
Referenced by writeOutputFiles().
|
virtual |
This writes a script which can be used to load the xballs problem to display the data just generated.
Referenced by writeOutputFiles().
|
friend |
Operator overloading of DPMBase class, writes the StatType to the given ostream.
|
private |
Stores the number of large particles that are to be added on restart.
Definition at line 886 of file DPMBase.h.
Referenced by getAddLarge(), and setAddLarge().
|
private |
Stores the number of small particles that are to be added on restart.
Definition at line 892 of file DPMBase.h.
Referenced by getAddSmall(), and setAddSmall().
|
private |
A flag to determine if the file has to be appended or not. See DPMBase::Solve() for example.
Definition at line 939 of file DPMBase.h.
Referenced by DPMBase(), getAppend(), and setAppend().
BoundaryHandler DPMBase::boundaryHandler |
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or from regions.
Definition at line 1011 of file DPMBase.h.
Referenced by checkAndDuplicatePeriodicParticles(), checkInteractionWithBoundaries(), checkParticleForInteractionLocalPeriodic(), constructor(), DPMBase(), read(), readOld(), readParAndIniFiles(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), ChuteWithHopper::setupInitialConditions(), Chute::setupSideWalls(), solve(), and write().
|
private |
|
private |
Gravity vector.
Definition at line 842 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getGravity(), read(), readOld(), and setGravity().
InteractionHandler DPMBase::interactionHandler |
An object of the class InteractionHandler.
Definition at line 1016 of file DPMBase.h.
Referenced by computeForcesDueToWalls(), computeInternalForces(), constructor(), DPMBase(), gatherContactStatistics(), getElasticEnergy(), main(), outputInteractionDetails(), FileReader::read(), read(), removeDuplicatePeriodicParticles(), setTime(), solve(), write(), writeFstatHeader(), and writeVTK().
|
private |
Stores the number of time steps.
Definition at line 904 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getNtimeSteps(), read(), solve(), write(), and writeOutputFiles().
|
private |
determines if 2D or 3D particle volume is used for mass calculations
Definition at line 837 of file DPMBase.h.
Referenced by DPMBase(), getParticleDimensions(), read(), and setParticleDimensions().
ParticleHandler DPMBase::particleHandler |
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition at line 1001 of file DPMBase.h.
Referenced by ChuteWithHopper::addHopper(), SpeciesHandler::addObject(), broadPhase(), checkAndDuplicatePeriodicParticles(), InsertionBoundary::checkBoundaryBeforeTimeStep(), checkInteractionWithBoundaries(), checkParticleForInteractionLocal(), checkParticleForInteractionLocalPeriodic(), Chute::cleanChute(), computeAllForces(), constructor(), Chute::createBottom(), DPMBase(), getGravitationalEnergy(), MercuryBase::getHGridTargetMaxInteractionRadius(), MercuryBase::getHGridTargetMinInteractionRadius(), MercuryBase::getHGridTargetNumberOfBuckets(), getKineticEnergy(), MercuryBase::hGridActionsBeforeTimeStep(), MercuryBase::hGridNeedsRebuilding(), MercuryBase::hGridRebuild(), HGridOptimiser::initialise(), integrateAfterForceComputation(), integrateBeforeForceComputation(), main(), ChuteBottom::makeRoughBottom(), outputXBallsData(), Chute::printTime(), FileReader::read(), read(), readNextDataFile(), InteractionHandler::readObject(), readOld(), removeDuplicatePeriodicParticles(), LiquidMigrationWilletInteraction::rupture(), ParticleSpecies::setDensity(), setFixedParticles(), setParticleDimensions(), BaseParticle::setSpecies(), ChuteBottom::setupInitialConditions(), solve(), write(), writeEneTimestep(), writeFstatHeader(), and writeVTK().
RNG DPMBase::random |
This is a random generator, often used for setting up the initial conditions etc...
Definition at line 996 of file DPMBase.h.
Referenced by InsertionBoundary::checkBoundaryBeforeTimeStep(), constructor(), Chute::createBottom(), DPMBase(), read(), readNextArgument(), ChuteBottom::setupInitialConditions(), and write().
|
private |
A bool to check if the simulation was restarted or not, ie. if setupInitialConditionsShould be run and the fileCounters reset.
Definition at line 933 of file DPMBase.h.
Referenced by DPMBase(), getRestarted(), and setRestarted().
|
private |
Previous versions of MercuryDPM had a different restart file format, the below member variable allows one to specify the version in order to choose between the available version support.
Definition at line 928 of file DPMBase.h.
Referenced by DPMBase(), getRestartVersion(), read(), and setRestartVersion().
|
private |
A flag to turn on/off particle rotation.
Definition at line 944 of file DPMBase.h.
Referenced by DPMBase(), getRotation(), and setRotation().
SpeciesHandler DPMBase::speciesHandler |
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera.
Definition at line 991 of file DPMBase.h.
Referenced by ChuteWithHopper::addHopper(), MaserBoundary::addParticleToMaser(), checkSettings(), constructor(), Chute::createBottom(), DPMBase(), InteractionHandler::getInteraction(), ChuteBottom::makeRoughBottom(), FileReader::read(), read(), readNextDataFile(), WallHandler::readObject(), readOld(), readParAndIniFiles(), BaseParticle::setIndSpecies(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), ChuteWithHopper::setupInitialConditions(), Chute::setupSideWalls(), and write().
|
private |
The dimensions of the simulation i.e. 2D or 3D.
Definition at line 832 of file DPMBase.h.
Referenced by DPMBase(), getSystemDimensions(), read(), readOld(), and setSystemDimensions().
|
private |
Stores the current simulation time.
Definition at line 899 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getTime(), read(), readNextDataFile(), readOld(), setTime(), and solve().
|
private |
Stores the duration of the simulation.
Definition at line 914 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getTimeMax(), read(), readOld(), and setTimeMax().
|
private |
Stores the simulation time step.
Definition at line 909 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getTimeStep(), read(), readOld(), setTimeStep(), and solve().
WallHandler DPMBase::wallHandler |
An object of the class WallHandler. Contains pointers to all the walls created.
Definition at line 1006 of file DPMBase.h.
Referenced by ChuteWithHopper::addHopper(), checkParticleForInteractionLocal(), MercuryBase::checkParticleForInteractionLocal(), computeAllForces(), computeForcesDueToWalls(), constructor(), Chute::createBottom(), DPMBase(), integrateAfterForceComputation(), integrateBeforeForceComputation(), main(), FileReader::read(), read(), InteractionHandler::readObject(), readOld(), readParAndIniFiles(), BaseWall::setSpecies(), ChuteBottom::setupInitialConditions(), Chute::setupSideWalls(), write(), and writeVTK().
|
private |
A flag to turn on/off the vtk writer for particles.
Definition at line 954 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getParticlesWriteVTK(), read(), setParticlesWriteVTK(), and write().
|
private |
A flag to turn on/off the vtk writer for walls.
Definition at line 949 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getWallsWriteVTK(), read(), setWallsWriteVTK(), and write().
|
private |
A string of additional arguments for xballs can be specified (see XBalls/xballs.txt). e.g. "-solidf -v0".
Definition at line 977 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getXBallsAdditionalArguments(), and setXBallsAdditionalArguments().
|
private |
XBalls is a package to view the particle data. As an alternative MercuryDPM also supports Paraview. The below variable is used to set the argument cmode in xballs script (see XBalls/xballs.txt)
Definition at line 962 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getXBallsColourMode(), and setXBallsColourMode().
|
private |
sets the xballs argument scale (see XBalls/xballs.txt)
Definition at line 972 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getXBallsScale(), and setXBallsScale().
|
private |
sets the xballs argument vscale (see XBalls/xballs.txt)
Definition at line 967 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getXBallsVectorScale(), and setXBallsVectorScale().
|
private |
If the length of the problem domain in x-direction is XMax - XMin, the above variable stores XMax.
Definition at line 854 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getMax(), getXMax(), read(), readNextDataFile(), readOld(), and setXMax().
|
private |
If the length of the problem domain in x-direction is XMax - XMin, the above variable stores XMin.
Definition at line 848 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getMin(), getXMin(), read(), readNextDataFile(), readOld(), and setXMin().
|
private |
If the length of the problem domain in y-direction is YMax - XMin, the above variable stores YMax.
Definition at line 866 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getMax(), getYMax(), read(), readNextDataFile(), readOld(), and setYMax().
|
private |
If the length of the problem domain in y-direction is YMax - YMin, the above variable stores YMin.
Definition at line 860 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getMin(), getYMin(), read(), readNextDataFile(), readOld(), and setYMin().
|
private |
If the length of the problem domain in z-direction is ZMax - ZMin, the above variable stores ZMax.
Definition at line 878 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getMax(), getZMax(), read(), readNextDataFile(), readOld(), and setZMax().
|
private |
If the length of the problem domain in z-direction is ZMax - ZMin, the above variable stores ZMin.
Definition at line 872 of file DPMBase.h.
Referenced by constructor(), DPMBase(), getMin(), getZMin(), read(), readNextDataFile(), readOld(), and setZMin().