MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DPMBase.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2020, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #ifndef DPMBase_H
27 #define DPMBase_H
28 
29 //so that the user doesn't have to include string/io manipulations:
30 #include <string>
31 #include <iomanip>
32 // include file for signal handler types
33 #include <csignal>
34 //The vector class contains a 3D vector class.
35 #include "Math/Vector.h"
36 //This class defines the particle handler
37 #include "ParticleHandler.h"
38 //This class defines the base particle (such that not every Driver has to include it)
39 #include "Particles/BaseParticle.h"
41 //This class defines the wall handler
42 #include "WallHandler.h"
43 //This class defines the boundary handler
44 #include "BoundaryHandler.h"
46 #include "DomainHandler.h"
47 //This class defines the interaction handler
48 #include "InteractionHandler.h"
49 //This class defines the Species handler
50 #include "SpeciesHandler.h"
51 //This class defines the cg handler
52 #include "CG/CGHandler.h"
53 //This class defines the possibleContact lists
54 #ifdef CONTACT_LIST_HGRID
55 #include "PossibleContactList.h"
56 #endif
57 //This class defines the random number generator
58 #include "Math/RNG.h"
59 #include "Domain.h"
64 #include "MercuryTime.h"
65 
66 
75 class DPMBase
76 {
81 public:
82 
88  void constructor();
89 
93  DPMBase();
94 
98  DPMBase(const DPMBase& other);
99 
103  virtual ~DPMBase();
104 
109  static void incrementRunNumberInFile();
110 
114  static int readRunNumberFromFile();
115 
120  void autoNumber();
121 
126  std::vector<int> get1DParametersFromRunNumber(int size_x) const;
127 
132  std::vector<int> get2DParametersFromRunNumber(int size_x, int size_y) const;
133 
138  std::vector<int> get3DParametersFromRunNumber(int size_x, int size_y, int size_z) const;
139 
143  int launchNewRun(const char* name, bool quick = false);
144 
145  //setters and getters
146 
150  void setRunNumber(int runNumber);
151 
155  int getRunNumber() const;
156 
160 // void sendParticlesToRoot(unsigned int &numberOfLocalParticles, unsigned int processorId, ParticleHandler &tempParticleHandler) const;
161 
165  virtual void decompose();
166 
171  void solve();
172 
177  virtual void computeOneTimeStep();
178 
183  void checkSettings();
184 
188  void forceWriteOutputFiles();
189 
194  virtual void writeOutputFiles();
195 
199  void solve(int argc, char* argv[]);
200 
211  virtual void setupInitialConditions();
212 
217  virtual void writeXBallsScript() const;
218 
222  virtual Mdouble getInfo(const BaseParticle& P) const;
223 
225 
233  virtual void writeRestartFile();
234 
235  void writeDataFile();
236 
237  void writeEneFile();
238 
239  void writeFStatFile();
240 
241  void fillDomainWithParticles(unsigned N=50);
242 
243  enum class ReadOptions : int {
244  ReadAll,
247  };
248 
255 
260  int readRestartFile(std::string fileName, ReadOptions opt = ReadOptions::ReadAll);
261 
262 // /*!
263 // * \brief Loads all MD data and plots statistics for all time steps in the .data file
264 // */
265 // void statisticsFromRestartData(const char *name);
267 
271  virtual void write(std::ostream& os, bool writeAllParticles = true) const;
272 
277  virtual void read(std::istream& is, ReadOptions opt = ReadOptions::ReadAll);
278 
282  virtual BaseWall* readUserDefinedWall(const std::string& type) const
283  { return nullptr; }
284 
289  virtual void readOld(std::istream& is);
290 
294  bool readDataFile(std::string fileName = "", unsigned int format = 0);
295 
299  bool readParAndIniFiles(std::string fileName);
300 
306  bool readNextDataFile(unsigned int format = 0);
307 
311  void readNextFStatFile();
312 
316  bool findNextExistingDataFile(Mdouble tMin, bool verbose = true);
317 
322  bool readArguments(int argc, char* argv[]);
323 
327  virtual bool readNextArgument(int& i, int argc, char* argv[]);
328 
332  virtual bool checkParticleForInteraction(const BaseParticle& P);
333 
337  virtual bool checkParticleForInteractionLocal(const BaseParticle& P);
338 
340 
342 
348 
349  //getters and setters
350 
357  File& getDataFile();
358 
365  File& getEneFile();
366 
373  File& getFStatFile();
374 
381  File& getRestartFile();
382 
389  File& getStatFile();
390 
395 
402  const File& getDataFile() const;
403 
410  const File& getEneFile() const;
411 
418  const File& getFStatFile() const;
419 
426  const File& getRestartFile() const;
427 
434  const File& getStatFile() const;
435 
439  const File& getInteractionFile() const;
440 
444  const std::string& getName() const;
445 
449  void setName(const std::string& name);
450 
454  void setName(const char* name);
455 
459  void setSaveCount(unsigned int saveCount);
460 
464  void setFileType(FileType fileType);
465 
469  void setOpenMode(std::fstream::openmode openMode);
470 
471 
472  //other member functions
473 
477  void resetFileCounter();
478 
482  void closeFiles();
483 
487  void setLastSavedTimeStep(unsigned int nextSavedTimeStep);
488 
492  Mdouble getTime() const;
493 
497  Mdouble getNextTime() const;
498 
503  unsigned int getNumberOfTimeSteps() const;
504 
508  void setTime(Mdouble time);
509 
513  void setTimeMax(Mdouble newTMax);
514 
518  Mdouble getTimeMax() const;
519 
523  void setLogarithmicSaveCount(Mdouble logarithmicSaveCountBase);
524 
528  void setNToWrite(int nToWrite);
529 
533  int getNToWrite() const;
534 
535 #ifdef CONTACT_LIST_HGRID
536 
539  PossibleContactList& getPossibleContactList();
540 #endif
541 
552  void setRotation(bool rotation)
553  { rotation_ = rotation; }
554 
559  bool getRotation() const
560  { return rotation_; }
561 
565  void setWallsWriteVTK(FileType writeWallsVTK);
566 
570  void setWallsWriteVTK(bool);
571 
575  void setInteractionsWriteVTK(bool);
576 
580  void setParticlesWriteVTK(bool writeParticlesVTK);
581 
582  void setSuperquadricParticlesWriteVTK(bool writeSuperquadricParticlesVTK);
583 
587  FileType getWallsWriteVTK() const;
588 
592  bool getParticlesWriteVTK() const;
593 
595 
600  Mdouble getXMin() const
601  { return min_.x(); }
602 
607  Mdouble getXMax() const
608  { return max_.x(); }
609 
613  Mdouble getYMin() const
614  { return min_.y(); }
615 
619  Mdouble getYMax() const
620  { return max_.y(); }
621 
625  Mdouble getZMin() const
626  { return min_.z(); }
627 
631  Mdouble getZMax() const
632  { return max_.z(); }
633 
634  /*
635  * \brief Returns the minimum coordinates of the problem domain.
636  */
637  Vec3D getMin() const
638  { return min_; }
639 
640  /*
641  * \brief Returns the maximum coordinates of the problem domain.
642  */
643  Vec3D getMax() const
644  { return max_; }
645 
650  void setXMin(Mdouble newXMin);
651 
656  void setYMin(Mdouble newYMin);
657 
662  void setZMin(Mdouble newZMin);
663 
668  void setXMax(Mdouble newXMax);
669 
674  void setYMax(Mdouble newYMax);
675 
680  void setZMax(Mdouble newZMax);
681 
685  void setMax(const Vec3D& max);
686 
690  void setMax(Mdouble, Mdouble, Mdouble);
691 
695  void setDomain(const Vec3D& min, const Vec3D& max);
696 
700  void setMin(const Vec3D& min);
701 
705  void setMin(Mdouble, Mdouble, Mdouble);
706 
707 
711  void setTimeStep(Mdouble newDt);
712 
716  Mdouble getTimeStep() const;
717 
718  /* Sets the number of omp threads */
719  void setNumberOfOMPThreads(int numberOfOMPThreads);
720 
721  /* Returns the number of omp threads */
722  int getNumberOfOMPThreads() const;
723 
727  void setXBallsColourMode(int newCMode);
728 
732  int getXBallsColourMode() const;
733 
737  void setXBallsVectorScale(double newVScale);
738 
742  double getXBallsVectorScale() const;
743 
747  void setXBallsAdditionalArguments(std::string newXBArgs);
748 
752  std::string getXBallsAdditionalArguments() const;
753 
758  void setXBallsScale(Mdouble newScale);
759 
763  double getXBallsScale() const;
764 
768  void setGravity(Vec3D newGravity);
769 
773  Vec3D getGravity() const;
774 
778  void setDimension(unsigned int newDim);
779 
783  void setSystemDimensions(unsigned int newDim);
784 
788  unsigned int getSystemDimensions() const;
789 
793  void setParticleDimensions(unsigned int particleDimensions);
794 
798  unsigned int getParticleDimensions() const;
799 
804  std::string getRestartVersion() const;
805 
809  void setRestartVersion(std::string newRV);
810 
814  bool getRestarted() const;
815 
819  void setRestarted(bool newRestartedFlag);
820 
824  bool getAppend() const;
825 
829  void setAppend(bool newAppendFlag);
830 
834  Mdouble getElasticEnergy() const;
835 
839  Mdouble getKineticEnergy() const;
840 
845 
850 
851  Mdouble getTotalEnergy() const;
852 
856  Mdouble getTotalMass() const;
857 
861  Vec3D getCentreOfMass() const;
862 
866  Vec3D getTotalMomentum() const;
867 
871  double getCPUTime() { return clock_.getCPUTime(); }
872 
876  double getWallTime() { return clock_.getWallTime(); }
877 
878 
882  static bool areInContact(const BaseParticle* pI, const BaseParticle* pJ);
883 
885 
888  virtual void hGridInsertParticle(BaseParticle* obj UNUSED);
889 
893  virtual void hGridUpdateParticle(BaseParticle* obj UNUSED);
894 
898  virtual void hGridRemoveParticle(BaseParticle* obj UNUSED);
899 
903  virtual void hGridUpdateMove(BaseParticle*, Mdouble);
904 
908  bool mpiIsInCommunicationZone(BaseParticle* particle);
909 
914 
919 
923  void updateGhostGrid(BaseParticle* P);
924 
929  virtual void gatherContactStatistics(unsigned int index1, int index2, Vec3D Contact, Mdouble delta, Mdouble ctheta,
930  Mdouble fdotn, Mdouble fdott, Vec3D P1_P2_normal_, Vec3D P1_P2_tangential);
931 
935  void setNumberOfDomains(std::vector<unsigned> direction);
936 
937  enum class DomainSplit {X, Y, Z, XY, XZ, YZ, XYZ};
938 
944  void splitDomain(DomainSplit domainSplit);
945 
949  std::vector<unsigned> getNumberOfDomains();
950 
955 
956  void removeOldFiles() const;
957 
961  virtual void hGridGetInteractingParticleList(BaseParticle* obj, std::vector<BaseParticle*>& list)
962  {};
963 
964  virtual void computeWallForces(BaseWall* w);
965 
969  virtual bool getHGridUpdateEachTimeStep() const;
970 
972  void setMeanVelocity(Vec3D V_mean_goal);
973 
975  void setMeanVelocityAndKineticEnergy(Vec3D V_mean_goal, Mdouble Ek_goal);
976 
978  Mdouble getTotalVolume() const;
979 
981  Matrix3D getKineticStress() const;
982 
984  Matrix3D getStaticStress() const;
985 
987  Matrix3D getTotalStress() const;
988 
992  virtual void handleParticleRemoval(unsigned int id);
993 
997  virtual void handleParticleAddition(unsigned int id, BaseParticle* p);
998 
999  //functions that should only be used in the class definitions
1000 protected:
1001 
1006  virtual void computeAllForces();
1007 
1012  virtual void computeInternalForces(BaseParticle*);
1013 
1019 
1023  virtual void computeExternalForces(BaseParticle*);
1024 
1029 
1034  virtual void actionsOnRestart();
1035 
1040  virtual void actionsBeforeTimeLoop();
1041 
1046  virtual void hGridActionsBeforeTimeLoop();
1047 
1052  virtual void hGridActionsBeforeTimeStep();
1053 
1058  virtual void actionsBeforeTimeStep();
1059 
1068  virtual void computeAdditionalForces() {}
1069 
1074  virtual void actionsAfterSolve();
1075 
1080  virtual void actionsAfterTimeStep();
1081 
1082  void writeVTKFiles() const;
1083 
1088  virtual void outputXBallsData(std::ostream& os) const;
1089 
1094  virtual void outputXBallsDataParticle(unsigned int i, unsigned int format, std::ostream& os) const;
1095 
1099  virtual void writeEneHeader(std::ostream& os) const;
1100 
1104  virtual void writeFstatHeader(std::ostream& os) const;
1105 
1109  virtual void writeEneTimeStep(std::ostream& os) const;
1110 
1111  // Functions for statistics
1115  virtual void initialiseStatistics();
1116 
1120  virtual void outputStatistics();
1121 
1125  void gatherContactStatistics();
1126 
1130  virtual void processStatistics(bool);
1131 
1135  virtual void finishStatistics();
1136 
1143  virtual void integrateBeforeForceComputation();
1144 
1148  virtual void integrateAfterForceComputation();
1149 
1155  virtual void checkInteractionWithBoundaries();
1156 
1160  virtual void hGridActionsBeforeIntegration();
1161 
1165  virtual void hGridActionsAfterIntegration();
1166 
1170  void setFixedParticles(unsigned int n);
1171 
1175  virtual void printTime() const;
1176 
1180  virtual bool continueSolve() const;
1181 
1186  void outputInteractionDetails() const;
1187 
1191  bool isTimeEqualTo(Mdouble time) const;
1192 
1197 
1204 
1211 
1212  void deleteGhostParticles(std::set<BaseParticle*>& particlesToBeDeleted);
1213 
1214  void synchroniseParticle(BaseParticle*, unsigned fromProcessor = 0);
1215 
1220 
1221 
1225  static void signalHandler(int signal);
1226 
1230  void setSoftStop();
1231 
1232 private:
1233 
1237  static volatile sig_atomic_t continueFlag_;
1238 
1239  /*The number of openmp (symmetric multiprocessing threads)*/
1241 
1245  unsigned int systemDimensions_;
1246 
1250  unsigned int particleDimensions_;
1251 
1256 
1260  std::vector<unsigned> numberOfDomains_;
1261 
1267 
1272 
1276  unsigned int numberOfTimeSteps_;
1277 
1282 
1287 
1293  std::string restartVersion_;
1294 
1299 
1304  bool append_;
1305 
1312 
1317 
1322 
1324 
1326 
1328 
1330 
1332 
1333  //This is the private data that is only used by the xballs output
1334 
1340 
1345 
1350 
1355 
1360 
1364  std::string name_;
1365 
1366  // defines a Macro for creating an instance of class PossibleContactList. See PossibleContactList.h
1367 #ifdef CONTACT_LIST_HGRID
1368  PossibleContactList possibleContactList;
1369 #endif
1370 
1375 
1380 
1381 public:
1386 
1391 
1396 
1401 
1406 
1411 
1416 
1421 
1426 
1427 
1432 
1437 
1442 
1447 
1452 
1457 
1463 
1468 
1470 };
1471 
1472 #endif
virtual void computeExternalForces(BaseParticle *)
Computes the external forces, such as gravity, acting on particles.
Definition: DPMBase.cc:3074
Container to store all ParticleSpecies.
Mdouble timeMax_
Stores the duration of the simulation.
Definition: DPMBase.h:1286
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:772
void setTime(Mdouble time)
Sets a new value for the current simulation time.
Definition: DPMBase.cc:833
virtual void handleParticleRemoval(unsigned int id)
Handles the removal of particles from the particleHandler.
Definition: DPMBase.cc:5297
virtual void actionsBeforeTimeLoop()
A virtual function. Allows one to carry out any operations before the start of the time loop...
Definition: DPMBase.cc:1660
Container that stores all CG objects.
Definition: CGHandler.h:64
ParticleHandler paoloParticleHandler
Fake particleHandler created by Paolo needed temporary by just Paolo.
Definition: DPMBase.h:1400
void setXBallsVectorScale(double newVScale)
Set the scale of vectors in xballs.
Definition: DPMBase.cc:1311
virtual void write(std::ostream &os, bool writeAllParticles=true) const
Loads all MD data and plots statistics for all time steps in the .data file.
Definition: DPMBase.cc:3409
FileType getWallsWriteVTK() const
Returns whether walls are written in a VTK file.
Definition: DPMBase.cc:965
virtual void hGridUpdateParticle(BaseParticle *obj UNUSED)
Definition: DPMBase.cc:1695
Container to store pointers to all BaseBoundary objects.
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 setWallsWriteVTK(FileType writeWallsVTK)
Sets whether walls are written into a VTK file.
Definition: DPMBase.cc:908
void solve()
The work horse of the code.
Definition: DPMBase.cc:4002
virtual void hGridInsertParticle(BaseParticle *obj UNUSED)
Definition: DPMBase.cc:1688
The DPMBase header includes quite a few header files, defining all the handlers, which are essential...
Definition: DPMBase.h:75
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:516
Mdouble getRotationalEnergy() const
JMFT Returns the global rotational energy stored in the system.
Definition: DPMBase.cc:1568
Domain * getCurrentDomain()
Function that returns a pointer to the domain corresponding to the processor.
Definition: DPMBase.cc:5124
virtual void integrateAfterForceComputation()
Update particles' and walls' positions and velocities after force computation.
Definition: DPMBase.cc:3219
void checkAndDuplicatePeriodicParticles()
For simulations using periodic boundaries, checks and adds particles when necessary into the particle...
Definition: DPMBase.cc:4864
std::string name_
the name of the problem, used, e.g., for the output files
Definition: DPMBase.h:1364
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:1652
int getXBallsColourMode() const
Get the xballs colour mode (CMode).
Definition: DPMBase.cc:1301
virtual void hGridGetInteractingParticleList(BaseParticle *obj, std::vector< BaseParticle * > &list)
Creates a list of neighbour particles obtained from the hgrid.
Definition: DPMBase.h:961
Matrix3D getStaticStress() const
Calculate the static stress tensor in the system averaged over the whole volume.
Definition: DPMBase.cc:5236
void writeVTKFiles() const
Definition: DPMBase.cc:2119
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:870
void constructor()
A function which initialises the member variables to default values, so that the problem can be solve...
Definition: DPMBase.cc:206
unsigned int getSystemDimensions() const
Returns the system dimensionality.
Definition: DPMBase.cc:1421
bool readArguments(int argc, char *argv[])
Can interpret main function input arguments that are passed by the driver codes.
Definition: DPMBase.cc:4224
bool mpiInsertParticleCheck(BaseParticle *P)
Function that checks if the mpi particle should really be inserted by the current domain...
Definition: DPMBase.cc:1723
File & getInteractionFile()
Return a reference to the file InteractionsFile.
Definition: DPMBase.cc:343
Vec3D max_
Definition: DPMBase.h:1266
double Mdouble
Definition: GeneralDefine.h:34
unsigned int particleDimensions_
determines if 2D or 3D particle volume is used for mass calculations
Definition: DPMBase.h:1250
void splitDomain(DomainSplit domainSplit)
Definition: DPMBase.cc:5058
void setMax(const Vec3D &max)
Sets the maximum coordinates of the problem domain.
Definition: DPMBase.cc:1073
void setYMin(Mdouble newYMin)
Sets the value of YMin, the lower bound of the problem domain in the y-direction. ...
Definition: DPMBase.cc:1025
virtual void processStatistics(bool)
Definition: DPMBase.cc:1909
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax...
Definition: DPMBase.h:631
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin...
Definition: DPMBase.h:600
Vec3D getCentreOfMass() const
JMFT: Return the centre of mass of the system, excluding fixed particles.
Definition: DPMBase.cc:1605
void readNextFStatFile()
Reads the next fstat file.
Definition: DPMBase.cc:2779
bool readSpeciesFromDataFile_
Determines if the last column of the data file is interpreted as the info parameter during restart...
Definition: DPMBase.h:1374
virtual void decompose()
Sends particles from processorId to the root processor.
Definition: DPMBase.cc:3919
unsigned int getParticleDimensions() const
Returns the particle dimensionality.
Definition: DPMBase.cc:1458
Allows for timing the algorithms; accurate up to 0.01 sec.
Definition: MercuryTime.h:43
Vec3D getMin() const
Definition: DPMBase.h:637
void setParticlesWriteVTK(bool writeParticlesVTK)
Sets whether particles are written in a VTK file.
Definition: DPMBase.cc:934
virtual void initialiseStatistics()
Definition: DPMBase.cc:1876
void setLogarithmicSaveCount(Mdouble logarithmicSaveCountBase)
Sets File::logarithmicSaveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:5282
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
WallVTKWriter wallVTKWriter_
Definition: DPMBase.h:1327
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin...
Definition: DPMBase.h:613
void setXBallsColourMode(int newCMode)
Set the xballs output mode.
Definition: DPMBase.cc:1291
File interactionFile
File class to handle in- and output into .interactions file. This file hold information about interac...
Definition: DPMBase.h:1462
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:3773
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Definition: DPMBase.cc:397
InteractionVTKWriter interactionVTKWriter_
Definition: DPMBase.h:1329
int runNumber_
This stores the run number for saving.
Definition: DPMBase.h:1359
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 ...
void setParticleDimensions(unsigned int particleDimensions)
Sets the particle dimensionality.
Definition: DPMBase.cc:1439
virtual ~DPMBase()
virtual destructor
Definition: DPMBase.cc:295
virtual void actionsAfterTimeStep()
A virtual function which allows to define operations to be executed after time step.
Definition: DPMBase.cc:1869
void writePythonFileForVTKVisualisation() const
Definition: DPMBase.cc:2155
virtual void handleParticleAddition(unsigned int id, BaseParticle *p)
Definition: DPMBase.cc:5312
DomainHandler domainHandler
An object of the class DomainHandler which deals with parallel code.
Definition: DPMBase.h:1420
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction. ...
Definition: DPMBase.cc:1208
virtual void computeWallForces(BaseWall *w)
Definition: DPMBase.cc:5262
static void signalHandler(int signal)
signal handler function.
Definition: DPMBase.cc:4976
void setDimension(unsigned int newDim)
Sets both the system dimensions and the particle dimensionality.
Definition: DPMBase.cc:1394
std::vector< unsigned > numberOfDomains_
Vector containing the number of domains in x-,y- and z-direction, required for parallel computations...
Definition: DPMBase.h:1260
MERCURY_DEPRECATED File & getEneFile()
The non const version. Allows to edit the File::eneFile.
Definition: DPMBase.cc:311
void synchroniseParticle(BaseParticle *, unsigned fromProcessor=0)
Definition: DPMBase.cc:4945
void setAppend(bool newAppendFlag)
Sets whether the "append" option is on or off.
Definition: DPMBase.cc:1513
int getNumberOfOMPThreads() const
Definition: DPMBase.cc:1277
virtual void writeOutputFiles()
Writes simulation data to all the main Mercury files: .data, .ene, .fstat, .xballs and ...
Definition: DPMBase.cc:3880
void setSystemDimensions(unsigned int newDim)
Sets the system dimensionality.
Definition: DPMBase.cc:1408
void setSoftStop()
function for setting sigaction constructor.
Definition: DPMBase.cc:5002
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:5157
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1374
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:2268
virtual bool getHGridUpdateEachTimeStep() const
Definition: DPMBase.cc:1709
bool rotation_
A flag to turn on/off particle rotation. true will enable particle rotation. false will disable parti...
Definition: DPMBase.h:1311
Mdouble getWallTime()
Definition: MercuryTime.h:84
Mdouble & z()
RW reference to Z.
Definition: Vector.h:368
bool getParticlesWriteVTK() const
Returns whether particles are written in a VTK file.
Definition: DPMBase.cc:976
#define MERCURY_DEPRECATED
Definition: GeneralDefine.h:37
void updateGhostGrid(BaseParticle *P)
Checks if the Domain/periodic interaction distance needs to be updated and updates it accordingly...
Definition: DPMBase.cc:1828
unsigned int numberOfTimeSteps_
Stores the number of time steps.
Definition: DPMBase.h:1276
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:40
bool restarted_
A bool to check if the simulation was restarted or not, ie. if setupInitialConditionsShould be run an...
Definition: DPMBase.h:1298
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax...
Definition: DPMBase.h:607
Matrix3D getTotalStress() const
Calculate the total stress tensor in the system averaged over the whole volume.
Definition: DPMBase.cc:5256
Container to store pointers to all BasePeriodicBoundary objects.
bool findNextExistingDataFile(Mdouble tMin, bool verbose=true)
Finds and opens the next data file, if such a file exists.
Definition: DPMBase.cc:2563
virtual void writeEneTimeStep(std::ostream &os) const
Write the global kinetic, potential energy, etc. in the system.
Definition: DPMBase.cc:2095
void forceWriteOutputFiles()
Writes output files immediately, even if the current time step was not meant to be written...
Definition: DPMBase.cc:3859
void setYMax(Mdouble newYMax)
Sets the value of YMax, the upper bound of the problem domain in the y-direction. ...
Definition: DPMBase.cc:1182
unsigned int systemDimensions_
The dimensions of the simulation i.e. 2D or 3D.
Definition: DPMBase.h:1245
void writeFStatFile()
Definition: DPMBase.cc:2883
void setDomain(const Vec3D &min, const Vec3D &max)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1089
This is a class that generates random numbers i.e. named the Random Number Generator (RNG)...
Definition: RNG.h:52
Mdouble getElasticEnergy() const
Returns the global elastic energy within the system.
Definition: DPMBase.cc:1521
Matrix3D getKineticStress() const
Calculate the kinetic stress tensor in the system averaged over the whole volume. ...
Definition: DPMBase.cc:5214
Mdouble getGravitationalEnergy() const
Returns the global gravitational potential energy stored in the system.
Definition: DPMBase.cc:1552
static void incrementRunNumberInFile()
Increment the run Number (counter value) stored in the file_counter (COUNTER_DONOTDEL) by 1 and store...
Definition: DPMBase.cc:625
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1436
Mdouble getCPUTime()
Definition: MercuryTime.h:76
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:2382
MERCURY_DEPRECATED File & getDataFile()
The non const version. Allows one to edit the File::dataFile.
Definition: DPMBase.cc:303
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:3530
virtual void hGridActionsBeforeIntegration()
This function has to be called before integrateBeforeForceComputation.
Definition: DPMBase.cc:1931
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:282
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1441
bool getAppend() const
Returns whether the "append" option is on or off.
Definition: DPMBase.cc:1501
virtual bool readNextArgument(int &i, int argc, char *argv[])
Interprets the i^th command-line argument.
Definition: DPMBase.cc:4349
static volatile sig_atomic_t continueFlag_
Stores whether code should be stopped.
Definition: DPMBase.h:1237
virtual bool checkParticleForInteraction(const BaseParticle &P)
Checks whether a particle P has any interaction with walls or other particles.
Definition: DPMBase.cc:4638
void performGhostVelocityUpdate()
updates the final time-step velocity of the ghost particles
Definition: DPMBase.cc:4963
bool getRestarted() const
Returns the flag denoting if the simulation was restarted or not.
Definition: DPMBase.cc:1484
bool writeSuperquadricParticlesVTK_
Definition: DPMBase.h:1323
CGHandler cgHandler
Object of the class cgHandler.
Definition: DPMBase.h:1431
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:821
int xBallsColourMode_
XBalls is a package to view the particle data. As an alternative MercuryDPM also supports ParaView...
Definition: DPMBase.h:1339
BoundaryHandler boundaryHandler
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or fro...
Definition: DPMBase.h:1410
PeriodicBoundaryHandler periodicBoundaryHandler
Internal handler that deals with periodic boundaries, especially in a parallel build.
Definition: DPMBase.h:1415
ParticleVtkWriter * vtkWriter_
Definition: DPMBase.h:1325
BoundaryVTKWriter boundaryVTKWriter_
Definition: DPMBase.h:1331
void fillDomainWithParticles(unsigned N=50)
Inserts particles in the whole domain.
Definition: DPMBase.cc:2899
virtual Mdouble getInfo(const BaseParticle &P) const
A virtual function that returns some user-specified information about a particle. ...
Definition: DPMBase.cc:1633
Mdouble xBallsScale_
sets the xballs argument scale (see XBalls/xballs.txt)
Definition: DPMBase.h:1349
void readSpeciesFromDataFile(bool read=true)
Definition: DPMBase.h:341
void writeEneFile()
Definition: DPMBase.cc:2873
void setXMin(Mdouble newXMin)
Sets the value of XMin, the lower bound of the problem domain in the x-direction. ...
Definition: DPMBase.cc:1001
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created...
Definition: DPMBase.h:1395
Container to store Interaction objects.
int nToWrite_
number of elements to write to a screen
Definition: DPMBase.h:1379
Mdouble getKineticEnergy() const
Returns the global kinetic energy stored in the system.
Definition: DPMBase.cc:1535
Mdouble & x()
RW reference to X.
Definition: Vector.h:344
Mdouble time_
Stores the current simulation time.
Definition: DPMBase.h:1271
void setRestartVersion(std::string newRV)
Sets restart_version.
Definition: DPMBase.cc:1475
void setMin(const Vec3D &min)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1109
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:406
void closeFiles()
Closes all files (ene, data, fstat, restart, stat) that were opened to read or write.
Definition: DPMBase.cc:500
Mdouble getTotalVolume() const
Get the total volume of the cuboid system.
Definition: DPMBase.cc:5205
Vec3D getGravity() const
Returns the gravitational acceleration.
Definition: DPMBase.cc:1382
void setOpenMode(std::fstream::openmode openMode)
Sets File::openMode_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:487
int getNToWrite() const
get the number of elements to write to the
Definition: DPMBase.cc:861
void checkSettings()
Checks if the essentials are set properly to go ahead with solving the problem.
Definition: DPMBase.cc:3830
#define UNUSED
Definition: GeneralDefine.h:39
virtual void hGridActionsBeforeTimeLoop()
A virtual function that allows one to carry out hGrid operations before the start of the time loop...
Definition: DPMBase.cc:1667
double getWallTime()
Definition: DPMBase.h:876
virtual void computeAllForces()
Computes all the forces acting on the particles using the BaseInteractable::setForce() and BaseIntera...
Definition: DPMBase.cc:3302
bool mpiIsInCommunicationZone(BaseParticle *particle)
Checks if the position of the particle is in an mpi communication zone or not.
Definition: DPMBase.cc:1755
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:732
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:2600
void setInteractionsWriteVTK(bool)
Sets whether interactions are written into a VTK file.
Definition: DPMBase.cc:924
Basic class for walls.
Definition: BaseWall.h:47
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 actionsAfterSolve()
A virtual function which allows to define operations to be executed after the solve().
Definition: DPMBase.cc:1862
int numberOfOMPThreads_
Definition: DPMBase.h:1240
virtual void printTime() const
Displays the current simulation time and the maximum simulation duration.
Definition: DPMBase.cc:1961
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1385
InteractionHandler interactionHandler
An object of the class InteractionHandler.
Definition: DPMBase.h:1425
FileType writeWallsVTK_
A flag to turn on/off the vtk writer for walls.
Definition: DPMBase.h:1316
virtual void writeXBallsScript() const
This writes a script which can be used to load the xballs problem to display the data just generated...
void setNumberOfOMPThreads(int numberOfOMPThreads)
Definition: DPMBase.cc:1248
Mdouble & y()
RW reference to Y.
Definition: Vector.h:356
void outputInteractionDetails() const
Displays the interaction details corresponding to the pointer objects in the interaction handler...
Definition: DPMBase.cc:5018
Vec3D getMax() const
Definition: DPMBase.h:643
virtual void computeAdditionalForces()
A virtual function which allows to define operations to be executed prior to the OMP force collect...
Definition: DPMBase.h:1068
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1338
Container to store all BaseParticle.
void setFixedParticles(unsigned int n)
Sets a number, n, of particles in the particleHandler as "fixed particles".
Definition: DPMBase.cc:1951
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax...
Definition: DPMBase.h:619
Mdouble xBallsVectorScale_
sets the xballs argument vscale (see XBalls/xballs.txt)
Definition: DPMBase.h:1344
virtual void actionsBeforeTimeStep()
A virtual function which allows to define operations to be executed before the new time step...
Definition: DPMBase.cc:1855
ParticleVtkWriter * getVtkWriter() const
Definition: DPMBase.cc:5129
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:3019
Mdouble timeStep_
Stores the simulation time step.
Definition: DPMBase.h:1281
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Definition: DPMBase.h:1405
Container to store all BaseWall.
Definition: WallHandler.h:42
RNG random
This is a random generator, often used for setting up the initial conditions etc...
Definition: DPMBase.h:1390
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:3393
The simulation can be subdivided into Domain's used in parallel code.
Definition: Domain.h:63
virtual void hGridRemoveParticle(BaseParticle *obj UNUSED)
Definition: DPMBase.cc:1702
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:5140
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:667
bool writeParticlesVTK_
A flag to turn on/off the vtk writer for particles.
Definition: DPMBase.h:1321
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:420
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:1674
Manages the linked list of PossibleContact.
void writeDataFile()
Definition: DPMBase.cc:2864
virtual void writeEneHeader(std::ostream &os) const
Writes a header with a certain format for ENE file.
Definition: DPMBase.cc:2005
void autoNumber()
The autoNumber() function calls three functions: setRunNumber(), readRunNumberFromFile() and incremen...
Definition: DPMBase.cc:536
Vec3D getTotalMomentum() const
JMFT: Return the total momentum of the system, excluding fixed particles.
Definition: DPMBase.cc:1615
std::vector< unsigned > getNumberOfDomains()
returns the number of domains
Definition: DPMBase.cc:5115
void removeOldFiles() const
Definition: DPMBase.cc:4255
int getRunNumber() const
This returns the current value of the counter (runNumber_)
Definition: DPMBase.cc:614
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin...
Definition: DPMBase.h:625
void setSuperquadricParticlesWriteVTK(bool writeSuperquadricParticlesVTK)
Definition: DPMBase.cc:948
double getCPUTime()
Definition: DPMBase.h:871
void insertGhostParticle(BaseParticle *P)
This function inserts a particle in the mpi communication boundaries.
Definition: DPMBase.cc:1802
void gatherContactStatistics()
Definition: DPMBase.cc:1889
MERCURY_DEPRECATED File & getFStatFile()
The non const version. Allows to edit the File::fStatFile.
Definition: DPMBase.cc:319
virtual void outputStatistics()
Definition: DPMBase.cc:1884
File statFile
An instance of class File to handle in- and output into a .stat file.
Definition: DPMBase.h:1456
Container to store all Domain.
Definition: DomainHandler.h:46
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
void removeDuplicatePeriodicParticles()
Removes periodic duplicate Particles.
Definition: DPMBase.cc:4821
bool checkParticleForInteractionLocalPeriodic(const BaseParticle &P)
Definition: DPMBase.cc:4687
bool getSuperquadricParticlesWriteVTK() const
Definition: DPMBase.cc:984
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1446
virtual void integrateBeforeForceComputation()
Update particles' and walls' positions and velocities before force computation.
Definition: DPMBase.cc:3133
static int readRunNumberFromFile()
Read the run number or the counter from the counter file (COUNTER_DONOTDEL)
Definition: DPMBase.cc:550
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:2854
std::string xBallsAdditionalArguments_
A string of additional arguments for xballs can be specified (see XBalls/xballs.txt). e.g. "-solidf -v0".
Definition: DPMBase.h:1354
void computeForcesDueToWalls(BaseParticle *, BaseWall *)
Computes the forces on the particles due to the walls (normals are outward normals) ...
Definition: DPMBase.cc:3094
double getXBallsVectorScale() const
Returns the scale of vectors used in xballs.
Definition: DPMBase.cc:1321
Mdouble getTotalMass() const
JMFT: Return the total mass of the system, excluding fixed particles.
Definition: DPMBase.cc:1589
virtual bool continueSolve() const
A virtual function for deciding whether to continue the simulation, based on a user-specified criteri...
Definition: DPMBase.cc:1981
void setRotation(bool rotation)
Sets whether particle rotation is enabled or disabled.
Definition: DPMBase.h:552
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1451
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:4787
Mdouble getNextTime() const
Returns the current simulation time.
Definition: DPMBase.cc:813
bool readDataFile(std::string fileName="", unsigned int format=0)
This allows particle data to be reloaded from data files.
Definition: DPMBase.cc:2346
virtual void hGridUpdateMove(BaseParticle *, Mdouble)
Definition: DPMBase.cc:1924
Time clock_
record when the simulation started
Definition: DPMBase.h:1467
std::string restartVersion_
Previous versions of MercuryDPM had a different restart file format, the below member variable allows...
Definition: DPMBase.h:1293
void setNumberOfDomains(std::vector< unsigned > direction)
Sets the number of domains in x-,y- and z-direction. Required for parallel computations.
Definition: DPMBase.cc:5048
DomainSplit
Definition: DPMBase.h:937
void setRestarted(bool newRestartedFlag)
Allows to set the flag stating if the simulation is to be restarted or not.
Definition: DPMBase.cc:1492
void deleteGhostParticles(std::set< BaseParticle * > &particlesToBeDeleted)
Definition: DPMBase.cc:4921
Implementation of a 3D matrix.
Definition: Matrix.h:37
Definition: Vector.h:49
MERCURY_DEPRECATED File & getStatFile()
The non const version. Allows to edit the File::statFile.
Definition: DPMBase.cc:335
std::string getXBallsAdditionalArguments() const
Returns the additional arguments for xballs.
Definition: DPMBase.cc:1346
virtual void hGridActionsAfterIntegration()
This function has to be called after integrateBeforeForceComputation.
Definition: DPMBase.cc:1938
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1241
double getXBallsScale() const
Returns the scale of the view in xballs.
Definition: DPMBase.cc:1363
Definition: File.h:80
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:695
void setNToWrite(int nToWrite)
set the number of elements to write to the screen
Definition: DPMBase.cc:850
virtual void hGridActionsBeforeTimeStep()
A virtual function that allows one to set or execute hGrid parameters or operations before every simu...
Definition: DPMBase.cc:1681
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.
Definition: DPMBase.cc:1354
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:2921
bool getRotation() const
Indicates whether particle rotation is enabled or disabled.
Definition: DPMBase.h:559
virtual void finishStatistics()
Definition: DPMBase.cc:1916
MERCURY_DEPRECATED File & getRestartFile()
The non const version. Allows to edit the File::restartFile.
Definition: DPMBase.cc:327
void setRunNumber(int runNumber)
This sets the counter/Run number, overriding the defaults.
Definition: DPMBase.cc:603
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:805
virtual void checkInteractionWithBoundaries()
There are a range of boundaries one could implement depending on ones' problem. This methods checks f...
Definition: DPMBase.cc:3177
virtual void writeFstatHeader(std::ostream &os) const
Writes a header with a certain format for FStat file.
Definition: DPMBase.cc:2034
Vec3D min_
These vectors are used for the XBalls domain, and occasionally people use it to add walls...
Definition: DPMBase.h:1265
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:885
void resetFileCounter()
Resets the file counter for each file i.e. for ene, data, fstat, restart, stat)
Definition: DPMBase.cc:469
DPMBase()
Constructor that calls the "void constructor()".
Definition: DPMBase.cc:193
virtual void computeOneTimeStep()
Performs everything needed for one time step, used in the time-loop of solve().
Definition: DPMBase.cc:4138
Vec3D gravity_
Gravity vector.
Definition: DPMBase.h:1255
void performGhostParticleUpdate()
When the Verlet scheme updates the positions and velocities of particles, ghost particles will need a...
Definition: DPMBase.cc:4898
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:4737
Mdouble getTotalEnergy() const
Definition: DPMBase.cc:1582
virtual void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: DPMBase.cc:1989
ReadOptions
Definition: DPMBase.h:243
bool append_
A flag to determine if the file has to be appended or not. See DPMBase::Solve() for example...
Definition: DPMBase.h:1304
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
void setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:457
bool isTimeEqualTo(Mdouble time) const
Checks whether the input variable "time" is the current time in the simulation.
Definition: DPMBase.cc:5038