PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
testUtil.cpp File Reference
#include "testUtilLib.h"
#include "util/io.h"
#include "util/parallelUtil.h"
#include <fmt/format.h>
#include <iostream>
Include dependency graph for testUtil.cpp:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 17 of file testUtil.cpp.

17 {
18
19 // init parallel
20 util::parallel::initMpi(argc, argv);
22 util::io::print(fmt::format("Initialized MPI. MPI size = {}, MPI rank = {}\n", mpiSize, mpiRank));
24
26 return EXIT_SUCCESS;
27}
void testUtilMethods()
Test methods
std::string printStr(const T &msg, int nt=print_default_tab)
Returns formatted string for output.
Definition io.h:54
void print(const T &msg, int nt=print_default_tab, int printMpiRank=print_default_mpi_rank)
Prints formatted information.
Definition io.h:108
const MpiStatus * getMpiStatus()
Returns pointer to MpiStatus struct.
void initMpi(int argc=0, char *argv[]=nullptr)
Initializes MPI and also creates MpiStatus struct.
int mpiSize()
Get size (number) of processors.
int mpiRank()
get rank (id) of this processor

References util::parallel::getMpiStatus(), util::parallel::initMpi(), util::parallel::mpiRank(), util::parallel::mpiSize(), util::io::print(), and test::testUtilMethods().

Here is the call graph for this function: