PeriDEM 0.2.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 | 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.
const util::parallel::MpiStatus * util::parallel::getMpiStatus | ( | ) |
Returns pointer to MpiStatus struct.
Definition at line 101 of file parallelUtil.cpp.
References initMpi().
Referenced by main(), and main().
unsigned int util::parallel::getNThreads | ( | ) |
Get number of threads to be used by taskflow.
Definition at line 116 of file parallelUtil.cpp.
Referenced by loading::ParticleFLoading::apply(), loading::ParticleULoading::apply(), model::DEMModel::applyInitialCondition(), model::DEMModel::computeContactForces(), model::DEMModel::computeExternalForces(), model::DEMModel::computeForces(), peridynamics::Model::computeForces(), material::computeHydrostaticStrain(), model::DEMModel::computePeridynamicForces(), material::computeStateMx(), material::computeStateThetax(), fe::Mesh::computeVol(), geometry::Fracture::Fracture(), fe::getCurrentQuadPoints(), fe::getStrainStress(), model::DEMModel::integrateCD(), model::DEMModel::integrateVerlet(), 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(), model::DEMModel::updateContactNeighborlist(), and model::DEMModel::updatePeridynamicNeighborlist().
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(), main(), mpiComm(), mpiRank(), and mpiSize().
void util::parallel::initMpiStatus | ( | ) |
Initializes MpiStatus struct.
Definition at line 55 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 109 of file parallelUtil.cpp.
Referenced by main().
bool util::parallel::isMpiEnabled | ( | ) |
Function to check if MPI is enabled.
Definition at line 62 of file parallelUtil.cpp.
References util::parallel::MpiStatus::d_mpiEnabled, and initMpi().
MPI_Comm util::parallel::mpiComm | ( | ) |
Get MPI comm.
Definition at line 93 of file parallelUtil.cpp.
References util::parallel::MpiStatus::d_comm, and initMpi().
int util::parallel::mpiRank | ( | ) |
get rank (id) of this processor
Definition at line 85 of file parallelUtil.cpp.
References util::parallel::MpiStatus::d_mpiRank, and initMpi().
Referenced by util::io::Logger::log(), main(), main(), util::io::print(), util::io::print(), util::io::print(), util::io::printBox(), and util::io::printBox().
int util::parallel::mpiSize | ( | ) |
Get size (number) of processors.
Definition at line 77 of file parallelUtil.cpp.
References util::parallel::MpiStatus::d_mpiSize, and initMpi().
Referenced by main(), and main().