NanoStructures  1.0
DMFT solver for layered, strongly correlated nanostructures
function.h
1 #ifndef FUNC_H
2 #define FUNC_H
3 #include <string>
4 
5 namespace mpi {
6  class OpenMPI;
7 }
8 namespace math {
9 class Function
10 {
11 public:
12  Function();
13  Function(int length);
14  Function(const Function& orig);
15  Function& operator=(const Function& orig);
16  virtual ~Function();
17 
18  void resize(int length);
19  int getSize() const { return m_length; }
20 
21  void set(int index, double argument, double value);
22  void setArgument(int index, double argument);
23  void setValue(int index, double value);
24  double getArgument(int index) const;
25  double getValue(int index) const;
26 
27  //interpolation
28  double interpolate(double x);
29 
30  //IO
31  void read(std::string filename);
32  void write(std::string filename);
33  friend class mpi::OpenMPI;
34 
35 protected:
36  double* m_arguments;
37  double* m_values;
38  int m_length;
39 };
40 }
41 #endif // FUNCTION_H
Definition: function.h:9
The MPI singleton is responsible for data exchange between compute nodes via OpenMPI.
Definition: openmpi.h:35