54 #ifdef CONTACT_LIST_HGRID
210 void solve(
int argc,
char* argv[]);
282 virtual void write(std::ostream& os,
bool writeAllParticles =
true)
const;
300 virtual void readOld(std::istream& is);
305 bool readDataFile(std::string fileName =
"",
unsigned int format = 0);
455 const std::string&
getName()
const;
546 #ifdef CONTACT_LIST_HGRID
1409 #ifdef CONTACT_LIST_HGRID
const unsigned n
Definition: CG3DPackingUnitTest.cpp:32
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:41
double Mdouble
Definition: GeneralDefine.h:34
#define MERCURYDPM_DEPRECATED
Definition: GeneralDefine.h:37
#define UNUSED
Definition: GeneralDefine.h:39
bool quick
Definition: LongPeriodicChute.cpp:36
Definition: BaseParticle.h:54
Basic class for walls.
Definition: BaseWall.h:49
Container to store pointers to all BaseBoundary objects.
Definition: BoundaryHandler.h:39
Definition: BoundaryVTKWriter.h:34
Container that stores all CG objects.
Definition: CGHandler.h:65
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:77
ParticleVtkWriter * vtkWriter_
Definition: DPMBase.h:1365
int getNumberOfOMPThreads() const
Definition: DPMBase.cc:1286
void setRotation(bool rotation)
Sets whether particle rotation is enabled or disabled.
Definition: DPMBase.h:563
bool getAppend() const
Returns whether the "append" option is on or off.
Definition: DPMBase.cc:1510
virtual void writeEneTimeStep(std::ostream &os) const
Write the global kinetic, potential energy, etc. in the system.
Definition: DPMBase.cc:2104
int getXBallsColourMode() const
Get the xballs colour mode (CMode).
Definition: DPMBase.cc:1310
Mdouble getRotationalEnergy() const
JMFT Returns the global rotational energy stored in the system.
Definition: DPMBase.cc:1577
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:619
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:519
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:3104
InteractionVTKWriter interactionVTKWriter_
Definition: DPMBase.h:1369
void checkSettings()
Checks if the essentials are set properly to go ahead with solving the problem.
Definition: DPMBase.cc:3999
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax.
Definition: DPMBase.h:626
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
Vec3D max_
Definition: DPMBase.h:1311
virtual ~DPMBase()
virtual destructor
Definition: DPMBase.cc:297
virtual void outputStatistics()
Definition: DPMBase.cc:1893
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:3942
MERCURYDPM_DEPRECATED void setWallsWriteVTK(FileType writeWallsVTK)
Sets whether walls are written into a VTK file.
Definition: DPMBase.cc:911
void writeVTKFiles() const
Definition: DPMBase.cc:2128
virtual void initialiseStatistics()
Definition: DPMBase.cc:1885
virtual void computeForcesDueToWalls(BaseParticle *, BaseWall *)
Computes the forces on the particles due to the walls (normals are outward normals)
Definition: DPMBase.cc:3179
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1488
virtual bool readNextArgument(int &i, int argc, char *argv[])
Interprets the i^th command-line argument.
Definition: DPMBase.cc:4516
void synchroniseParticle(BaseParticle *, unsigned fromProcessor=0)
Definition: DPMBase.cc:5110
void initialiseSolve()
Beginning of the solve routine, before time stepping.
Definition: DPMBase.cc:4171
virtual void writeEneHeader(std::ostream &os) const
Writes a header with a certain format for ENE file.
Definition: DPMBase.cc:2014
DomainSplit
Definition: DPMBase.h:976
bool getParticlesWriteVTK() const
Returns whether particles are written in a VTK file.
Definition: DPMBase.cc:985
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427
virtual void hGridUpdateParticle(BaseParticle *obj UNUSED)
Definition: DPMBase.cc:1704
virtual void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: DPMBase.cc:1998
double getXBallsVectorScale() const
Returns the scale of vectors used in xballs.
Definition: DPMBase.cc:1330
virtual void computeWallForces(BaseWall *w)
Definition: DPMBase.cc:5427
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:5305
void removeOldFiles() const
Definition: DPMBase.cc:4422
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1483
Mdouble getTotalEnergy() const
Definition: DPMBase.cc:1591
void setYMin(Mdouble newYMin)
Sets the value of YMin, the lower bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1034
void fillDomainWithParticles(unsigned N=50)
Definition: DPMBase.cc:2987
Matrix3D getKineticStress() const
Calculate the kinetic stress tensor in the system averaged over the whole volume.
Definition: DPMBase.cc:5379
void setOpenMode(std::fstream::openmode openMode)
Sets File::openMode_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:490
Vec3D min_
These vectors are used for the XBalls domain, and occasionally people use it to add walls.
Definition: DPMBase.h:1310
virtual void writeOutputFiles()
Writes simulation data to all the main Mercury files: .data, .ene, .fstat, .xballs and ....
Definition: DPMBase.cc:4049
void setDomain(const Vec3D &min, const Vec3D &max)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1098
void insertGhostParticle(BaseParticle *P)
This function inserts a particle in the mpi communication boundaries.
Definition: DPMBase.cc:1811
virtual void integrateAfterForceComputation()
Update particles' and walls' positions and velocities after force computation.
Definition: DPMBase.cc:3305
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:632
std::vector< unsigned > getNumberOfDomains()
returns the number of domains
Definition: DPMBase.cc:5280
const Mdouble getBackgroundDrag() const
Return the background drag.
Definition: DPMBase.h:812
virtual void computeOneTimeStep()
Performs everything needed for one time step, used in the time-loop of solve().
Definition: DPMBase.cc:4305
void setFixedParticles(unsigned int n)
Sets a number, n, of particles in the particleHandler as "fixed particles".
Definition: DPMBase.cc:1960
Mdouble getTotalVolume() const
Get the total volume of the cuboid system.
Definition: DPMBase.cc:5370
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:824
void autoNumber()
The autoNumber() function calls three functions: setRunNumber(), readRunNumberFromFile() and incremen...
Definition: DPMBase.cc:539
bool findNextExistingDataFile(Mdouble tMin, bool verbose=true)
Finds and opens the next data file, if such a file exists.
Definition: DPMBase.cc:2654
virtual void hGridGetInteractingParticleList(BaseParticle *obj, std::vector< BaseParticle * > &list)
Creates a list of neighbour particles obtained from the hgrid.
Definition: DPMBase.h:1000
int xBallsColourMode_
XBalls is a package to view the particle data. As an alternative MercuryDPM also supports ParaView....
Definition: DPMBase.h:1381
int getRunNumber() const
This returns the current value of the counter (runNumber_)
Definition: DPMBase.cc:617
static void incrementRunNumberInFile()
Increment the run Number (counter value) stored in the file_counter (COUNTER_DONOTDEL) by 1 and store...
Definition: DPMBase.cc:628
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
unsigned int getParticleDimensions() const
Returns the particle dimensionality.
Definition: DPMBase.cc:1467
void deleteGhostParticles(std::set< BaseParticle * > &particlesToBeDeleted)
Definition: DPMBase.cc:5086
void setBackgroundDrag(Mdouble backgroundDrag)
Simple access function to turn on a background drag. The force of particleVelocity*drag is applied (n...
Definition: DPMBase.h:806
bool readDataFile(std::string fileName="", unsigned int format=0)
This allows particle data to be reloaded from data files.
Definition: DPMBase.cc:2437
bool getSuperquadricParticlesWriteVTK() const
Definition: DPMBase.cc:993
std::string getRestartVersion() const
This is to take into account for different Mercury versions. Returns the version of the restart file.
Definition: DPMBase.cc:1475
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:2359
void setDimension(unsigned int newDim)
Sets both the system dimensions and the particle dimensionality.
Definition: DPMBase.cc:1403
MERCURYDPM_DEPRECATED FileType getWallsWriteVTK() const
Returns whether walls are written in a VTK file.
Definition: DPMBase.cc:973
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1250
unsigned int systemDimensions_
The dimensions of the simulation i.e. 2D or 3D.
Definition: DPMBase.h:1284
std::vector< unsigned > numberOfDomains_
Vector containing the number of domains in x-,y- and z-direction, required for parallel computations.
Definition: DPMBase.h:1305
void removeDuplicatePeriodicParticles()
Removes periodic duplicate Particles.
Definition: DPMBase.cc:4986
PeriodicBoundaryHandler periodicBoundaryHandler
Internal handler that deals with periodic boundaries, especially in a parallel build.
Definition: DPMBase.h:1457
void setNumberOfDomains(std::vector< unsigned > direction)
Sets the number of domains in x-,y- and z-direction. Required for parallel computations.
Definition: DPMBase.cc:5213
ReadOptions
Definition: DPMBase.h:254
@ ReadNoParticlesAndInteractions
bool isTimeEqualTo(Mdouble time) const
Checks whether the input variable "time" is the current time in the simulation.
Definition: DPMBase.cc:5203
WallVTKWriter wallVTKWriter_
Definition: DPMBase.h:1367
void setParticleDimensions(unsigned int particleDimensions)
Sets the particle dimensionality.
Definition: DPMBase.cc:1448
bool getRestarted() const
Returns the flag denoting if the simulation was restarted or not.
Definition: DPMBase.cc:1493
virtual void hGridActionsBeforeIntegration()
This function has to be called before integrateBeforeForceComputation.
Definition: DPMBase.cc:1940
WallDetailsVTKWriter wallDetailsVTKWriter_
Definition: DPMBase.h:1373
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Definition: DPMBase.cc:399
bool readArguments(int argc, char *argv[])
Can interpret main function input arguments that are passed by the driver codes.
Definition: DPMBase.cc:4391
virtual void actionsBeforeTimeStep()
A virtual function which allows to define operations to be executed before the new time step.
Definition: DPMBase.cc:1864
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:808
int numberOfOMPThreads_
Definition: DPMBase.h:1279
virtual void handleParticleAddition(unsigned int id, BaseParticle *p)
Definition: DPMBase.cc:5477
Mdouble getKineticEnergy() const
Returns the global kinetic energy stored in the system.
Definition: DPMBase.cc:1544
virtual void hGridRemoveParticle(BaseParticle *obj UNUSED)
Definition: DPMBase.cc:1711
std::string getXBallsAdditionalArguments() const
Returns the additional arguments for xballs.
Definition: DPMBase.cc:1355
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1478
File interactionFile
File class to handle in- and output into .interactions file. This file hold information about interac...
Definition: DPMBase.h:1504
Mdouble timeMax_
Stores the duration of the simulation.
Definition: DPMBase.h:1331
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Definition: DPMBase.h:1447
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:4904
Mdouble getNextTime() const
Returns the current simulation time.
Definition: DPMBase.cc:816
void setYMax(Mdouble newYMax)
Sets the value of YMax, the upper bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1191
int getNToWrite() const
get the number of elements to write to the
Definition: DPMBase.cc:864
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:3525
void outputInteractionDetails() const
Displays the interaction details corresponding to the pointer objects in the interaction handler.
Definition: DPMBase.cc:5183
virtual void checkInteractionWithBoundaries()
There are a range of boundaries one could implement depending on ones' problem. This methods checks f...
Definition: DPMBase.cc:3263
Domain * getCurrentDomain()
Function that returns a pointer to the domain corresponding to the processor.
Definition: DPMBase.cc:5289
ParticleVtkWriter * getVtkWriter() const
Definition: DPMBase.cc:5294
Vec3D getMax() const
Definition: DPMBase.h:670
virtual void hGridActionsBeforeTimeLoop()
A virtual function that allows one to carry out hGrid operations before the start of the time loop.
Definition: DPMBase.cc:1676
void writeEneFile()
Definition: DPMBase.cc:2961
void setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:459
File & getInteractionFile()
Return a reference to the file InteractionsFile.
Definition: DPMBase.cc:345
DPMBase()
Constructor that calls the "void constructor()".
Definition: DPMBase.cc:194
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:1837
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:1683
void setMin(const Vec3D &min)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1118
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:1661
void setRestarted(bool newRestartedFlag)
Allows to set the flag stating if the simulation is to be restarted or not.
Definition: DPMBase.cc:1501
Matrix3D getStaticStress() const
Calculate the static stress tensor in the system averaged over the whole volume.
Definition: DPMBase.cc:5401
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:735
int runNumber_
This stores the run number for saving.
Definition: DPMBase.h:1401
bool restarted_
A bool to check if the simulation was restarted or not, ie. if setupInitialConditionsShould be run an...
Definition: DPMBase.h:1343
virtual void writeFstatHeader(std::ostream &os) const
Writes a header with a certain format for FStat file.
Definition: DPMBase.cc:2043
void setNToWrite(int nToWrite)
set the number of elements to write to the screen
Definition: DPMBase.cc:853
void setZMin(Mdouble newZMin)
Sets the value of ZMin, the lower bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1058
virtual void processStatistics(bool)
Definition: DPMBase.cc:1918
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:1391
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:670
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:2691
CGHandler cgHandler
Object of the class cgHandler.
Definition: DPMBase.h:1473
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1493
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:698
void finaliseSolve()
End of the solve routine, after time stepping.
Definition: DPMBase.cc:4287
BoundaryHandler boundaryHandler
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or fro...
Definition: DPMBase.h:1452
void setSuperquadricParticlesWriteVTK(bool writeSuperquadricParticlesVTK)
Definition: DPMBase.cc:956
void gatherContactStatistics()
Definition: DPMBase.cc:1898
void setSoftStop()
function for setting sigaction constructor.
Definition: DPMBase.cc:5167
void resetFileCounter()
Resets the file counter for each file i.e. for ene, data, fstat, restart, stat)
Definition: DPMBase.cc:471
MERCURYDPM_DEPRECATED void setInteractionsWriteVTK(bool)
Sets whether interactions are written into a VTK file.
Definition: DPMBase.cc:930
Vec3D getMin() const
Definition: DPMBase.h:664
virtual void computeAllForces()
Computes all the forces acting on the particles using the BaseInteractable::setForce() and BaseIntera...
Definition: DPMBase.cc:3388
virtual bool getHGridUpdateEachTimeStep() const
Definition: DPMBase.cc:1718
MERCURYDPM_DEPRECATED File & getEneFile()
The non const version. Allows to edit the File::eneFile.
Definition: DPMBase.cc:313
virtual Mdouble getInfo(const BaseParticle &P) const
A virtual function that returns some user-specified information about a particle.
Definition: DPMBase.cc:1642
void splitDomain(DomainSplit domainSplit)
Definition: DPMBase.cc:5223
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1347
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:2942
Mdouble backgroundDrag_
This is a global background drag to help retard particles, or to do a simple fluid drag....
Definition: DPMBase.h:1300
Mdouble xBallsVectorScale_
sets the xballs argument vscale (see XBalls/xballs.txt)
Definition: DPMBase.h:1386
virtual void hGridActionsAfterIntegration()
This function has to be called after integrateBeforeForceComputation.
Definition: DPMBase.cc:1947
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:2473
std::string name_
the name of the problem, used, e.g., for the output files
Definition: DPMBase.h:1406
Mdouble getTotalMass() const
JMFT: Return the total mass of the system, excluding fixed particles.
Definition: DPMBase.cc:1598
void setXMax(Mdouble newXMax)
Sets the value of XMax, the upper bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1165
void readSpeciesFromDataFile(bool read=true)
Definition: DPMBase.h:352
InteractionHandler interactionHandler
An object of the class InteractionHandler.
Definition: DPMBase.h:1467
static volatile sig_atomic_t continueFlag_
Definition: DPMBase.h:1276
Vec3D getGravity() const
Returns the gravitational acceleration.
Definition: DPMBase.cc:1391
virtual void actionsBeforeTimeLoop()
A virtual function. Allows one to carry out any operations before the start of the time loop.
Definition: DPMBase.cc:1669
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1437
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1217
std::string restartVersion_
Previous versions of MercuryDPM had a different restart file format, the below member variable allows...
Definition: DPMBase.h:1338
bool writeParticlesVTK_
A flag to turn on/off the vtk writer for particles.
Definition: DPMBase.h:1361
void setParticlesWriteVTK(bool writeParticlesVTK)
Sets whether particles are written in a VTK file.
Definition: DPMBase.cc:942
WallVTKWriter & getWallVTKWriter()
Definition: DPMBase.cc:5505
virtual void handleParticleRemoval(unsigned int id)
Handles the removal of particles from the particleHandler.
Definition: DPMBase.cc:5462
void readNextFStatFile()
Reads the next fstat file.
Definition: DPMBase.cc:2869
bool mpiInsertParticleCheck(BaseParticle *P)
Function that checks if the mpi particle should really be inserted by the current domain.
Definition: DPMBase.cc:1732
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1432
double getWallTime()
Definition: DPMBase.h:915
virtual void computeAdditionalForces()
A virtual function which allows to define operations to be executed prior to the OMP force collect.
Definition: DPMBase.h:1107
void checkAndDuplicatePeriodicParticles()
For simulations using periodic boundaries, checks and adds particles when necessary into the particle...
Definition: DPMBase.cc:5029
virtual void printTime() const
Displays the current simulation time and the maximum simulation duration.
Definition: DPMBase.cc:1970
Mdouble getZCenter() const
Definition: DPMBase.h:659
MERCURYDPM_DEPRECATED File & getStatFile()
The non const version. Allows to edit the File::statFile.
Definition: DPMBase.cc:337
Matrix3D getTotalStress() const
Calculate the total stress tensor in the system averaged over the whole volume.
Definition: DPMBase.cc:5421
double getXBallsScale() const
Returns the scale of the view in xballs.
Definition: DPMBase.cc:1372
virtual void integrateBeforeForceComputation()
Update particles' and walls' positions and velocities before force computation.
Definition: DPMBase.cc:3219
void setNumberOfOMPThreads(int numberOfOMPThreads)
Definition: DPMBase.cc:1257
void closeFiles()
Closes all files (ene, data, fstat, restart, stat) that were opened to read or write.
Definition: DPMBase.cc:503
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:638
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
File statFile
An instance of class File to handle in- and output into a .stat file.
Definition: DPMBase.h:1498
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
virtual void hGridUpdateMove(BaseParticle *, Mdouble)
Definition: DPMBase.cc:1933
void setSystemDimensions(unsigned int newDim)
Sets the system dimensionality.
Definition: DPMBase.cc:1417
virtual void computeExternalForces(BaseParticle *)
Computes the external forces, such as gravity, acting on particles.
Definition: DPMBase.cc:3159
void performGhostParticleUpdate()
When the Verlet scheme updates the positions and velocities of particles, ghost particles will need a...
Definition: DPMBase.cc:5063
bool rotation_
A flag to turn on/off particle rotation. true will enable particle rotation. false will disable parti...
Definition: DPMBase.h:1356
void writeFStatFile()
Definition: DPMBase.cc:2971
MERCURYDPM_DEPRECATED File & getFStatFile()
The non const version. Allows to edit the File::fStatFile.
Definition: DPMBase.cc:321
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:4954
void setRestartVersion(std::string newRV)
Sets restart_version.
Definition: DPMBase.cc:1484
Mdouble getXCenter() const
Definition: DPMBase.h:653
Vec3D getCentreOfMass() const
JMFT: Return the centre of mass of the system, excluding fixed particles.
Definition: DPMBase.cc:1614
virtual void hGridActionsBeforeTimeStep()
A virtual function that allows one to set or execute hGrid parameters or operations before every simu...
Definition: DPMBase.cc:1690
bool mpiIsInCommunicationZone(BaseParticle *particle)
Checks if the position of the particle is in an mpi communication zone or not.
Definition: DPMBase.cc:1764
void setXBallsScale(Mdouble newScale)
Sets the scale of the view (either normal, zoom in or zoom out) to display in xballs....
Definition: DPMBase.cc:1363
void performGhostVelocityUpdate()
updates the final time-step velocity of the ghost particles
Definition: DPMBase.cc:5128
virtual void decompose()
Sends particles from processorId to the root processor.
Definition: DPMBase.cc:4088
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
DomainHandler domainHandler
An object of the class DomainHandler which deals with parallel code.
Definition: DPMBase.h:1462
void forceWriteOutputFiles()
Writes output files immediately, even if the current time step was not meant to be written....
Definition: DPMBase.cc:4028
void setRunNumber(int runNumber)
This sets the counter/Run number, overriding the defaults.
Definition: DPMBase.cc:606
virtual void finishStatistics()
Definition: DPMBase.cc:1925
double getCPUTime()
Definition: DPMBase.h:910
bool checkParticleForInteractionLocalPeriodic(const BaseParticle &P)
Definition: DPMBase.cc:4854
ParticleHandler paoloParticleHandler
Fake particleHandler created by Paolo needed temporary by just Paolo.
Definition: DPMBase.h:1442
bool getWritePythonFileForVTKVisualisation() const
Definition: DPMBase.cc:5500
static int readRunNumberFromFile()
Read the run number or the counter from the counter file (COUNTER_DONOTDEL)
Definition: DPMBase.cc:553
Mdouble getGravitationalEnergy() const
Returns the global gravitational potential energy stored in the system.
Definition: DPMBase.cc:1561
void setXMin(Mdouble newXMin)
Sets the value of XMin, the lower bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1010
MERCURYDPM_DEPRECATED File & getRestartFile()
The non const version. Allows to edit the File::restartFile.
Definition: DPMBase.cc:329
bool readSpeciesFromDataFile_
Determines if the last column of the data file is interpreted as the info parameter during restart.
Definition: DPMBase.h:1416
void writeDataFile()
Definition: DPMBase.cc:2952
virtual bool checkParticleForInteraction(const BaseParticle &P)
Checks whether a particle P has any interaction with walls or other particles.
Definition: DPMBase.cc:4805
bool writeSuperquadricParticlesVTK_
Definition: DPMBase.h:1363
std::string xBallsAdditionalArguments_
A string of additional arguments for xballs can be specified (see XBalls/xballs.txt)....
Definition: DPMBase.h:1396
bool append_
A flag to determine if the file has to be appended or not. See DPMBase::Solve() for example.
Definition: DPMBase.h:1349
void writePythonFileForVTKVisualisation() const
Definition: DPMBase.cc:2171
void setMax(const Vec3D &max)
Sets the maximum coordinates of the problem domain.
Definition: DPMBase.cc:1082
unsigned int getSystemDimensions() const
Returns the system dimensionality.
Definition: DPMBase.cc:1430
void setTime(Mdouble time)
Sets a new value for the current simulation time.
Definition: DPMBase.cc:836
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:293
Vec3D getTotalMomentum() const
JMFT: Return the total momentum of the system, excluding fixed particles.
Definition: DPMBase.cc:1624
Mdouble getYCenter() const
Definition: DPMBase.h:656
Time clock_
record when the simulation started
Definition: DPMBase.h:1509
virtual void hGridInsertParticle(BaseParticle *obj UNUSED)
Definition: DPMBase.cc:1697
Mdouble timeStep_
Stores the simulation time step.
Definition: DPMBase.h:1326
Vec3D gravity_
Gravity vector.
Definition: DPMBase.h:1294
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:888
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1383
Mdouble getElasticEnergy() const
Returns the global elastic energy within the system.
Definition: DPMBase.cc:1530
void constructor()
A function which initialises the member variables to default values, so that the problem can be solve...
Definition: DPMBase.cc:208
void setXBallsVectorScale(double newVScale)
Set the scale of vectors in xballs.
Definition: DPMBase.cc:1320
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:5322
virtual void actionsAfterSolve()
A virtual function which allows to define operations to be executed after the solve().
Definition: DPMBase.cc:1871
bool forceWritePythonFileForVTKVisualisation_
Definition: DPMBase.h:1519
unsigned int numberOfTimeSteps_
Stores the number of time steps.
Definition: DPMBase.h:1321
void setXBallsColourMode(int newCMode)
Set the xballs output mode.
Definition: DPMBase.cc:1300
void setAppend(bool newAppendFlag)
Sets whether the "append" option is on or off.
Definition: DPMBase.cc:1522
void setWritePythonFileForVTKVisualisation(bool forceWritePythonFileForVTKVisualisation)
Definition: DPMBase.cc:5495
bool getRotation() const
Indicates whether particle rotation is enabled or disabled.
Definition: DPMBase.h:570
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:650
BoundaryVTKWriter boundaryVTKWriter_
Definition: DPMBase.h:1371
unsigned int particleDimensions_
determines if 2D or 3D particle volume is used for mass calculations
Definition: DPMBase.h:1289
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin.
Definition: DPMBase.h:644
virtual void actionsAfterTimeStep()
A virtual function which allows to define operations to be executed after time step.
Definition: DPMBase.cc:1878
Mdouble time_
Stores the current simulation time.
Definition: DPMBase.h:1316
void setLogarithmicSaveCount(Mdouble logarithmicSaveCountBase)
Sets File::logarithmicSaveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:5447
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:3679
MERCURYDPM_DEPRECATED File & getDataFile()
The non const version. Allows one to edit the File::dataFile.
Definition: DPMBase.cc:305
virtual void write(std::ostream &os, bool writeAllParticles=true) const
Definition: DPMBase.cc:3541
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:3006
int nToWrite_
number of elements to write to a screen
Definition: DPMBase.h:1421
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:775
static void signalHandler(int signal)
signal handler function.
Definition: DPMBase.cc:5141
virtual bool continueSolve() const
A virtual function for deciding whether to continue the simulation, based on a user-specified criteri...
Definition: DPMBase.cc:1990
Container to store all Domain.
Definition: DomainHandler.h:47
The simulation can be subdivided into Domain's used in parallel code.
Definition: Domain.h:64
Container to store Interaction objects.
Definition: InteractionHandler.h:45
Definition: InteractionVTKWriter.h:34
Implementation of a 3D matrix.
Definition: Matrix.h:38
Container to store all BaseParticle.
Definition: ParticleHandler.h:48
Definition: ParticleSpecies.h:37
Definition: ParticleVtkWriter.h:34
Container to store pointers to all BasePeriodicBoundary objects.
Definition: PeriodicBoundaryHandler.h:46
This is a class that generates random numbers i.e. named the Random Number Generator (RNG).
Definition: RNG.h:53
Container to store all ParticleSpecies.
Definition: SpeciesHandler.h:37
Allows for timing the algorithms; accurate up to 0.01 sec.
Definition: MercuryTime.h:46
Mdouble getWallTime()
Definition: MercuryTime.h:88
Mdouble getCPUTime() const
Definition: MercuryTime.h:80
Mdouble & y()
RW reference to Y.
Definition: Vector.h:372
Mdouble Y
Definition: Vector.h:66
Mdouble Z
Definition: Vector.h:66
Mdouble & z()
RW reference to Z.
Definition: Vector.h:384
Mdouble X
the vector components
Definition: Vector.h:66
Mdouble & x()
RW reference to X.
Definition: Vector.h:360
Definition: WallDetailsVTKWriter.h:35
Container to store all BaseWall.
Definition: WallHandler.h:44
Definition: WallVTKWriter.h:34
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:73
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
std::string name
Definition: MercuryProb.h:48
bool verbose
Definition: statXZ.cpp:28