33 #ifdef CONTACT_LIST_HGRID
189 void solve(
int argc,
char* argv[]);
261 virtual void write(std::ostream& os,
bool writeAllParticles =
true)
const;
279 virtual void readOld(std::istream& is);
530 #ifdef CONTACT_LIST_HGRID
1415 #ifdef CONTACT_LIST_HGRID
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
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
@ ReadNoParticlesAndInteractions
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
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
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
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
int delta
Definition: MultiOpt.py:96
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