![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Implements some key functions and classes regularly used in the code when running with MPI. More...
Data Structures | |
| struct | MpiStatus |
| Struct that stores MPI-related information. More... | |
Functions | |
| void | initMpi (int argc=0, char *argv[]=nullptr) |
| Initializes MPI and also creates MpiStatus struct. | |
| void | finalizeMpi () |
| Call MPI_Finalize if this process initialized MPI. | |
| void | initMpiStatus () |
| Initializes MpiStatus struct. | |
| bool | isMpiEnabled () |
| Function to check if MPI is enabled. | |
| int | mpiSize () |
| Get size (number) of processors. | |
| int | mpiRank () |
| get rank (id) of this processor | |
| MPI_Comm | mpiComm () |
| Get MPI comm. | |
| const MpiStatus * | getMpiStatus () |
| Returns pointer to MpiStatus struct. | |
| void | initNThreads (unsigned int nThreads=std::thread::hardware_concurrency()) |
| Initializes MpiStatus struct. | |
| unsigned int | getNThreads () |
| Get number of threads to be used by taskflow. | |
Implements some key functions and classes regularly used in the code when running with MPI.
| void util::parallel::finalizeMpi | ( | ) |
Call MPI_Finalize if this process initialized MPI.
Definition at line 33 of file parallelUtil.cpp.
Referenced by main().
| const util::parallel::MpiStatus * util::parallel::getMpiStatus | ( | ) |
Returns pointer to MpiStatus struct.
Definition at line 112 of file parallelUtil.cpp.
References initMpi().
Referenced by main().
| unsigned int util::parallel::getNThreads | ( | ) |
Get number of threads to be used by taskflow.
Definition at line 127 of file parallelUtil.cpp.
Referenced by contact::AnalyticalPlaneWallContact::apply(), loading::applyIC(), PeriDEMModel::computeExternalForces(), PeriDEMModel::computeForces(), contact::Contact::computeForces(), pd::computeForces(), material::computeHydrostaticStrain(), material::computeStateMx(), material::computeStateThetax(), mesh::Mesh::computeVol(), geometry::Fracture::Fracture(), mesh::getCurrentQuadPoints(), mesh::getStrainStress(), main(), anonymous_namespace{testNSearchLib.cpp}::neighSearchBrute(), anonymous_namespace{testNSearchLib.cpp}::neighSearchBruteExcludeInclude(), anonymous_namespace{testNSearchLib.cpp}::neighSearchTree(), anonymous_namespace{testNSearchLib.cpp}::neighSearchTreeClosestPointSizet(), anonymous_namespace{testNSearchLib.cpp}::neighSearchTreeSizet(), anonymous_namespace{testNSearchLib.cpp}::neighSearchTreeSizetExcludeInclude(), test::testTaskflow(), material::updateBondFractureData(), time_int::updateCentralDifference(), contact::Contact::updateNeighborlist(), nsearch::updatePeridynamicNeighborlist(), time_int::updateVerletHalfKickAndDrift(), and time_int::updateVerletSecondKick().
| void util::parallel::initMpi | ( | int | argc = 0, |
| char * | argv[] = nullptr |
||
| ) |
Initializes MPI and also creates MpiStatus struct.
| argc | Command line argument number |
| argv | Command line argument values |
Definition at line 25 of file parallelUtil.cpp.
References initMpiStatus(), and anonymous_namespace{parallelUtil.cpp}::mpiInitialized.
Referenced by getMpiStatus(), isMpiEnabled(), main(), mpiComm(), mpiRank(), and mpiSize().
| void util::parallel::initMpiStatus | ( | ) |
Initializes MpiStatus struct.
Definition at line 66 of file parallelUtil.cpp.
Referenced by initMpi().
| void util::parallel::initNThreads | ( | unsigned int | nThreads = std::thread::hardware_concurrency() | ) |
Initializes MpiStatus struct.
| nThreads | Number of threads to be used by Taskflow in asynchronous parallelism |
Definition at line 120 of file parallelUtil.cpp.
Referenced by main().
| bool util::parallel::isMpiEnabled | ( | ) |
Function to check if MPI is enabled.
Definition at line 73 of file parallelUtil.cpp.
References util::parallel::MpiStatus::d_mpiEnabled, and initMpi().
Referenced by particle::assignMpiOwners(), contact::Contact::computeForces(), particle::exchangeGhostKinematics(), particle::isLocallyOwned(), main(), pd::setupDofPartition(), and contact::Contact::updateNeighborlist().
| MPI_Comm util::parallel::mpiComm | ( | ) |
Get MPI comm.
Definition at line 104 of file parallelUtil.cpp.
References util::parallel::MpiStatus::d_comm, and initMpi().
Referenced by anonymous_namespace{main.cpp}::ContactWitness::assertOk(), anonymous_namespace{pdMpi.cpp}::buildGhostPlan(), anonymous_namespace{main.cpp}::ContactWitness::checkStop(), MpiMetricTsProbe::checkStop(), postprocess::Postprocess::compressive(), anonymous_namespace{main.cpp}::dumpFinalNodal(), MpiMetricTsProbe::dumpNodalUV(), anonymous_namespace{particleMpi.cpp}::exchangeCachedKinematics(), anonymous_namespace{pdMpi.cpp}::exchangeDoubles(), particle::exchangeGhostKinematics(), pd::exchangeGhostTheta(), anonymous_namespace{pdMpi.cpp}::exchangePoints(), main(), anonymous_namespace{particleMpi.cpp}::rebuildGhostPlan(), anonymous_namespace{main.cpp}::GrainContactProbe::sampleMetric(), pd::setupDofPartition(), anonymous_namespace{pdMpi.cpp}::syncAllOwnedPoints(), and rw::writeOutput().
| int util::parallel::mpiRank | ( | ) |
get rank (id) of this processor
Definition at line 96 of file parallelUtil.cpp.
References util::parallel::MpiStatus::d_mpiRank, and initMpi().
Referenced by rw::writer::VtkParticleWriter::appendMeshParallelPiece(), contact::Damping::apply(), anonymous_namespace{main.cpp}::ContactWitness::assertOk(), particle::assignMpiOwners(), anonymous_namespace{pdMpi.cpp}::buildGhostPlan(), MpiMetricTsProbe::checkStop(), postprocess::Postprocess::compressive(), PeriDEMModel::computeExternalForces(), anonymous_namespace{main.cpp}::dumpFinalNodal(), MpiMetricTsProbe::dumpNodalUV(), pd::exchangeGhostTheta(), PeriDEMModel::init(), particle::isLocallyOwned(), util::io::Logger::log(), main(), MpiMetricTsProbe::MpiMetricTsProbe(), anonymous_namespace{main.cpp}::GrainContactProbe::ownsNode(), anonymous_namespace{main.cpp}::ownsNode(), MpiMetricTsProbe::ownsNode(), util::io::print(), util::io::print(), util::io::print(), util::io::printBox(), util::io::printBox(), anonymous_namespace{particleMpi.cpp}::rebuildGhostPlan(), anonymous_namespace{main.cpp}::GrainContactProbe::sampleMetric(), pd::setupDofPartition(), anonymous_namespace{pdMpi.cpp}::syncAllOwnedPoints(), and rw::writeOutput().
| int util::parallel::mpiSize | ( | ) |
Get size (number) of processors.
Definition at line 88 of file parallelUtil.cpp.
References util::parallel::MpiStatus::d_mpiSize, and initMpi().
Referenced by rw::writer::VtkParticleWriter::appendMeshParallelPiece(), anonymous_namespace{main.cpp}::ContactWitness::assertOk(), particle::assignMpiOwners(), anonymous_namespace{pdMpi.cpp}::buildGhostPlan(), anonymous_namespace{main.cpp}::ContactWitness::checkStop(), MpiMetricTsProbe::checkStop(), postprocess::Postprocess::compressive(), anonymous_namespace{main.cpp}::dumpFinalNodal(), MpiMetricTsProbe::dumpNodalUV(), anonymous_namespace{particleMpi.cpp}::exchangeCachedKinematics(), anonymous_namespace{pdMpi.cpp}::exchangeDoubles(), pd::exchangeGhostDisplacement(), anonymous_namespace{pdMpi.cpp}::exchangePoints(), main(), anonymous_namespace{particleMpi.cpp}::rebuildGhostPlan(), anonymous_namespace{main.cpp}::GrainContactProbe::sampleMetric(), pd::setupDofPartition(), contact::Contact::updateNeighborlist(), and rw::writeOutput().