Read_input_file.hpp
Go to the documentation of this file.
1 #ifndef READ_INPUT_FILE_H
2 #define READ_INPUT_FILE_H
3 #include <petscksp.h>
4 #include <jsoncpp/json/json.h>
5 #include "class.hpp"
6 
7 namespace SPE
8 {
13  int Read_input_file(
14  SPE &data,
15  char const buff[]="input_file.json"
16  );
21  int set_input_value(
22  Json::Value &val,
23  const char buff[],
24  PetscInt &v
25  );
30  int set_input_value(
31  Json::Value &val,
32  const char buff[],
33  PetscReal &v
34  );
39  int set_input_value(
40  Json::Value &val,
41  const char buff[],
42  PetscScalar &v
43  );
48  int set_input_value(
49  Json::Value &val,
50  const char buff[],
51  PetscBool &v
52  );
57  int set_input_value(
58  Json::Value &val,
59  const char buff[],
60  char *v
61  );
66  int set_input_value(
67  Json::Value &val,
68  const char buff[],
69  std::string &v
70  );
71 }
72 #endif
Namespace containing all functions and data classes for this solver.
Definition: Ax_b.hpp:5
Represents a JSON value.
Definition: json.h:724
int Read_input_file(SPE &data, char const buff[]="input_file.json")
Read an input file written in json format.
Definition: Read_input_file.cpp:14
int set_input_value(Json::Value &val, const char buff[], PetscInt &v)
take Json data and save it to value if it exists
Definition: Read_input_file.cpp:111