IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
Ippl.h
Go to the documentation of this file.
1//
2// Class Ippl
3// Ippl environment.
4//
5#ifndef IPPL_H
6#define IPPL_H
7
8#include <iostream>
9
10#include "Types/IpplTypes.h"
11
12#include "Utility/Inform.h"
14
17
18namespace ippl {
19
20 // the parallel communication object
21 // use inlining to avoid multiple definitions
22 inline std::unique_ptr<mpi::Communicator> Comm = 0;
23
24 inline std::unique_ptr<mpi::Environment> Env = 0;
25
26 // Inform object to use to print messages to the console (or even to a
27 // file if requested)
28 // use inlining to avoid multiple definitions
29 inline std::unique_ptr<Inform> Info = 0;
30 inline std::unique_ptr<Inform> Warn = 0;
31 inline std::unique_ptr<Inform> Error = 0;
32
33 void initialize(int& argc, char* argv[], MPI_Comm comm = MPI_COMM_WORLD);
34
35 void finalize();
36
37 void fence();
38
39 void abort(const char* msg = nullptr, int errorcode = -1);
40
41 namespace detail {
42 bool checkOption(const char* arg, const char* lstr, const char* sstr);
43
44 template <typename T, typename = std::enable_if_t<std::is_arithmetic_v<T>>>
45 T getNumericalOption(const char* arg);
46 } // namespace detail
47} // namespace ippl
48
49// FIMXE remove (only for backwards compatibility)
50#include "IpplCore.h"
51
52#endif
Definition Archive.h:20
void initialize(int &argc, char *argv[], MPI_Comm comm)
Definition Ippl.cpp:16
std::unique_ptr< Inform > Info
Definition Ippl.h:29
std::unique_ptr< Inform > Error
Definition Ippl.h:31
void finalize()
Definition Ippl.cpp:94
void fence()
Definition Ippl.cpp:103
std::unique_ptr< Inform > Warn
Definition Ippl.h:30
std::unique_ptr< mpi::Communicator > Comm
Definition Ippl.h:22
std::unique_ptr< mpi::Environment > Env
Definition Ippl.h:24
void abort(const char *msg, int errorcode)
Definition Ippl.cpp:107
T getNumericalOption(const char *arg)
Definition Ippl.cpp:120
bool checkOption(const char *arg, const char *lstr, const char *sstr)
Definition Ippl.cpp:115