revision: v0.14
MpiContainer.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 
31 #ifndef MPICONTAINER_H_
32 #define MPICONTAINER_H_
33 
34 #include <cstddef>
35 #include <functional>
36 #include <vector>
37 #include "Math/Vector.h"
38 
39 #ifdef MERCURY_USE_MPI
40 #include <mpi.h>
41 #endif
42 
43 #ifdef MERCURY_FORCE_ASSERTS
44 #define MERCURY_ASSERTS true
45 #else
46 #ifdef MERCURY_NO_ASSERTS
47 #define MERCURY_ASSERTS false
48 #else
49 #ifdef NDEBUG
50 #define MERCURY_ASSERTS false
51 #else
52 #define MERCURY_ASSERTS true
53 #endif
54 #endif
55 #endif
56 
57 class SpeciesHandler;
58 
66 {
67  PARTICLE = 0, POSITION = 1, VELOCITY = 2, FORCE = 3, INTERACTION = 4, SUPERQUADRIC = 5
68 };
69 
77 {
88 };
89 
90 namespace Detail
91 {
92 #ifdef MERCURY_USE_MPI
93 //convert integral data to the corresponding MPI type
94 template<typename T>
95 typename std::enable_if<std::is_integral<T>::value, MPI_Datatype>::type
96 toMPIType(T t)
97 {
98  MPI_Datatype type;
99  MPI_Type_match_size(MPI_TYPECLASS_INTEGER, sizeof(T), &type);
100  return type;
101 }
102 
103 //convert floating point data to the corresponding MPI type
104 template<typename T>
105 typename std::enable_if<std::is_floating_point<T>::value, MPI_Datatype>::type
106 toMPIType(T t)
107 {
108  MPI_Datatype type;
109  MPI_Type_match_size(MPI_TYPECLASS_REAL,sizeof(T),&type);
110  return type;
111 }
112 #endif
113 } /*detail*/
114 
118 void initialiseMPI();
119 
129 class MPIContainer final
130 {
131 public:
135  {
136  static MPIContainer theInstance;
137  return theInstance;
138  }
139 
143  void initialiseMercuryMPITypes(const SpeciesHandler& speciesHandler);
144 
152  void sync()
153  {
154 #ifdef MERCURY_USE_MPI
155  MPI_Waitall(pending_.size(),pending_.data(),MPI_STATUSES_IGNORE);
156  pending_.clear();
157  MPI_Barrier(communicator_);
158 #endif
159  }
160 
169  template<typename T>
170  typename std::enable_if<std::is_scalar<T>::value, void>::type
171  send(T& t, int to, int tag)
172  {
173 #if MERCURY_ASSERTS
174  if (to == processorID_)
175  {
176  logger(FATAL, "[MPI FATAL]: Sending data to self!");
177  }
178 #endif
179 #ifdef MERCURY_USE_MPI
180  MPI_Request request;
181  MPI_Isend(&t, 1, Detail::toMPIType(t), to, tag, communicator_, &request);
182  pending_.push_back(request);
183 
184 #endif
185  }
186 
188  template<typename T>
189  typename std::enable_if<std::is_scalar<T>::value, void>::type
190  send(T* t, int count, int to, int tag)
191  {
192 #if MERCURY_ASSERTS
193  if (to == processorID_)
194  {
195  logger(FATAL, "[MPI FATAL]: Sending data to self!");
196  }
197 
198  if (count == 0)
199  {
200  logger(WARN, "[MPI ERROR]: Sending zero data");
201  }
202 #endif
203 #ifdef MERCURY_USE_MPI
204  MPI_Request request;
205  MPI_Isend(t, count, Detail::toMPIType(*t), to, tag, communicator_, &request);
206  pending_.push_back(request);
207 
208 #endif
209  }
210 
219  template<typename T>
220  typename std::enable_if<std::is_scalar<T>::value, void>::type
221  receive(T& t, int from, int tag)
222  {
223 #if MERCURY_ASSERTS
224  if (from == processorID_)
225  {
226  logger(FATAL, "[MPI FATAL]: Receiving data from self!");
227  }
228 #endif
229 #ifdef MERCURY_USE_MPI
230  MPI_Request request;
231  MPI_Irecv(&t, 1, Detail::toMPIType(t), from, tag, communicator_, &request);
232  pending_.push_back(request);
233 
234 #endif
235  }
236 
238  template<typename T>
239  typename std::enable_if<std::is_scalar<T>::value, void>::type
240  receive(T* t, int count, int from, int tag)
241  {
242 #if MERCURY_ASSERTS
243  if (from == processorID_)
244  {
245  logger(FATAL, "[MPI FATAL]: Receiving data fromself!");
246  }
247 
248  if (count == 0)
249  {
250  logger(WARN, "[MPI ERROR]: Receiving zero data");
251  }
252 #endif
253 #ifdef MERCURY_USE_MPI
254  MPI_Request request;
255  MPI_Irecv(&t, count, Detail::toMPIType(*t), from, tag, communicator_, &request);
256  pending_.push_back(request);
257 
258 #endif
259  }
260 
261 
270  template<typename T>
271  void send(T* t, MercuryMPIType type, int count, int to, int tag)
272  {
273  //std::cout << "[Process: " << processorID_ << "]: QUEUING SEND REQUEST with tag: " << tag << std::endl;
274 #if MERCURY_ASSERTS
275  if (to == processorID_)
276  {
277  logger(FATAL, "[MPI FATAL]: Sending data to self!");
278  }
279 
280  if (count == 0)
281  {
282  logger(WARN, "[MPI ERROR]: Sending zero data");
283  }
284 #endif
285 #ifdef MERCURY_USE_MPI
286  MPI_Request request;
287  MPI_Isend(t, count, dataTypes_[type], to, tag, communicator_, &request);
288  pending_.push_back(request);
289 
290 
291 #endif
292  }
293 
302  template<typename T>
303  void receive(T* t, MercuryMPIType type, int count, int from, int tag)
304  {
305  //std::cout << "[Process: " << processorID_ << "]: QUEUING RECEIVE REQUEST with tag: " << tag << std::endl;
306 #if MERCURY_ASSERTS
307  if (from == processorID_)
308  {
309  logger(FATAL, "[MPI FATAL]: Receiving data to self!");
310  }
311 
312  if (count == 0)
313  {
314  logger(WARN, "[MPI ERROR]: Receiving zero data");
315  }
316 #endif
317 #ifdef MERCURY_USE_MPI
318  MPI_Request request;
319  MPI_Irecv(t, count, dataTypes_[type], from, tag, communicator_, &request);
320  pending_.push_back(request);
321 
322 #endif
323  }
324 
333  template<typename T>
334  typename std::enable_if<std::is_scalar<T>::value, void>::type
335  directSend(T& t, int count, int to, int tag)
336  {
337 #if MERCURY_ASSERTS
338  if (to == processorID_)
339  {
340  logger(FATAL, "[MPI FATAL]: Sending data to self!");
341  }
342 
343  if (count == 0)
344  {
345  logger(WARN, "[MPI ERROR]: Sending zero data");
346  }
347 #endif
348 #ifdef MERCURY_USE_MPI
349  MPI_Ssend(&t, count, Detail::toMPIType(t), to, tag, communicator_);
350 #endif
351  }
352 
353 
354  template<typename T>
355  void directSend(T* t, MercuryMPIType type, int count, int to, int tag)
356  {
357 #if MERCURY_ASSERTS
358  if (to == processorID_)
359  {
360  logger(FATAL, "[MPI FATAL]: Sending data to self!");
361  }
362 
363  if (count == 0)
364  {
365  logger(WARN, "[MPI ERROR]: Sending zero data");
366  }
367 #endif
368 #ifdef MERCURY_USE_MPI
369  MPI_Ssend(t,count,dataTypes_[type], to, tag, communicator_);
370 #endif
371  }
372 
381  template<typename T>
382  typename std::enable_if<std::is_scalar<T>::value, void>::type
383  directReceive(T& t, int count, int from, int tag)
384  {
385 #if MERCURY_ASSERTS
386  if (from == processorID_)
387  {
388  logger(FATAL, "[MPI FATAL]: Receiving data from self!");
389  }
390 
391  if (count == 0)
392  {
393  logger(WARN, "[MPI ERROR]: Receiving zero data");
394  }
395 #endif
396 #ifdef MERCURY_USE_MPI
397  MPI_Recv(&t, count, Detail::toMPIType(t), from, tag,communicator_, MPI_STATUS_IGNORE);
398 #endif
399  }
400 
401  template<typename T>
402  void directReceive(T* t, MercuryMPIType type, int count, int from, int tag)
403  {
404 #if MERCURY_ASSERTS
405  if (from == processorID_)
406  {
407  logger(FATAL, "[MPI FATAL]: Receiving data to self!");
408  }
409 
410  if (count == 0)
411  {
412  logger(WARN, "[MPI ERROR]: Receiving zero data");
413  }
414 #endif
415 #ifdef MERCURY_USE_MPI
416  MPI_Recv(t, count, dataTypes_[type], from, tag, communicator_, MPI_STATUS_IGNORE);
417 #endif
418  }
419 
427  template<typename T>
428  void gather(T& send_t, T* receive_t)
429  {
430 #ifdef MERCURY_USE_MPI
431  MPI_Gather(&send_t, 1, Detail::toMPIType(send_t), receive_t, 1, Detail::toMPIType(send_t), 0, communicator_);
432 #endif
433  }
434 
439  template<typename T>
440  typename std::enable_if<std::is_scalar<T>::value, void>::type
441  broadcast(T& t, int fromProcessor = 0)
442  {
443 #ifdef MERCURY_USE_MPI
444  MPI_Bcast(&t,1,Detail::toMPIType(t),fromProcessor,communicator_);
445 #endif
446  }
447 
452  template<typename T>
453  typename std::enable_if<std::is_scalar<T>::value, void>::type
454  broadcast(T* t, int size, int fromProcessor)
455  {
456 #ifdef MERCURY_USE_MPI
457  MPI_Bcast((void *)t,size,Detail::toMPIType(t[0]),fromProcessor,communicator_);
458 
459 #endif
460  }
461 
466  template<typename T>
467  void broadcast(T* t, MercuryMPIType type, int fromProcessor = 0)
468  {
469 #ifdef MERCURY_USE_MPI
470  MPI_Bcast((void *)t,1,dataTypes_[type],fromProcessor,communicator_);
471 #endif
472  }
473 
484 #ifdef MERCURY_USE_MPI
485  template<typename T>
486  typename std::enable_if<std::is_scalar<T>::value, void>::type
487  reduce(T& t, MPI_Op operation, int id = 0)
488  {
489 
490  if(id == getProcessorID())
491  {
492  MPI_Reduce(MPI_IN_PLACE, &t, 1, Detail::toMPIType(t), operation, id, communicator_);
493  }
494  else
495  {
496  MPI_Reduce(&t, nullptr, 1, Detail::toMPIType(t), operation, id, communicator_);
497  }
498  }
499 #endif
500 
509 #ifdef MERCURY_USE_MPI
510  template<typename T>
511  typename std::enable_if<std::is_scalar<T>::value, void>::type
512  allReduce(T& send_t, T& receive_t, MPI_Op operation)
513  {
514  MPI_Allreduce(&send_t, &receive_t, 1, Detail::toMPIType(send_t), operation,communicator_);
515  }
516 #endif
517 
527 #ifdef MERCURY_USE_MPI
528  template<typename T>
529  typename std::enable_if<std::is_scalar<T>::value, void>::type
530  allGather(T& send_t, int send_count, std::vector<T>& receive_t, int receive_count)
531  {
532  MPI_Allgather(&send_t, send_count, Detail::toMPIType(send_t),
533  receive_t.data(), receive_count, Detail::toMPIType(receive_t[0]),communicator_);
534  }
535 #endif
536 
540  std::size_t getProcessorID();
541 
545  std::size_t getNumberOfProcessors() const;
546 
550 #ifdef MERCURY_USE_MPI
551  MPI_Comm& getComm();
552 #endif
553 
563  template<typename T>
565  {
566 #ifdef MERCURY_USE_MPI
567  MPI_Datatype MPIType;
568  MPI_Type_contiguous(sizeof(T), MPI_BYTE, &MPIType);
569  MPI_Type_commit(&MPIType);
570  dataTypes_.push_back(MPIType);
571 #endif
572  }
573 
574 
579  {
580 #ifdef MERCURY_USE_MPI
581  for(MPI_Datatype type : dataTypes_)
582  {
583  MPI_Type_free(&type);
584  }
585 #endif
586  }
587 
591  MPIContainer(const MPIContainer& orig) = delete;
592 
593 private:
594 
598  MPIContainer();
599 
603  //std::size_t processorID_;
605 
610 
611 #ifdef MERCURY_USE_MPI
612 
615  std::vector<MPI_Request> pending_;
616 
620  MPI_Comm communicator_;
624  std::vector<MPI_Datatype> dataTypes_;
625 
626 #endif
627 
628 };
629 
630 
631 #endif /* MPICONTAINER_H_ */
DPMBase::setMax
void setMax(const Vec3D &max)
Sets the maximum coordinates of the problem domain.
Definition: DPMBase.cc:1073
MovingWallTangential::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:145
LinearViscoelasticSlidingFrictionSpecies.h
MovingWallTangentialReference
In the reference case the particle just moves two times as fast.
Definition: MovingWallUnitTest.cpp:159
DrumRot::particleWallFriction
double particleWallFriction
Definition: MonodispersedDrum.cpp:303
MovingWalls::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallsUnitTest.cpp:44
DrumRot::sizeRatio
double sizeRatio
Definition: MonodispersedDrum.cpp:298
main
int main(int argc, char *argv[])
Definition: MonodispersedDrum.cpp:326
AxisymmetricIntersectionOfWalls
Use AxisymmetricIntersectionOfWalls to Screw Screw::read Screw::read Screw::read define axisymmetric ...
Definition: AxisymmetricIntersectionOfWalls.h:126
BaseInteractable::getAngularVelocity
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
Definition: BaseInteractable.cc:341
DrumRot::setRollingFriction
void setRollingFriction(double drum, double f1)
Definition: MonodispersedDrum.cpp:270
MPIContainer::send
void send(T *t, MercuryMPIType type, int count, int to, int tag)
asynchronously send a list of MercuryMPITypes objects to some other processor.
Definition: MpiContainer.h:271
DPMBase::setName
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:420
DrumRot::setTorsionFriction
void setTorsionFriction(double drum, double f1)
Definition: MonodispersedDrum.cpp:276
MovingIntersectionOfWallsUnitTest_MovingReferenceFrame::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingIntersectionOfWallsUnitTest.cpp:113
File::setFileType
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:215
MovingIntersectionOfWallsUnitTest_Basic::MovingIntersectionOfWallsUnitTest_Basic
MovingIntersectionOfWallsUnitTest_Basic()
Definition: MovingIntersectionOfWallsUnitTest.cpp:43
LinearViscoelasticFrictionSpecies
Species< LinearViscoelasticNormalSpecies, FrictionSpecies > LinearViscoelasticFrictionSpecies
Definition: LinearViscoelasticFrictionSpecies.h:34
DPMBase::setTimeStep
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
DPMBase::setMin
void setMin(const Vec3D &min)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1109
SmoothChute::numberOfParticlesToBeInserted
unsigned int numberOfParticlesToBeInserted
Definition: MonodisperseSmoothInclinedChute.cpp:123
MovingWall::wall
InfiniteWall * wall
Definition: MovingWallUnitTest.cpp:79
DPMBase::getTimeStep
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1241
LinearViscoelasticSlidingFrictionSpecies
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies > LinearViscoelasticSlidingFrictionSpecies
Definition: LinearViscoelasticSlidingFrictionSpecies.h:34
PARTICLE_DATA
@ PARTICLE_DATA
Definition: MpiContainer.h:79
Vector.h
SmoothChute::insertTimeInterval
double insertTimeInterval
Definition: MonodisperseSmoothInclinedChute.cpp:122
constants::pi
const Mdouble pi
Definition: ExtendedMath.h:45
PeriodicBoundary.h
MPIContainer::directReceive
std::enable_if< std::is_scalar< T >::value, void >::type directReceive(T &t, int count, int from, int tag)
synchronously receive a list of scalars from another processor. if the send command has not been issu...
Definition: MpiContainer.h:383
BaseParticle::accelerate
void accelerate(const Vec3D &vel)
Increases the particle's velocity_ by the given vector.
Definition: BaseParticle.cc:622
main
int main()
Definition: MovingWallsUnitTest.cpp:119
MPIContainer::send
std::enable_if< std::is_scalar< T >::value, void >::type send(T *t, int count, int to, int tag)
Definition: MpiContainer.h:190
Chute::setChuteAngleAndMagnitudeOfGravity
void setChuteAngleAndMagnitudeOfGravity(Mdouble chuteAngle, Mdouble gravity)
Sets gravity vector according to chute angle (in degrees)
Definition: Chute.cc:716
DPMBase::setParticlesWriteVTK
void setParticlesWriteVTK(bool writeParticlesVTK)
Sets whether particles are written in a VTK file.
Definition: DPMBase.cc:934
SpeciesHandler::clear
void clear() override
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0.
Definition: SpeciesHandler.h:54
MPIContainer::broadcast
void broadcast(T *t, MercuryMPIType type, int fromProcessor=0)
Broadcasts an MercuryMPIType to all other processors.
Definition: MpiContainer.h:467
initialiseMPI
void initialiseMPI()
Inialises the MPI library.
Definition: MpiContainer.cc:137
DPMBase::setParticleDimensions
void setParticleDimensions(unsigned int particleDimensions)
Sets the particle dimensionality.
Definition: DPMBase.cc:1439
MovingIntersectionOfWallsUnitTest_MovingReferenceFrame::velocity
Vec3D velocity
Definition: MovingIntersectionOfWallsUnitTest.cpp:123
BaseInteractable::setTorque
void setTorque(const Vec3D &torque)
Sets the torque on this BaseInteractable.
Definition: BaseInteractable.h:161
IntersectionOfWalls
A IntersectionOfWalls is convex polygon defined as an intersection of InfiniteWall's.
Definition: IntersectionOfWalls.h:59
DrumRot::setFrictionCoeff
void setFrictionCoeff(double pwf, double ppf)
Definition: MonodispersedDrum.cpp:251
MovingIntersectionOfWallsUnitTest_Basic::species
LinearViscoelasticSpecies * species
Definition: MovingIntersectionOfWallsUnitTest.cpp:106
MovingIntersectionOfWallsUnitTest_Basic::p2f
BaseParticle * p2f
Definition: MovingIntersectionOfWallsUnitTest.cpp:98
MPIContainer::createMercuryMPIType
void createMercuryMPIType(T t, MercuryMPIType type)
Get the communicator used for MPI commands.
Definition: MpiContainer.h:564
DPMBase::getXMax
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax.
Definition: DPMBase.h:607
BaseInteractable::setPosition
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:239
logger
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
MPIContainer::broadcast
std::enable_if< std::is_scalar< T >::value, void >::type broadcast(T *t, int size, int fromProcessor)
Broadcasts a scalar from the root to all other processors.
Definition: MpiContainer.h:454
MovingWallPrescribedPositionPrescribedVelocity::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:129
IntersectionOfWalls::addObject
void addObject(Vec3D normal, Vec3D point)
Adds a wall to the set of infinite walls, given a normal vector pointing into the wall (i....
Definition: IntersectionOfWalls.cc:137
MovingWallPrescribedPosition::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:105
DrumRot::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MonodispersedDrum.cpp:41
InfiniteWall::setNormal
void setNormal(Vec3D normal)
Changes the normal of the InfiniteWall.
Definition: InfiniteWall.cc:127
DPMBase::random
RNG random
This is a random generator, often used for setting up the initial conditions etc.....
Definition: DPMBase.h:1390
DrumRot::CORDrum
double CORDrum
Definition: MonodispersedDrum.cpp:296
ParticleHandler::getNumberOfObjects
unsigned int getNumberOfObjects() const override
Returns the number of objects in the container. In parallel code this practice is forbidden to avoid ...
Definition: ParticleHandler.cc:1315
Vec3D::X
Mdouble X
the vector components
Definition: Vector.h:65
DrumRot::particleParticleFriction
double particleParticleFriction
Definition: MonodispersedDrum.cpp:303
IntersectionOfWalls::setSpecies
void setSpecies(const ParticleSpecies *species)
sets species of subwalls as well
Definition: IntersectionOfWalls.cc:72
DrumRot::drumRadius
double drumRadius
Definition: MonodispersedDrum.cpp:308
MovingWall::species
LinearViscoelasticSlidingFrictionSpecies * species
Definition: MovingWallUnitTest.cpp:78
DrumRot::setFractionalPolydispersity
void setFractionalPolydispersity(double fpd)
Definition: MonodispersedDrum.cpp:241
DrumRot::massS1
double massS1
Definition: MonodispersedDrum.cpp:294
SpeciesHandler.h
MercuryBase::checkParticleForInteraction
bool checkParticleForInteraction(const BaseParticle &P) final
Checks if given BaseParticle has an interaction with a BaseWall or other BaseParticle.
Definition: MercuryBase.cc:594
DPMBase::setYMax
void setYMax(Mdouble newYMax)
Sets the value of YMax, the upper bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1182
DrumRot::rollingFriction1
double rollingFriction1
Definition: MonodispersedDrum.cpp:316
initialiseMPI
void initialiseMPI()
Inialises the MPI library.
Definition: MpiContainer.cc:137
MovingIntersectionOfWallsUnitTest_Basic
Definition: MovingIntersectionOfWallsUnitTest.cpp:40
MPIContainer::processorID_
int processorID_
The ID of the processor this class is running on.
Definition: MpiContainer.h:604
SpeciesHandler::getMixedObject
std::enable_if<!std::is_pointer< typename U::MixedSpeciesType >::value, typename U::MixedSpeciesType * >::type getMixedObject(const U *S, const U *T)
Definition: SpeciesHandler.h:74
MPIContainer::receive
std::enable_if< std::is_scalar< T >::value, void >::type receive(T &t, int from, int tag)
asynchronously receive a scalar from some other processor.
Definition: MpiContainer.h:221
Mercury3D
This adds on the hierarchical grid code for 3D problems.
Definition: Mercury3D.h:37
DrumRot::radiusS1
double radiusS1
Definition: MonodispersedDrum.cpp:292
LinearViscoelasticFrictionReversibleAdhesiveSpecies.h
MovingIntersectionOfWallsUnitTest_Basic::p3e
BaseParticle * p3e
Definition: MovingIntersectionOfWallsUnitTest.cpp:102
BaseInteractable::getOrientation
const Quaternion & getOrientation() const
Returns the orientation of this BaseInteractable.
Definition: BaseInteractable.h:230
R
@ R
Definition: StatisticsVector.h:42
DPMBase::restartFile
File restartFile
An instance of class File to handle in- and output into a .restart file.
Definition: DPMBase.h:1451
PERIODIC_COMPLEXITY
@ PERIODIC_COMPLEXITY
Definition: MpiContainer.h:85
PARTICLE
@ PARTICLE
Definition: MpiContainer.h:67
MPIContainer::getProcessorID
std::size_t getProcessorID()
Reduces a scalar on all processors to one scalar on a target processor.
Definition: MpiContainer.cc:113
MovingWallTangentialPrescribedPosition
Definition: MovingWallUnitTest.cpp:178
INFO
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
DPMBase::setWallsWriteVTK
void setWallsWriteVTK(FileType writeWallsVTK)
Sets whether walls are written into a VTK file.
Definition: DPMBase.cc:908
MpiContainer.h
INTERACTION_COUNT
@ INTERACTION_COUNT
Definition: MpiContainer.h:83
DrumRot::numS1ToBeInserted
int numS1ToBeInserted
Definition: MonodispersedDrum.cpp:306
DrumRot::revolutionsPerSecond
double revolutionsPerSecond
Definition: MonodispersedDrum.cpp:309
main
int main(int argc, char *argv[])
Definition: MonodisperseSmoothInclinedChute.cpp:126
BaseInteraction::createMPIType
virtual void createMPIType()
Definition: BaseInteraction.cc:851
SmoothChute::insertTime
double insertTime
the amount of time that new particles should be inserted.
Definition: MonodisperseSmoothInclinedChute.cpp:121
BaseInteractable::setPrescribedVelocity
void setPrescribedVelocity(const std::function< Vec3D(double)> &prescribedVelocity)
Allows the velocity of an infinite mass interactable to be prescribed.
Definition: BaseInteractable.cc:444
BaseInteractable::getVelocity
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Definition: BaseInteractable.cc:329
BaseParticle::setRadius
virtual void setRadius(Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species)
Definition: BaseParticle.cc:542
DrumRot::setRevolutionSpeed
void setRevolutionSpeed(double rpm)
Definition: MonodispersedDrum.cpp:236
Vec3D
Definition: Vector.h:50
MPIContainer::MPIContainer
MPIContainer()
Constructor.
Definition: MpiContainer.cc:43
helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep
unsigned int getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(unsigned int numberOfSaves, Mdouble timeMax, Mdouble timeStep)
Returns the correct saveCount if the total number of saves, the final time and the time step is known...
Definition: Helpers.cc:374
DPMBase::solve
void solve()
The work horse of the code.
Definition: DPMBase.cc:4003
DPMBase::fStatFile
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1441
Interaction.h
MovingWallPrescribedPosition
Definition: MovingWallUnitTest.cpp:104
BaseInteraction
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:60
DPMBase::getYMin
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:613
MPIParticleForce
Data class to send a particle force over MPI.
Definition: MpiDataClass.h:114
DPMBase::setZMax
void setZMax(Mdouble newZMax)
Sets the value of ZMax, the upper bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1208
Chute.h
BaseSpecies
BaseSpecies is the class from which all other species are derived.
Definition: BaseSpecies.h:50
MPIContainer::directSend
std::enable_if< std::is_scalar< T >::value, void >::type directSend(T &t, int count, int to, int tag)
synchronously send a list of scalars to another processor. the data should be received directly or th...
Definition: MpiContainer.h:335
MovingIntersectionOfWallsUnitTest_Basic::p1e
BaseParticle * p1e
Definition: MovingIntersectionOfWallsUnitTest.cpp:100
BaseInteractable::setForce
void setForce(const Vec3D &force)
Sets the force on this BaseInteractable.
Definition: BaseInteractable.h:149
main
int main(int argc UNUSED, char *argv[] UNUSED)
Definition: MonodisperseSmoothInclinedChutePatternInflow.cpp:132
DrumRot::rollingFrictionDrum
double rollingFrictionDrum
Definition: MonodispersedDrum.cpp:315
BaseParticle::getRadius
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:348
DrumRot::rhoS1
double rhoS1
Definition: MonodispersedDrum.cpp:293
DrumRot::slidingFrictionDrum
double slidingFrictionDrum
Definition: MonodispersedDrum.cpp:312
DrumRot::checkTime
double checkTime
Definition: MonodispersedDrum.cpp:322
VELOCITY_DATA
@ VELOCITY_DATA
Definition: MpiContainer.h:82
MovingWallTangentialPrescribedVelocity::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:190
MovingWallReference
In the reference case the particle just moves two times as fast.
Definition: MovingWallUnitTest.cpp:85
BaseInteractable::setVelocity
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:350
DrumRot::setSlidingFriction
void setSlidingFriction(double drum, double f1)
Definition: MonodispersedDrum.cpp:264
compareParticles
void compareParticles(BaseParticle *Ptest, BaseParticle *Pref, double absError, Vec3D positionDifference, Vec3D velocityDifference, Quaternion orientationDifference, Vec3D AngularVelocityDifference)
Definition: MovingWallUnitTest.cpp:216
MPIContainer::directReceive
void directReceive(T *t, MercuryMPIType type, int count, int from, int tag)
Definition: MpiContainer.h:402
SpeciesHandler
Container to store all ParticleSpecies.
Definition: SpeciesHandler.h:37
BaseInteractable::setOrientationViaNormal
void setOrientationViaNormal(Vec3D normal)
Sets the orientation of this BaseInteractable by defining the vector that results from the rotation o...
Definition: BaseInteractable.cc:199
MPIContainer::directSend
void directSend(T *t, MercuryMPIType type, int count, int to, int tag)
Definition: MpiContainer.h:355
BaseInteractable::setAngularVelocity
void setAngularVelocity(const Vec3D &angularVelocity)
set the angular velocity of the BaseInteractble.
Definition: BaseInteractable.cc:360
SmoothChute::actionsBeforeTimeStep
void actionsBeforeTimeStep() override
A virtual function which allows to define operations to be executed before the new time step.
Definition: MonodisperseSmoothInclinedChute.cpp:40
DrumRot::step
int step
Definition: MonodispersedDrum.cpp:321
VERBOSE
LL< Log::VERBOSE > VERBOSE
Verbose information.
Definition: Logger.cc:57
ERROR
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
DrumRot::densityRatio
double densityRatio
Definition: MonodispersedDrum.cpp:299
MovingWallTangentialReference::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:160
MPIContainer::gather
void gather(T &send_t, T *receive_t)
Gathers a scaler from all processors to a vector of scalars on the root.
Definition: MpiContainer.h:428
DPMBase::getKineticEnergy
Mdouble getKineticEnergy() const
Returns the global kinetic energy stored in the system.
Definition: DPMBase.cc:1535
DrumRot::actionsBeforeTimeStep
void actionsBeforeTimeStep() override
A virtual function which allows to define operations to be executed before the new time step.
Definition: MonodispersedDrum.cpp:173
mathsFunc::sin
Mdouble sin(Mdouble x)
Definition: ExtendedMath.cc:44
Logger.h
BaseParticle::setSpecies
void setSpecies(const ParticleSpecies *species)
Definition: BaseParticle.cc:804
LinearViscoelasticSpecies
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
Definition: LinearViscoelasticSpecies.h:33
MovingWallTangentialPrescribedPosition::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:179
MPIContainer::deleteMercuryMPITypes
void deleteMercuryMPITypes()
Deletes the MercuryMPITypes.
Definition: MpiContainer.h:578
LinearViscoelasticSpecies.h
MPIContainer::numberOfProcessors_
int numberOfProcessors_
The total number of processors in the communicator.
Definition: MpiContainer.h:609
DPMBase::getTime
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:805
DrumRot::CORS1
double CORS1
Definition: MonodispersedDrum.cpp:296
PARTICLE_COUNT
@ PARTICLE_COUNT
Definition: MpiContainer.h:78
Species
Contains material and contact force properties.
Definition: Species.h:35
MovingWall
Definition: MovingWallUnitTest.cpp:40
DPMBase::setTime
void setTime(Mdouble time)
Sets a new value for the current simulation time.
Definition: DPMBase.cc:833
VELOCITY
@ VELOCITY
Definition: MpiContainer.h:67
DPMBase::setXMax
void setXMax(Mdouble newXMax)
Sets the value of XMax, the upper bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1156
MovingWallPrescribedPositionPrescribedVelocity
Definition: MovingWallUnitTest.cpp:128
BaseSpecies::getEmptyInteraction
virtual BaseInteraction * getEmptyInteraction() const =0
WARN
LL< Log::WARN > WARN
Warning log level.
Definition: Logger.cc:54
InfiniteWall.h
MercuryBase::hGridRebuild
void hGridRebuild()
This sets up the parameters required for the contact model.
Definition: MercuryBase.cc:204
DPMBase::speciesHandler
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1385
MovingIntersectionOfWallsUnitTest_Basic::p2e
BaseParticle * p2e
Definition: MovingIntersectionOfWallsUnitTest.cpp:101
DrumRot::actionsOnRestart
void actionsOnRestart() override
A virtual function where the users can add extra code which is executed only when the code is restart...
Definition: MonodispersedDrum.cpp:214
MovingWallReference::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:86
INTERACTION_DATA
@ INTERACTION_DATA
Definition: MpiContainer.h:84
MPIContainer::getNumberOfProcessors
std::size_t getNumberOfProcessors() const
Get the total number of processors participating in this simulation.
Definition: MpiContainer.cc:104
MovingWallSimpleIntegration::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:96
DPMBase.h
BaseInteraction.h
MovingWallTangentialPrescribedPositionPrescribedVelocity
Definition: MovingWallUnitTest.cpp:202
MovingWallTangentialSimpleIntegration
Definition: MovingWallUnitTest.cpp:169
POSITION
@ POSITION
Definition: MpiContainer.h:67
INTERACTION
@ INTERACTION
Definition: MpiContainer.h:67
SphericalParticle
A spherical particle is the most simple particle used in MercuryDPM.
Definition: SphericalParticle.h:37
DPMBase::wallHandler
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Definition: DPMBase.h:1405
MPIContainer::initialiseMercuryMPITypes
void initialiseMercuryMPITypes(const SpeciesHandler &speciesHandler)
Creates the MPI types required for communication of Mercury data through the MPI interface.
Definition: MpiContainer.cc:74
MovingIntersectionOfWallsUnitTest_MovingReferenceFrame
Definition: MovingIntersectionOfWallsUnitTest.cpp:111
MPIContainer::sync
void sync()
Process all pending asynchronous communication requests before continuing.
Definition: MpiContainer.h:152
MovingWallTangentialPrescribedPositionPrescribedVelocity::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:203
MPIContainer
This class contains all information and functions required for communication between processors.
Definition: MpiContainer.h:130
MovingWalls
Definition: MovingWallsUnitTest.cpp:35
DrumRot::volumeFraction
double volumeFraction
Definition: MonodispersedDrum.cpp:301
DPMBase::setTimeMax
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:870
Vec3D::Y
Mdouble Y
Definition: Vector.h:65
DrumRot::torsionFrictionDrum
double torsionFrictionDrum
Definition: MonodispersedDrum.cpp:318
DPMBase::setGravity
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1374
MPIParticle
Data class to send a particle over MPI.
Definition: MpiDataClass.h:81
InfiniteWall
A infinite wall fills the half-space {point: (position_-point)*normal_<=0}.
Definition: InfiniteWall.h:48
main
int main(int argc UNUSED, char *argv[] UNUSED)
Definition: MovingWallUnitTest.cpp:236
FATAL
LL< Log::FATAL > FATAL
Definition of the different loglevels by its wrapper class LL. These are used as tags in template met...
Definition: Logger.cc:52
PARTICLE_INDEX
@ PARTICLE_INDEX
Definition: MpiContainer.h:86
DPMBase::getName
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Definition: DPMBase.cc:397
DrumRot::torsionFriction1
double torsionFriction1
Definition: MonodispersedDrum.cpp:319
MovingIntersectionOfWallsUnitTest_Basic::triangle
IntersectionOfWalls * triangle
Definition: MovingIntersectionOfWallsUnitTest.cpp:103
MovingIntersectionOfWallsUnitTest_Basic::p3f
BaseParticle * p3f
Definition: MovingIntersectionOfWallsUnitTest.cpp:99
MPIContainer::send
std::enable_if< std::is_scalar< T >::value, void >::type send(T &t, int to, int tag)
Asynchronously send a scalar to some other processor.
Definition: MpiContainer.h:171
constants::i
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
BaseWall::setSpecies
void setSpecies(const ParticleSpecies *species)
Defines the species of the current wall.
Definition: BaseWall.cc:171
DPMBase::getZMin
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin.
Definition: DPMBase.h:625
Quaternion
This class contains the 4 components of a quaternion and the standard operators and functions needed ...
Definition: Quaternion.h:63
DPMBase::setYMin
void setYMin(Mdouble newYMin)
Sets the value of YMin, the lower bound of the problem domain in the y-direction.
Definition: DPMBase.cc:1025
BaseInteractable::setPrescribedPosition
void setPrescribedPosition(const std::function< Vec3D(double)> &prescribedPosition)
Allows the position of an infinite mass interactable to be prescribed.
Definition: BaseInteractable.cc:413
compareParticles
void compareParticles(BaseParticle *Ptest, BaseParticle *Pref, double absError, Vec3D positionDifference, Vec3D velocityDifference, Quaternion orientationDifference, Vec3D AngularVelocityDifference)
Definition: MovingIntersectionOfWallsUnitTest.cpp:125
DrumRot::slidingFriction1
double slidingFriction1
Definition: MonodispersedDrum.cpp:313
BaseHandler::getLastObject
T * getLastObject()
Gets a pointer to the last Object in this BaseHandler.
Definition: BaseHandler.h:634
SUPERQUADRIC
@ SUPERQUADRIC
Definition: MpiContainer.h:67
MovingWall::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:54
BaseHandler::getObject
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
MovingIntersectionOfWallsUnitTest_Basic::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingIntersectionOfWallsUnitTest.cpp:49
DPMBase::eneFile
File eneFile
An instance of class File to handle in- and output into a .ene file.
Definition: DPMBase.h:1446
MovingWallPrescribedVelocity
Definition: MovingWallUnitTest.cpp:115
MPIContainer::receive
void receive(T *t, MercuryMPIType type, int count, int from, int tag)
asynchronously receive a list of MercuryMPIType objects from some other processor.
Definition: MpiContainer.h:303
MovingWallSimpleIntegration
Definition: MovingWallUnitTest.cpp:95
BaseParticle
Definition: BaseParticle.h:54
GeneralDefine.h
UNUSED
#define UNUSED
Definition: GeneralDefine.h:39
BaseHandler::copyAndAddObject
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:379
MovingWall::particle
SphericalParticle * particle
Definition: MovingWallUnitTest.cpp:80
DrumRot::numS1
int numS1
Definition: MonodispersedDrum.cpp:305
SmoothChute
Definition: MonodisperseSmoothInclinedChute.cpp:37
MovingIntersectionOfWallsUnitTest_Basic::p1f
BaseParticle * p1f
Definition: MovingIntersectionOfWallsUnitTest.cpp:97
DrumRot::setCOR
void setCOR(double drumCOR, double COR1)
Definition: MonodispersedDrum.cpp:257
AxisymmetricIntersectionOfWalls.h
MpiDataClass.h
RNG::getRandomNumber
Mdouble getRandomNumber()
This is a random generating routine can be used for initial positions.
Definition: RNG.cc:142
DPMBase::setXBallsAdditionalArguments
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1338
SphericalParticle.h
SUPERQUADRIC_DATA
@ SUPERQUADRIC_DATA
Definition: MpiContainer.h:87
MPIParticleVelocity
Data class to send a particle velocity over MPI.
Definition: MpiDataClass.h:103
PERIODIC_POSITION_DATA
@ PERIODIC_POSITION_DATA
Definition: MpiContainer.h:81
DPMBase::getYMax
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:619
BaseHandler::clear
virtual void clear()
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0.
Definition: BaseHandler.h:528
DPMBase::getZMax
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:631
Detail
Definition: MpiContainer.h:91
DPMBase::setXMin
void setXMin(Mdouble newXMin)
Sets the value of XMin, the lower bound of the problem domain in the x-direction.
Definition: DPMBase.cc:1001
MovingWallTangential
Definition: MovingWallUnitTest.cpp:143
MPIContainer::broadcast
std::enable_if< std::is_scalar< T >::value, void >::type broadcast(T &t, int fromProcessor=0)
Broadcasts a scalar from the root to all other processors.
Definition: MpiContainer.h:441
MPIParticlePosition
Data class to send a particle position over MPI.
Definition: MpiDataClass.h:90
PROCESSOR_ID
#define PROCESSOR_ID
Definition: GeneralDefine.h:63
DPMBase::particleHandler
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1395
MercuryMPIType
MercuryMPIType
An enum that indicates what type of data is being send over MPI.
Definition: MpiContainer.h:66
Vec3D::Z
Mdouble Z
Definition: Vector.h:65
DrumRot::fractionalPolydispersity
double fractionalPolydispersity
Definition: MonodispersedDrum.cpp:310
MovingWall::MovingWall
MovingWall()
Definition: MovingWallUnitTest.cpp:43
DPMBase::setSaveCount
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:406
Chute::cleanChute
void cleanChute()
Deletes all outflow particles once every 100 time steps.
Definition: Chute.cc:464
MercuryMPITag
MercuryMPITag
An enum that facilitates the creation of unique communication tags in the parallel code.
Definition: MpiContainer.h:77
DrumRot::setDrumFillFraction
void setDrumFillFraction(double dff)
Definition: MonodispersedDrum.cpp:246
MovingWallPrescribedVelocity::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:116
DrumRot::drumFillFraction
double drumFillFraction
Definition: MonodispersedDrum.cpp:300
FORCE
@ FORCE
Definition: MpiContainer.h:67
MovingWallTangentialSimpleIntegration::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MovingWallUnitTest.cpp:170
SmoothChute::setupInitialConditions
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: MonodisperseSmoothInclinedChute.cpp:75
IntersectionOfWalls.h
InfiniteWall::set
void set(Vec3D normal, Vec3D point)
Defines a standard wall, given an outward normal vector s.t. normal*x=normal*point for all x of the w...
Definition: InfiniteWall.cc:118
DrumRot
Definition: MonodispersedDrum.cpp:38
LinearViscoelasticFrictionSpecies.h
Chute
Creates chutes with different bottoms. Inherits from Mercury3D (-> MercuryBase -> DPMBase).
Definition: Chute.h:65
Mercury3D.h
DPMBase::dataFile
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1436
MPIContainer::receive
std::enable_if< std::is_scalar< T >::value, void >::type receive(T *t, int count, int from, int tag)
Definition: MpiContainer.h:240
DrumRot::getDrumRadius
double getDrumRadius()
Definition: MonodispersedDrum.cpp:282
mathsFunc::isEqual
bool isEqual(Mdouble v1, Mdouble v2, Mdouble absError)
Compares the difference of two Mdouble with an absolute error, useful in UnitTests.
Definition: ExtendedMath.cc:251
BaseParticle.h
main
int main(int argc UNUSED, char *argv[] UNUSED)
Definition: MovingIntersectionOfWallsUnitTest.cpp:144
units::name
std::string name
Definition: MercuryProb.h:48
DrumRot::setDrumRadius
void setDrumRadius(double radius)
Definition: MonodispersedDrum.cpp:231
DPMBase::setZMin
void setZMin(Mdouble newZMin)
Sets the value of ZMin, the lower bound of the problem domain in the z-direction.
Definition: DPMBase.cc:1049
POSITION_DATA
@ POSITION_DATA
Definition: MpiContainer.h:80
DPMBase::getXMin
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:600
MovingWalls::MovingWalls
MovingWalls(std::string name)
Definition: MovingWallsUnitTest.cpp:37
IntersectionOfWalls::createOpenPrism
void createOpenPrism(std::vector< Vec3D > points, Vec3D prismAxis)
Creates an open prism which is a polygon between the points, except the first and last point,...
Definition: IntersectionOfWalls.cc:466
InteractionHandler::setWriteVTK
void setWriteVTK(FileType f)
Definition: InteractionHandler.cc:553
MPIContainer::MPIContainer
MPIContainer(const MPIContainer &orig)=delete
Copy constructor is disabled, to enforce a singleton pattern.
mathsFunc::cos
Mdouble cos(Mdouble x)
Definition: ExtendedMath.cc:64
DPMBase::interactionHandler
InteractionHandler interactionHandler
An object of the class InteractionHandler.
Definition: DPMBase.h:1425
BaseInteractable::getPosition
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:218
DPMBase::getTimeMax
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:885
MovingWallTangentialPrescribedVelocity
Definition: MovingWallUnitTest.cpp:189
BaseSpecies::deleteEmptyInteraction
virtual void deleteEmptyInteraction(BaseInteraction *interaction) const =0
DPMBase
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:76
DrumRot::tc
double tc
Definition: MonodispersedDrum.cpp:296
MPIContainer::Instance
static MPIContainer & Instance()
fetch the instance to be used for communication
Definition: MpiContainer.h:134
DPMBase::readArguments
bool readArguments(int argc, char *argv[])
Can interpret main function input arguments that are passed by the driver codes.
Definition: DPMBase.cc:4225
DPMBase::setSystemDimensions
void setSystemDimensions(unsigned int newDim)
Sets the system dimensionality.
Definition: DPMBase.cc:1408