Alsvinn  0.5.3
The fast FVM simulator with UQ support
parameters.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <string>
3 #include <map>
4 #include <mpi.h>
5 
7 class MyParameters {
8 public:
9 
10  void setParameter(const std::string& key, const std::string& value) {
11  parameters[key] = value;
12  }
13 
14  std::string getParameter(const std::string& key) const {
15  return parameters.at(key);
16  }
17 
18  void setMPIComm(MPI_Comm comm) {
19  mpiComm = comm;
20  }
21 
22 
23  MPI_Comm getMPIComm(MPI_Comm comm) {
24  return comm;
25  }
26 
27 private:
28  std::map<std::string, std::string> parameters;
29 
30  MPI_Comm mpiComm;
31 
32 };
std::string getParameter(const std::string &key) const
Definition: parameters.hpp:14
void setParameter(const std::string &key, const std::string &value)
Definition: parameters.hpp:10
MPI_Comm getMPIComm(MPI_Comm comm)
Definition: parameters.hpp:23
Simple example parameter class that can be used.
Definition: parameters.hpp:7
void setMPIComm(MPI_Comm comm)
Definition: parameters.hpp:18