DPMBase.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef DPMBase_H
6 #define DPMBase_H
7 
8 //so that the user doesn't have to include string/io manipulations:
9 #include <string>
10 #include <iomanip>
11 // include file for signal handler types
12 #include <csignal>
13 //The vector class contains a 3D vector class.
14 #include "Math/Vector.h"
15 //This class defines the particle handler
16 #include "ParticleHandler.h"
17 //This class defines the base particle (such that not every Driver has to include it)
18 #include "Particles/BaseParticle.h"
20 //This class defines the wall handler
21 #include "WallHandler.h"
22 //This class defines the boundary handler
23 #include "BoundaryHandler.h"
25 #include "DomainHandler.h"
26 //This class defines the interaction handler
27 #include "InteractionHandler.h"
28 //This class defines the Species handler
29 #include "SpeciesHandler.h"
30 //This class defines the cg handler
31 #include "CG/CGHandler.h"
32 //This class defines the possibleContact lists
33 #ifdef CONTACT_LIST_HGRID
34 #include "PossibleContactList.h"
35 #endif
36 //This class defines the random number generator
37 #include "Math/RNG.h"
38 #include "Domain.h"
44 #include "MercuryTime.h"
45 
46 
55 class DPMBase
56 {
61 public:
62 
68  void constructor();
69 
73  DPMBase();
74 
78  DPMBase(const DPMBase& other);
79 
83  virtual ~DPMBase();
84 
89  static void incrementRunNumberInFile();
90 
94  static int readRunNumberFromFile();
95 
100  void autoNumber();
101 
106  std::vector<int> get1DParametersFromRunNumber(int size_x) const;
107 
112  std::vector<int> get2DParametersFromRunNumber(int size_x, int size_y) const;
113 
118  std::vector<int> get3DParametersFromRunNumber(int size_x, int size_y, int size_z) const;
119 
123  int launchNewRun(const char* name, bool quick = false);
124 
125  //setters and getters
126 
130  void setRunNumber(int runNumber);
131 
135  int getRunNumber() const;
136 
140 // void sendParticlesToRoot(unsigned int &numberOfLocalParticles, unsigned int processorId, ParticleHandler &tempParticleHandler) const;
141 
145  virtual void decompose();
146 
151  void solve();
152 
156  void initialiseSolve();
157 
161  void finaliseSolve();
162 
167  virtual void computeOneTimeStep();
168 
173  void checkSettings();
174 
178  void forceWriteOutputFiles();
179 
184  virtual void writeOutputFiles();
185 
189  void solve(int argc, char* argv[]);
190 
201  virtual void setupInitialConditions();
202 
207  virtual void writeXBallsScript() const;
208 
212  virtual Mdouble getInfo(const BaseParticle& P) const;
213 
215 
223  virtual void writeRestartFile();
224 
225  void writeDataFile();
226 
227  void writeEneFile();
228 
229  void writeFStatFile();
230 
231  void fillDomainWithParticles(unsigned N=50);
232 
233  enum class ReadOptions : int {
234  ReadAll,
237  };
238 
245 
251 
252 // /*!
253 // * \brief Loads all MD data and plots statistics for all time steps in the .data file
254 // */
255 // void statisticsFromRestartData(const char *name);
257 
261  virtual void write(std::ostream& os, bool writeAllParticles = true) const;
262 
267  virtual void read(std::istream& is, ReadOptions opt = ReadOptions::ReadAll);
268 
273  { return nullptr; }
274 
279  virtual void readOld(std::istream& is);
280 
284  bool readDataFile(std::string fileName = "", unsigned int format = 0);
285 
290 
296  bool readNextDataFile(unsigned int format = 0);
297 
301  void readNextFStatFile();
302 
306  bool findNextExistingDataFile(Mdouble tMin, bool verbose = true);
307 
312  bool readArguments(int argc, char* argv[]);
313 
317  virtual bool readNextArgument(int& i, int argc, char* argv[]);
318 
322  virtual bool checkParticleForInteraction(const BaseParticle& P);
323 
327  virtual bool checkParticleForInteractionLocal(const BaseParticle& P);
328 
330 
332 
338 
339  //getters and setters
340 
347  File& getDataFile();
348 
355  File& getEneFile();
356 
363  File& getFStatFile();
364 
371  File& getRestartFile();
372 
379  File& getStatFile();
380 
385 
392  const File& getDataFile() const;
393 
400  const File& getEneFile() const;
401 
408  const File& getFStatFile() const;
409 
416  const File& getRestartFile() const;
417 
424  const File& getStatFile() const;
425 
429  const File& getInteractionFile() const;
430 
434  const std::string& getName() const;
435 
439  void setName(const std::string& name);
440 
444  void setName(const char* name);
445 
449  void setSaveCount(unsigned int saveCount);
450 
454  void setFileType(FileType fileType);
455 
459  void setOpenMode(std::fstream::openmode openMode);
460 
461 
462  //other member functions
463 
467  void resetFileCounter();
468 
472  void closeFiles();
473 
477  void setVTKOutputDirectory(const std::string & dir);
478 
482  void setLastSavedTimeStep(unsigned int nextSavedTimeStep);
483 
487  Mdouble getTime() const;
488 
492  Mdouble getNextTime() const;
493 
498  unsigned int getNumberOfTimeSteps() const;
499 
503  void setTime(Mdouble time);
504 
508  void setTimeMax(Mdouble newTMax);
509 
513  Mdouble getTimeMax() const;
514 
518  void setLogarithmicSaveCount(Mdouble logarithmicSaveCountBase);
519 
523  void setNToWrite(int nToWrite);
524 
528  int getNToWrite() const;
529 
530 #ifdef CONTACT_LIST_HGRID
534  PossibleContactList& getPossibleContactList();
535 #endif
536 
547  void setRotation(bool rotation)
548  { rotation_ = rotation; }
549 
554  bool getRotation() const
555  { return rotation_; }
556 
562  void setWallsWriteVTK(FileType writeWallsVTK);
563 
569  void setWallsWriteVTK(bool);
570 
576  void setInteractionsWriteVTK(bool);
577 
581  void setParticlesWriteVTK(bool writeParticlesVTK);
582 
583  void setSuperquadricParticlesWriteVTK(bool writeSuperquadricParticlesVTK);
584 
590  FileType getWallsWriteVTK() const;
591 
595  bool getParticlesWriteVTK() const;
596 
598 
603  Mdouble getXMin() const
604  { return min_.x(); }
605 
610  Mdouble getXMax() const
611  { return max_.x(); }
612 
616  Mdouble getYMin() const
617  { return min_.y(); }
618 
622  Mdouble getYMax() const
623  { return max_.y(); }
624 
628  Mdouble getZMin() const
629  { return min_.z(); }
630 
634  Mdouble getZMax() const
635  { return max_.z(); }
636 
638  { return 0.5*(max_.X+min_.X); }
639 
641  { return 0.5*(max_.Y+min_.Y); }
642 
644  { return 0.5*(max_.Z+min_.Z); }
645 
647  Vec3D getCenter() const
648  { return {getXCenter(), getYCenter(), getZCenter()}; }
649 
653  Vec3D getMin() const
654  { return min_; }
655 
659  Vec3D getMax() const
660  { return max_; }
661 
666  void setXMin(Mdouble newXMin);
667 
672  void setYMin(Mdouble newYMin);
673 
678  void setZMin(Mdouble newZMin);
679 
684  void setXMax(Mdouble newXMax);
685 
690  void setYMax(Mdouble newYMax);
691 
696  void setZMax(Mdouble newZMax);
697 
701  void setMax(const Vec3D& max);
702 
706  void setMax(Mdouble, Mdouble, Mdouble);
707 
711  void setDomain(const Vec3D& min, const Vec3D& max);
712 
716  void setMin(const Vec3D& min);
717 
721  void setMin(Mdouble, Mdouble, Mdouble);
722 
723 
727  void setTimeStep(Mdouble newDt);
728 
732  Mdouble getTimeStep() const;
733 
735  void setNumberOfOMPThreads(int numberOfOMPThreads);
736 
738  int getNumberOfOMPThreads() const;
739 
743  void setXBallsColourMode(int newCMode);
744 
748  int getXBallsColourMode() const;
749 
753  void setXBallsVectorScale(double newVScale);
754 
758  double getXBallsVectorScale() const;
759 
764 
769 
774  void setXBallsScale(Mdouble newScale);
775 
779  double getXBallsScale() const;
780 
784  void setGravity(Vec3D newGravity);
785 
789  Vec3D getGravity() const;
790 
795  void setBackgroundDrag(Mdouble backgroundDrag){backgroundDrag_=backgroundDrag;}
796 
801  const Mdouble getBackgroundDrag() const {return backgroundDrag_;}
802 
806  void setDimension(unsigned int newDim);
807 
811  void setSystemDimensions(unsigned int newDim);
812 
816  unsigned int getSystemDimensions() const;
817 
821  void setParticleDimensions(unsigned int particleDimensions);
822 
826  unsigned int getParticleDimensions() const;
827 
833 
837  void setRestartVersion(std::string newRV);
838 
842  bool getRestarted() const;
843 
847  void setRestarted(bool newRestartedFlag);
848 
852  bool getAppend() const;
853 
857  void setAppend(bool newAppendFlag);
858 
862  Mdouble getElasticEnergy() const;
863 
867  Mdouble getKineticEnergy() const;
868 
872  Mdouble getGravitationalEnergy(Vec3D origin = {0,0,0}) const;
873 
878 
879  Mdouble getTotalEnergy() const;
880 
884  Mdouble getTotalMass() const;
885 
889  Vec3D getCentreOfMass() const;
890 
894  Vec3D getTotalMomentum() const;
895 
899  double getCPUTime() { return clock_.getCPUTime(); }
900 
904  double getWallTime() { return clock_.getWallTime(); }
905 
906 
910  static bool areInContact(const BaseParticle* pI, const BaseParticle* pJ);
911 
913 
916  virtual void hGridInsertParticle(BaseParticle* obj UNUSED);
917 
921  virtual void hGridUpdateParticle(BaseParticle* obj UNUSED);
922 
926  virtual void hGridRemoveParticle(BaseParticle* obj UNUSED);
927 
931  virtual void hGridUpdateMove(BaseParticle*, Mdouble);
932 
936  bool mpiIsInCommunicationZone(BaseParticle* particle);
937 
942 
947 
952 
957  virtual void gatherContactStatistics(unsigned int index1, int index2, Vec3D Contact, Mdouble delta, Mdouble ctheta,
958  Mdouble fdotn, Mdouble fdott, Vec3D P1_P2_normal_, Vec3D P1_P2_tangential);
959 
963  void setNumberOfDomains(std::vector<unsigned> direction);
964 
965  enum class DomainSplit {X, Y, Z, XY, XZ, YZ, XYZ};
966 
972  void splitDomain(DomainSplit domainSplit);
973 
977  std::vector<unsigned> getNumberOfDomains();
978 
983 
984  void removeOldFiles() const;
985 
989  virtual void hGridGetInteractingParticleList(BaseParticle* obj, std::vector<BaseParticle*>& list)
990  {};
991 
992  virtual void computeWallForces(BaseWall* w);
993 
997  virtual bool getHGridUpdateEachTimeStep() const;
998 
1000  void setMeanVelocity(Vec3D V_mean_goal);
1001 
1003  void setMeanVelocityAndKineticEnergy(Vec3D V_mean_goal, Mdouble Ek_goal);
1004 
1006  Mdouble getTotalVolume() const;
1007 
1009  Matrix3D getKineticStress() const;
1010 
1012  Matrix3D getStaticStress() const;
1013 
1015  Matrix3D getTotalStress() const;
1016 
1020  virtual void handleParticleRemoval(unsigned int id);
1021 
1025  virtual void handleParticleAddition(unsigned int id, BaseParticle* p);
1026 
1027  //functions that should only be used in the class definitions
1028 protected:
1029 
1034  virtual void computeAllForces();
1035 
1040  virtual void computeInternalForces(BaseParticle*);
1041 
1047 
1051  virtual void computeExternalForces(BaseParticle*);
1052 
1057 
1062  virtual void actionsOnRestart();
1063 
1068  virtual void actionsBeforeTimeLoop();
1069 
1074  virtual void hGridActionsBeforeTimeLoop();
1075 
1080  virtual void hGridActionsBeforeTimeStep();
1081 
1086  virtual void actionsBeforeTimeStep();
1087 
1096  virtual void computeAdditionalForces() {}
1097 
1102  virtual void actionsAfterSolve();
1103 
1108  virtual void actionsAfterTimeStep();
1109 
1110  void writeVTKFiles() const;
1111 
1116  virtual void outputXBallsData(std::ostream& os) const;
1117 
1122  virtual void outputXBallsDataParticle(unsigned int i, unsigned int format, std::ostream& os) const;
1123 
1127  virtual void writeEneHeader(std::ostream& os) const;
1128 
1132  virtual void writeFstatHeader(std::ostream& os) const;
1133 
1137  virtual void writeEneTimeStep(std::ostream& os) const;
1138 
1139  // Functions for statistics
1143  virtual void initialiseStatistics();
1144 
1148  virtual void outputStatistics();
1149 
1153  void gatherContactStatistics();
1154 
1158  virtual void processStatistics(bool);
1159 
1163  virtual void finishStatistics();
1164 
1171  virtual void integrateBeforeForceComputation();
1172 
1176  virtual void integrateAfterForceComputation();
1177 
1183  virtual void checkInteractionWithBoundaries();
1184 
1188  virtual void hGridActionsBeforeIntegration();
1189 
1193  virtual void hGridActionsAfterIntegration();
1194 
1198  void setFixedParticles(unsigned int n);
1199 
1203  virtual void printTime() const;
1204 
1209  virtual bool continueSolve() const;
1210 
1215  void outputInteractionDetails() const;
1216 
1220  bool isTimeEqualTo(Mdouble time) const;
1221 
1226 
1233 
1240 
1241  void deleteGhostParticles(std::set<BaseParticle*>& particlesToBeDeleted);
1242 
1243  void synchroniseParticle(BaseParticle*, unsigned fromProcessor = 0);
1244 
1249 
1254 
1260  void discontinueSolve() { continueFlag_ = false; }
1261 
1262 private:
1263 
1267  static void signalHandler(int signal);
1268 
1272  void setSoftStop();
1273 
1277  static volatile sig_atomic_t continueFlag_;
1278 
1282  bool disableSoftStop_ = false;
1283 
1284  /*The number of openmp (symmetric multiprocessing threads)*/
1286 
1290  unsigned int systemDimensions_;
1291 
1295  unsigned int particleDimensions_;
1296 
1301 
1307 
1311  std::vector<unsigned> numberOfDomains_;
1312 
1318 
1323 
1327  unsigned int numberOfTimeSteps_;
1328 
1333 
1338 
1345 
1350 
1355  bool append_;
1356 
1363 
1368 
1370 
1372 
1374 
1376 
1378 
1380 
1381  //This is the private data that is only used by the xballs output
1382 
1388 
1393 
1398 
1403 
1408 
1413 
1414  // defines a Macro for creating an instance of class PossibleContactList. See PossibleContactList.h
1415 #ifdef CONTACT_LIST_HGRID
1416  PossibleContactList possibleContactList;
1417 #endif
1418 
1423 
1428 
1429 public:
1434 
1439 
1444 
1449 
1454 
1459 
1464 
1469 
1474 
1475 
1480 
1485 
1490 
1495 
1500 
1505 
1511 
1516 
1518 
1519  void setWritePythonFileForVTKVisualisation(bool forceWritePythonFileForVTKVisualisation);
1521 
1523 
1524 private:
1526 
1530  void initialiseVTK() const;
1531 };
1532 
1533 #endif
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
FileType
With FileType options, one is able to choose if data is to be read/written from/into no or single or ...
Definition: File.h:19
#define MERCURYDPM_DEPRECATED
Definition: GeneralDefine.h:16
#define UNUSED
Definition: GeneralDefine.h:18
bool quick
Definition: LongPeriodicChute.cpp:15
RowVector3d w
Definition: Matrix_resize_int.cpp:3
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseParticle.h:33
Basic class for walls.
Definition: BaseWall.h:28
Container to store pointers to all BaseBoundary objects.
Definition: BoundaryHandler.h:17
Definition: BoundaryVTKWriter.h:12
Container that stores all CG objects.
Definition: CGHandler.h:45
Definition: SpeedTestParticleInteractions.cpp:15
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:56
ParticleVtkWriter * vtkWriter_
Definition: DPMBase.h:1371
int getNumberOfOMPThreads() const
Returns the number of omp threads.
Definition: DPMBase.cc:1277
void discontinueSolve()
This discontinues the solve loop after the current time step is finished.
Definition: DPMBase.h:1260
void setRotation(bool rotation)
Sets whether particle rotation is enabled or disabled.
Definition: DPMBase.h:547
bool getAppend() const
Returns whether the "append" option is on or off.
Definition: DPMBase.cc:1501
virtual void writeEneTimeStep(std::ostream &os) const
Write the global kinetic, potential energy, etc. in the system.
Definition: DPMBase.cc:2092
int getXBallsColourMode() const
Get the xballs colour mode (CMode).
Definition: DPMBase.cc:1301
Mdouble getRotationalEnergy() const
Returns the global rotational energy stored in the system.
Definition: DPMBase.cc:1567
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:603
void setLastSavedTimeStep(unsigned int nextSavedTimeStep)
Sets the next time step for all the files (ene, data, fstat, restart, stat) at which the data is to b...
Definition: DPMBase.cc:510
virtual void computeInternalForce(BaseParticle *, BaseParticle *)
Computes the forces between two particles (internal in the sense that the sum over all these forces i...
Definition: DPMBase.cc:3143
InteractionVTKWriter interactionVTKWriter_
Definition: DPMBase.h:1375
void checkSettings()
Checks if the essentials are set properly to go ahead with solving the problem.
Definition: DPMBase.cc:4065
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax.
Definition: DPMBase.h:610
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:386
Vec3D max_
Definition: DPMBase.h:1317
virtual ~DPMBase()
virtual destructor
Definition: DPMBase.cc:275
virtual void outputStatistics()
Definition: DPMBase.cc:1882
virtual void readOld(std::istream &is)
Reads all data from a restart file, e.g. domain data and particle data; old version.
Definition: DPMBase.cc:4008
MERCURYDPM_DEPRECATED void setWallsWriteVTK(FileType writeWallsVTK)
Sets whether walls are written into a VTK file.
Definition: DPMBase.cc:902
void writeVTKFiles() const
Definition: DPMBase.cc:2151
virtual void initialiseStatistics()
Definition: DPMBase.cc:1874
virtual void computeForcesDueToWalls(BaseParticle *, BaseWall *)
Computes the forces on the particles due to the walls (normals are outward normals)
Definition: DPMBase.cc:3218
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1494
virtual bool readNextArgument(int &i, int argc, char *argv[])
Interprets the i^th command-line argument.
Definition: DPMBase.cc:4595
void synchroniseParticle(BaseParticle *, unsigned fromProcessor=0)
Definition: DPMBase.cc:5189
void initialiseSolve()
Beginning of the solve routine, before time stepping.
Definition: DPMBase.cc:4237
virtual void writeEneHeader(std::ostream &os) const
Writes a header with a certain format for ENE file.
Definition: DPMBase.cc:2003
DomainSplit
Definition: DPMBase.h:965
bool getParticlesWriteVTK() const
Returns whether particles are written in a VTK file.
Definition: DPMBase.cc:976
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1433
virtual void hGridUpdateParticle(BaseParticle *obj UNUSED)
Definition: DPMBase.cc:1693
virtual void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: DPMBase.cc:1987
double getXBallsVectorScale() const
Returns the scale of vectors used in xballs.
Definition: DPMBase.cc:1321
virtual void computeWallForces(BaseWall *w)
Definition: DPMBase.cc:5516
void setMeanVelocity(Vec3D V_mean_goal)
This function will help you set a fixed kinetic energy and mean velocity in your system.
Definition: DPMBase.cc:5394
void removeOldFiles() const
Definition: DPMBase.cc:4492
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1489
Mdouble getTotalEnergy() const
Definition: DPMBase.cc:1580
void setYMin(Mdouble newYMin)
Sets the value of YMin, the lower bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1025
void fillDomainWithParticles(unsigned N=50)
Definition: DPMBase.cc:3024
Matrix3D getKineticStress() const
Calculate the kinetic stress tensor in the system averaged over the whole volume.
Definition: DPMBase.cc:5468
void setOpenMode(std::fstream::openmode openMode)
Sets File::openMode_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:468
Vec3D min_
These vectors are used for the XBalls domain, and occasionally people use it to add walls.
Definition: DPMBase.h:1316
virtual void writeOutputFiles()
Writes simulation data to all the main Mercury files: .data, .ene, .fstat, .xballs and ....
Definition: DPMBase.cc:4115
void setDomain(const Vec3D &min, const Vec3D &max)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1089
void insertGhostParticle(BaseParticle *P)
This function inserts a particle in the mpi communication boundaries.
Definition: DPMBase.cc:1800
virtual void integrateAfterForceComputation()
Update particles' and walls' positions and velocities after force computation.
Definition: DPMBase.cc:3344
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:616
std::vector< unsigned > getNumberOfDomains()
returns the number of domains
Definition: DPMBase.cc:5369
const Mdouble getBackgroundDrag() const
Return the background drag.
Definition: DPMBase.h:801
virtual void computeOneTimeStep()
Performs everything needed for one time step, used in the time-loop of solve().
Definition: DPMBase.cc:4370
void setFixedParticles(unsigned int n)
Sets a number, n, of particles in the particleHandler as "fixed particles".
Definition: DPMBase.cc:1949
Mdouble getTotalVolume() const
Get the total volume of the cuboid system.
Definition: DPMBase.cc:5459
unsigned int getNumberOfTimeSteps() const
Returns the current counter of time-steps, i.e. the number of time-steps that the simulation has unde...
Definition: DPMBase.cc:815
void autoNumber()
The autoNumber() function calls three functions: setRunNumber(), readRunNumberFromFile() and incremen...
Definition: DPMBase.cc:530
bool findNextExistingDataFile(Mdouble tMin, bool verbose=true)
Finds and opens the next data file, if such a file exists.
Definition: DPMBase.cc:2674
virtual void hGridGetInteractingParticleList(BaseParticle *obj, std::vector< BaseParticle * > &list)
Creates a list of neighbour particles obtained from the hgrid.
Definition: DPMBase.h:989
int xBallsColourMode_
XBalls is a package to view the particle data. As an alternative MercuryDPM also supports ParaView....
Definition: DPMBase.h:1387
int getRunNumber() const
This returns the current value of the counter (runNumber_)
Definition: DPMBase.cc:608
static void incrementRunNumberInFile()
Increment the run Number (counter value) stored in the file_counter (COUNTER_DONOTDEL) by 1 and store...
Definition: DPMBase.cc:619
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
void setVTKOutputDirectory(const std::string &dir)
Sets the output directory of the VTK files.
Definition: DPMBase.cc:491
unsigned int getParticleDimensions() const
Returns the particle dimensionality.
Definition: DPMBase.cc:1458
void deleteGhostParticles(std::set< BaseParticle * > &particlesToBeDeleted)
Definition: DPMBase.cc:5165
void setBackgroundDrag(Mdouble backgroundDrag)
Simple access function to turn on a background drag. The force of particleVelocity*drag is applied (n...
Definition: DPMBase.h:795
bool readDataFile(std::string fileName="", unsigned int format=0)
This allows particle data to be reloaded from data files.
Definition: DPMBase.cc:2457
bool getSuperquadricParticlesWriteVTK() const
Definition: DPMBase.cc:984
std::string getRestartVersion() const
This is to take into account for different Mercury versions. Returns the version of the restart file.
Definition: DPMBase.cc:1466
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....
Definition: DPMBase.cc:2379
void setDimension(unsigned int newDim)
Sets both the system dimensions and the particle dimensionality.
Definition: DPMBase.cc:1394
MERCURYDPM_DEPRECATED FileType getWallsWriteVTK() const
Returns whether walls are written in a VTK file.
Definition: DPMBase.cc:964
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1241
unsigned int systemDimensions_
The dimensions of the simulation i.e. 2D or 3D.
Definition: DPMBase.h:1290
std::vector< unsigned > numberOfDomains_
Vector containing the number of domains in x-,y- and z-direction, required for parallel computations.
Definition: DPMBase.h:1311
void removeDuplicatePeriodicParticles()
Removes periodic duplicate Particles.
Definition: DPMBase.cc:5065
PeriodicBoundaryHandler periodicBoundaryHandler
Internal handler that deals with periodic boundaries, especially in a parallel build.
Definition: DPMBase.h:1463
void setNumberOfDomains(std::vector< unsigned > direction)
Sets the number of domains in x-,y- and z-direction. Required for parallel computations.
Definition: DPMBase.cc:5302
ReadOptions
Definition: DPMBase.h:233
bool isTimeEqualTo(Mdouble time) const
Checks whether the input variable "time" is the current time in the simulation.
Definition: DPMBase.cc:5292
WallVTKWriter wallVTKWriter_
Definition: DPMBase.h:1373
void setParticleDimensions(unsigned int particleDimensions)
Sets the particle dimensionality.
Definition: DPMBase.cc:1439
bool getRestarted() const
Returns the flag denoting if the simulation was restarted or not.
Definition: DPMBase.cc:1484
virtual void hGridActionsBeforeIntegration()
This function has to be called before integrateBeforeForceComputation.
Definition: DPMBase.cc:1929
WallDetailsVTKWriter wallDetailsVTKWriter_
Definition: DPMBase.h:1379
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Definition: DPMBase.cc:377
bool readArguments(int argc, char *argv[])
Can interpret main function input arguments that are passed by the driver codes.
Definition: DPMBase.cc:4458
virtual void actionsBeforeTimeStep()
A virtual function which allows to define operations to be executed before the new time step.
Definition: DPMBase.cc:1853
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:799
int numberOfOMPThreads_
Definition: DPMBase.h:1285
virtual void handleParticleAddition(unsigned int id, BaseParticle *p)
Handles the addition of particles to the particleHandler.
Definition: DPMBase.cc:5566
Mdouble getKineticEnergy() const
Returns the global kinetic energy stored in the system.
Definition: DPMBase.cc:1535
virtual void hGridRemoveParticle(BaseParticle *obj UNUSED)
Definition: DPMBase.cc:1700
std::string getXBallsAdditionalArguments() const
Returns the additional arguments for xballs.
Definition: DPMBase.cc:1346
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1484
File interactionFile
File class to handle in- and output into .interactions file. This file hold information about interac...
Definition: DPMBase.h:1510
Mdouble timeMax_
Stores the duration of the simulation.
Definition: DPMBase.h:1337
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Definition: DPMBase.h:1453
virtual bool checkParticleForInteractionLocal(const BaseParticle &P)
Checks if a particle P has any interaction with walls or other particles in the local domain.
Definition: DPMBase.cc:4983
Mdouble getNextTime() const
Returns the current simulation time.
Definition: DPMBase.cc:807
void setYMax(Mdouble newYMax)
Sets the value of YMax, the upper bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1182
int getNToWrite() const
get the number of elements to write to the
Definition: DPMBase.cc:855
virtual void computeInternalForces(BaseParticle *)
Computes the internal forces on particle i (internal in the sense that the sum over all these forces ...
Definition: DPMBase.cc:3564
bool disableSoftStop_
Definition: DPMBase.h:1282
void outputInteractionDetails() const
Displays the interaction details corresponding to the pointer objects in the interaction handler.
Definition: DPMBase.cc:5272
virtual void checkInteractionWithBoundaries()
There are a range of boundaries one could implement depending on ones' problem. This methods checks f...
Definition: DPMBase.cc:3302
Domain * getCurrentDomain()
Function that returns a pointer to the domain corresponding to the processor.
Definition: DPMBase.cc:5378
ParticleVtkWriter * getVtkWriter() const
Definition: DPMBase.cc:5383
Vec3D getMax() const
Returns the maximum coordinates of the problem domain.
Definition: DPMBase.h:659
virtual void hGridActionsBeforeTimeLoop()
A virtual function that allows one to carry out hGrid operations before the start of the time loop.
Definition: DPMBase.cc:1665
void writeEneFile()
Definition: DPMBase.cc:2998
void setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:437
File & getInteractionFile()
Return a reference to the file InteractionsFile.
Definition: DPMBase.cc:323
DPMBase()
Constructor that calls the "void constructor()".
Definition: DPMBase.cc:174
virtual void writeXBallsScript() const
This writes a script which can be used to load the xballs problem to display the data just generated.
void updateGhostGrid(BaseParticle *P)
Checks if the Domain/periodic interaction distance needs to be updated and updates it accordingly.
Definition: DPMBase.cc:1826
virtual void actionsOnRestart()
A virtual function where the users can add extra code which is executed only when the code is restart...
Definition: DPMBase.cc:1672
void setMin(const Vec3D &min)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1109
static bool areInContact(const BaseParticle *pI, const BaseParticle *pJ)
Checks if two particle are in contact or is there any positive overlap.
Definition: DPMBase.cc:1650
void setRestarted(bool newRestartedFlag)
Allows to set the flag stating if the simulation is to be restarted or not.
Definition: DPMBase.cc:1492
Matrix3D getStaticStress() const
Calculate the static stress tensor in the system averaged over the whole volume.
Definition: DPMBase.cc:5490
std::vector< int > get3DParametersFromRunNumber(int size_x, int size_y, int size_z) const
This turns a counter into 3 indices, which is a useful feature for performing a 3D parameter study....
Definition: DPMBase.cc:726
int runNumber_
This stores the run number for saving.
Definition: DPMBase.h:1407
bool restarted_
A bool to check if the simulation was restarted or not, ie. if setupInitialConditionsShould be run an...
Definition: DPMBase.h:1349
virtual void writeFstatHeader(std::ostream &os) const
Writes a header with a certain format for FStat file.
Definition: DPMBase.cc:2031
void setNToWrite(int nToWrite)
set the number of elements to write to the screen
Definition: DPMBase.cc:844
void setZMin(Mdouble newZMin)
Sets the value of ZMin, the lower bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1049
virtual void processStatistics(bool)
Definition: DPMBase.cc:1907
virtual void outputXBallsDataParticle(unsigned int i, unsigned int format, std::ostream &os) const
This function writes out the particle locations into an output stream in a format the XBalls program ...
Mdouble xBallsScale_
sets the xballs argument scale (see XBalls/xballs.txt)
Definition: DPMBase.h:1397
std::vector< int > get1DParametersFromRunNumber(int size_x) const
This turns a counter into 1 index, which is a useful feature for performing 1D parameter study....
Definition: DPMBase.cc:661
bool readNextDataFile(unsigned int format=0)
Reads the next data file with default format=0. However, one can modify the format based on whether t...
Definition: DPMBase.cc:2711
CGHandler cgHandler
Object of the class cgHandler.
Definition: DPMBase.h:1479
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1499
std::vector< int > get2DParametersFromRunNumber(int size_x, int size_y) const
This turns a counter into 2 indices which is a very useful feature for performing a 2D study....
Definition: DPMBase.cc:689
void finaliseSolve()
End of the solve routine, after time stepping.
Definition: DPMBase.cc:4352
BoundaryHandler boundaryHandler
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or fro...
Definition: DPMBase.h:1458
void setSuperquadricParticlesWriteVTK(bool writeSuperquadricParticlesVTK)
Definition: DPMBase.cc:947
void gatherContactStatistics()
Definition: DPMBase.cc:1887
void setSoftStop()
function for setting sigaction constructor.
Definition: DPMBase.cc:5249
void resetFileCounter()
Resets the file counter for each file i.e. for ene, data, fstat, restart, stat)
Definition: DPMBase.cc:449
MERCURYDPM_DEPRECATED void setInteractionsWriteVTK(bool)
Sets whether interactions are written into a VTK file.
Definition: DPMBase.cc:921
Vec3D getMin() const
Returns the minimum coordinates of the problem domain.
Definition: DPMBase.h:653
virtual void computeAllForces()
Computes all the forces acting on the particles using the BaseInteractable::setForce() and BaseIntera...
Definition: DPMBase.cc:3427
virtual bool getHGridUpdateEachTimeStep() const
Definition: DPMBase.cc:1707
MERCURYDPM_DEPRECATED File & getEneFile()
The non const version. Allows to edit the File::eneFile.
Definition: DPMBase.cc:291
virtual Mdouble getInfo(const BaseParticle &P) const
A virtual function that returns some user-specified information about a particle.
Definition: DPMBase.cc:1631
void splitDomain(DomainSplit domainSplit)
Definition: DPMBase.cc:5312
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1338
virtual void writeRestartFile()
Stores all the particle data for current save time step to a "restart" file, which is a file simply i...
Definition: DPMBase.cc:2979
Mdouble backgroundDrag_
This is a global background drag to help retard particles, or to do a simple fluid drag....
Definition: DPMBase.h:1306
Mdouble xBallsVectorScale_
sets the xballs argument vscale (see XBalls/xballs.txt)
Definition: DPMBase.h:1392
virtual void hGridActionsAfterIntegration()
This function has to be called after integrateBeforeForceComputation.
Definition: DPMBase.cc:1936
bool readParAndIniFiles(std::string fileName)
Allows the user to read par.ini files (useful to read files produced by the MDCLR simulation code - e...
Definition: DPMBase.cc:2493
void initialiseVTK() const
Generates the python file for vtk visualisation. Creates vtk output directories if needed.
Definition: DPMBase.cc:2116
std::string name_
the name of the problem, used, e.g., for the output files
Definition: DPMBase.h:1412
Mdouble getTotalMass() const
JMFT: Return the total mass of the system, excluding fixed particles.
Definition: DPMBase.cc:1587
void setXMax(Mdouble newXMax)
Sets the value of XMax, the upper bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1156
void readSpeciesFromDataFile(bool read=true)
Definition: DPMBase.h:331
InteractionHandler interactionHandler
An object of the class InteractionHandler.
Definition: DPMBase.h:1473
static volatile sig_atomic_t continueFlag_
Definition: DPMBase.h:1277
Vec3D getGravity() const
Returns the gravitational acceleration.
Definition: DPMBase.cc:1382
virtual void actionsBeforeTimeLoop()
A virtual function. Allows one to carry out any operations before the start of the time loop.
Definition: DPMBase.cc:1658
Mdouble getGravitationalEnergy(Vec3D origin={0, 0, 0}) const
Returns the global gravitational potential energy stored relative to a user-defined origin in the sys...
Definition: DPMBase.cc:1552
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1443
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1208
std::string restartVersion_
Previous versions of MercuryDPM had a different restart file format, the below member variable allows...
Definition: DPMBase.h:1344
bool writeParticlesVTK_
A flag to turn on/off the vtk writer for particles.
Definition: DPMBase.h:1367
void setParticlesWriteVTK(bool writeParticlesVTK)
Sets whether particles are written in a VTK file.
Definition: DPMBase.cc:933
WallVTKWriter & getWallVTKWriter()
Definition: DPMBase.cc:5594
virtual void handleParticleRemoval(unsigned int id)
Handles the removal of particles from the particleHandler.
Definition: DPMBase.cc:5551
void readNextFStatFile()
Reads the next fstat file.
Definition: DPMBase.cc:2903
bool mpiInsertParticleCheck(BaseParticle *P)
Function that checks if the mpi particle should really be inserted by the current domain.
Definition: DPMBase.cc:1721
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1438
double getWallTime()
Definition: DPMBase.h:904
virtual void computeAdditionalForces()
A virtual function which allows to define operations to be executed prior to the OMP force collect.
Definition: DPMBase.h:1096
void checkAndDuplicatePeriodicParticles()
For simulations using periodic boundaries, checks and adds particles when necessary into the particle...
Definition: DPMBase.cc:5108
virtual void printTime() const
Displays the current simulation time and the maximum simulation duration.
Definition: DPMBase.cc:1959
Vec3D getCenter() const
get center of domain
Definition: DPMBase.h:647
Mdouble getZCenter() const
Definition: DPMBase.h:643
MERCURYDPM_DEPRECATED File & getStatFile()
The non const version. Allows to edit the File::statFile.
Definition: DPMBase.cc:315
Matrix3D getTotalStress() const
Calculate the total stress tensor in the system averaged over the whole volume.
Definition: DPMBase.cc:5510
double getXBallsScale() const
Returns the scale of the view in xballs.
Definition: DPMBase.cc:1363
virtual void integrateBeforeForceComputation()
Update particles' and walls' positions and velocities before force computation.
Definition: DPMBase.cc:3258
void setNumberOfOMPThreads(int numberOfOMPThreads)
Sets the number of omp threads.
Definition: DPMBase.cc:1248
void closeFiles()
Closes all files (ene, data, fstat, restart, stat) that were opened to read or write.
Definition: DPMBase.cc:481
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:622
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
File statFile
An instance of class File to handle in- and output into a .stat file.
Definition: DPMBase.h:1504
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:864
virtual void hGridUpdateMove(BaseParticle *, Mdouble)
Definition: DPMBase.cc:1922
void setSystemDimensions(unsigned int newDim)
Sets the system dimensionality.
Definition: DPMBase.cc:1408
virtual void computeExternalForces(BaseParticle *)
Computes the external forces, such as gravity, acting on particles.
Definition: DPMBase.cc:3198
void performGhostParticleUpdate()
When the Verlet scheme updates the positions and velocities of particles, ghost particles will need a...
Definition: DPMBase.cc:5142
bool rotation_
A flag to turn on/off particle rotation. true will enable particle rotation. false will disable parti...
Definition: DPMBase.h:1362
void writeFStatFile()
Definition: DPMBase.cc:3008
MERCURYDPM_DEPRECATED File & getFStatFile()
The non const version. Allows to edit the File::fStatFile.
Definition: DPMBase.cc:299
void importParticlesAs(ParticleHandler &particleHandler, InteractionHandler &interactionHandler, const ParticleSpecies *species)
Copies particles, interactions assigning species from a local simulation to a global one....
Definition: DPMBase.cc:5033
void setRestartVersion(std::string newRV)
Sets restart_version.
Definition: DPMBase.cc:1475
Mdouble getXCenter() const
Definition: DPMBase.h:637
Vec3D getCentreOfMass() const
JMFT: Return the centre of mass of the system, excluding fixed particles.
Definition: DPMBase.cc:1603
virtual void hGridActionsBeforeTimeStep()
A virtual function that allows one to set or execute hGrid parameters or operations before every simu...
Definition: DPMBase.cc:1679
bool mpiIsInCommunicationZone(BaseParticle *particle)
Checks if the position of the particle is in an mpi communication zone or not.
Definition: DPMBase.cc:1753
void setXBallsScale(Mdouble newScale)
Sets the scale of the view (either normal, zoom in or zoom out) to display in xballs....
Definition: DPMBase.cc:1354
void performGhostVelocityUpdate()
updates the final time-step velocity of the ghost particles
Definition: DPMBase.cc:5207
virtual void decompose()
Sends particles from processorId to the root processor.
Definition: DPMBase.cc:4154
void solve()
The work horse of the code.
Definition: DPMBase.cc:4334
DomainHandler domainHandler
An object of the class DomainHandler which deals with parallel code.
Definition: DPMBase.h:1468
void forceWriteOutputFiles()
Writes output files immediately, even if the current time step was not meant to be written....
Definition: DPMBase.cc:4094
void setRunNumber(int runNumber)
This sets the counter/Run number, overriding the defaults.
Definition: DPMBase.cc:597
virtual void finishStatistics()
Definition: DPMBase.cc:1914
double getCPUTime()
Definition: DPMBase.h:899
bool checkParticleForInteractionLocalPeriodic(const BaseParticle &P)
Definition: DPMBase.cc:4933
ParticleHandler paoloParticleHandler
Fake particleHandler created by Paolo needed temporary by just Paolo.
Definition: DPMBase.h:1448
bool getWritePythonFileForVTKVisualisation() const
Definition: DPMBase.cc:5589
static int readRunNumberFromFile()
Read the run number or the counter from the counter file (COUNTER_DONOTDEL)
Definition: DPMBase.cc:544
void setXMin(Mdouble newXMin)
Sets the value of XMin, the lower bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1001
MERCURYDPM_DEPRECATED File & getRestartFile()
The non const version. Allows to edit the File::restartFile.
Definition: DPMBase.cc:307
bool readSpeciesFromDataFile_
Determines if the last column of the data file is interpreted as the info parameter during restart.
Definition: DPMBase.h:1422
void writeDataFile()
Definition: DPMBase.cc:2989
virtual bool checkParticleForInteraction(const BaseParticle &P)
Checks whether a particle P has any interaction with walls or other particles.
Definition: DPMBase.cc:4884
bool writeSuperquadricParticlesVTK_
Definition: DPMBase.h:1369
std::string xBallsAdditionalArguments_
A string of additional arguments for xballs can be specified (see XBalls/xballs.txt)....
Definition: DPMBase.h:1402
bool append_
A flag to determine if the file has to be appended or not. See DPMBase::Solve() for example.
Definition: DPMBase.h:1355
void writePythonFileForVTKVisualisation() const
writes .py file for ParaView
Definition: DPMBase.cc:2186
void setMax(const Vec3D &max)
Sets the maximum coordinates of the problem domain.
Definition: DPMBase.cc:1073
unsigned int getSystemDimensions() const
Returns the system dimensionality.
Definition: DPMBase.cc:1421
void setTime(Mdouble time)
Sets a new value for the current simulation time.
Definition: DPMBase.cc:827
virtual BaseWall * readUserDefinedWall(const std::string &type) const
Allows you to read in a wall defined in a Driver directory; see USER/Luca/ScrewFiller.
Definition: DPMBase.h:272
Vec3D getTotalMomentum() const
JMFT: Return the total momentum of the system, excluding fixed particles.
Definition: DPMBase.cc:1613
Mdouble getYCenter() const
Definition: DPMBase.h:640
Time clock_
record when the simulation started
Definition: DPMBase.h:1515
void disableSoftStop()
This prevents the initialisation of the soft stop feature.
Definition: DPMBase.h:1253
virtual void hGridInsertParticle(BaseParticle *obj UNUSED)
Definition: DPMBase.cc:1686
Mdouble timeStep_
Stores the simulation time step.
Definition: DPMBase.h:1332
Vec3D gravity_
Gravity vector.
Definition: DPMBase.h:1300
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:879
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1374
Mdouble getElasticEnergy() const
Returns the global elastic energy within the system.
Definition: DPMBase.cc:1521
void constructor()
A function which initialises the member variables to default values, so that the problem can be solve...
Definition: DPMBase.cc:188
void setXBallsVectorScale(double newVScale)
Set the scale of vectors in xballs.
Definition: DPMBase.cc:1311
void setMeanVelocityAndKineticEnergy(Vec3D V_mean_goal, Mdouble Ek_goal)
This function will help you set a fixed kinetic energy and mean velocity in your system.
Definition: DPMBase.cc:5411
virtual void actionsAfterSolve()
A virtual function which allows to define operations to be executed after the solve().
Definition: DPMBase.cc:1860
bool forceWritePythonFileForVTKVisualisation_
Definition: DPMBase.h:1525
unsigned int numberOfTimeSteps_
Stores the number of time steps.
Definition: DPMBase.h:1327
void setXBallsColourMode(int newCMode)
Set the xballs output mode.
Definition: DPMBase.cc:1291
void setAppend(bool newAppendFlag)
Sets whether the "append" option is on or off.
Definition: DPMBase.cc:1513
void setWritePythonFileForVTKVisualisation(bool forceWritePythonFileForVTKVisualisation)
Definition: DPMBase.cc:5584
bool getRotation() const
Indicates whether particle rotation is enabled or disabled.
Definition: DPMBase.h:554
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:634
BoundaryVTKWriter boundaryVTKWriter_
Definition: DPMBase.h:1377
unsigned int particleDimensions_
determines if 2D or 3D particle volume is used for mass calculations
Definition: DPMBase.h:1295
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin.
Definition: DPMBase.h:628
virtual void actionsAfterTimeStep()
A virtual function which allows to define operations to be executed after time step.
Definition: DPMBase.cc:1867
Mdouble time_
Stores the current simulation time.
Definition: DPMBase.h:1322
void setLogarithmicSaveCount(Mdouble logarithmicSaveCountBase)
Sets File::logarithmicSaveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:5536
virtual void read(std::istream &is, ReadOptions opt=ReadOptions::ReadAll)
Reads all data from a restart file, e.g. domain data and particle data.
Definition: DPMBase.cc:3734
MERCURYDPM_DEPRECATED File & getDataFile()
The non const version. Allows one to edit the File::dataFile.
Definition: DPMBase.cc:283
virtual void write(std::ostream &os, bool writeAllParticles=true) const
Definition: DPMBase.cc:3580
bool readRestartFile(ReadOptions opt=ReadOptions::ReadAll)
Reads all the particle data corresponding to a given, existing . restart file (for more details regar...
Definition: DPMBase.cc:3043
int nToWrite_
number of elements to write to a screen
Definition: DPMBase.h:1427
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.
Definition: DPMBase.cc:766
static void signalHandler(int signal)
signal handler function.
Definition: DPMBase.cc:5220
virtual bool continueSolve() const
A virtual function for deciding whether to continue the simulation, based on a user-specified criteri...
Definition: DPMBase.cc:1979
Container to store all Domain.
Definition: DomainHandler.h:26
The simulation can be subdivided into Domain's used in parallel code.
Definition: Domain.h:42
Definition: File.h:59
Container to store Interaction objects.
Definition: InteractionHandler.h:25
Definition: InteractionVTKWriter.h:12
Implementation of a 3D matrix.
Definition: Kernel/Math/Matrix.h:17
Container to store pointers to all particles.
Definition: ParticleHandler.h:28
Definition: ParticleSpecies.h:16
Definition: ParticleVtkWriter.h:12
Container to store pointers to all BasePeriodicBoundary objects.
Definition: PeriodicBoundaryHandler.h:24
Manages the linked list of PossibleContact.
Definition: PossibleContactList.h:23
This is a class that generates random numbers i.e. named the Random Number Generator (RNG).
Definition: RNG.h:32
Container to store all ParticleSpecies.
Definition: SpeciesHandler.h:15
Allows for timing the algorithms; accurate up to 0.01 sec.
Definition: MercuryTime.h:25
Mdouble getWallTime()
Definition: MercuryTime.h:67
Mdouble getCPUTime() const
Definition: MercuryTime.h:59
Definition: Kernel/Math/Vector.h:30
Mdouble & y()
RW reference to Y.
Definition: Kernel/Math/Vector.h:401
Mdouble Y
Definition: Kernel/Math/Vector.h:45
Mdouble Z
Definition: Kernel/Math/Vector.h:45
Mdouble & z()
RW reference to Z.
Definition: Kernel/Math/Vector.h:413
Mdouble X
the vector components
Definition: Kernel/Math/Vector.h:45
Mdouble & x()
RW reference to X.
Definition: Kernel/Math/Vector.h:389
Definition: WallDetailsVTKWriter.h:14
Container to store all BaseWall.
Definition: WallHandler.h:22
Definition: WallVTKWriter.h:12
@ N
Definition: constructor.cpp:22
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
return int(ret)+1
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
int delta
Definition: MultiOpt.py:96
string fileName
Definition: UniformPSDSelfTest.py:10
type
Definition: compute_granudrum_aor.py:141
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
string name
Definition: plotDoE.py:33
std::string format(const std::string &str, const std::vector< std::string > &find, const std::vector< std::string > &replace)
Definition: openglsupport.cpp:217
bool verbose
Definition: statXZ.cpp:7