PRISMS-PF Manual v3.0-pre
Loading...
Searching...
No Matches
inputFileReader.h
1// Class to read in the user input from parameters.in
2
3#ifndef INCLUDE_INPUTFILEREADER_H_
4#define INCLUDE_INPUTFILEREADER_H_
5
6#include <deal.II/base/parameter_handler.h>
7
8#include <core/variableAttributeLoader.h>
9#include <set>
10#include <string>
11#include <vector>
12
18{
19public:
23 inputFileReader(const std::string &input_file_name,
24 const AttributesList &_var_attributes,
25 const AttributesList &_pp_attributes);
26
31 [[nodiscard]] std::vector<std::string>
32 get_subsection_entry_list(const std::string &subsec_name,
33 const std::string &entry_name,
34 const std::string &default_entry);
35
40 [[nodiscard]] std::set<std::string>
42
46 void
48
52 static bool
53 parse_line(std::string line,
54 const std::string &keyword,
55 const std::string &entry_name,
56 std::string &out_string,
57 bool expect_equals_sign);
58
62 static void
63 strip_spaces(std::string &line);
64
68 static bool
69 check_keyword_match(std::string &line, const std::string &keyword);
70
74 void
76
80 void
82
86 void
88
92 void
94
98 void
100
104 void
106
110 void
112
116 void
118
122 void
124
128 void
130
134 void
136
140 void
142
143 const std::string parameters_file_name;
144 const AttributesList &var_attributes;
145 const AttributesList &pp_attributes;
146 dealii::ParameterHandler parameter_handler;
147 std::set<std::string> model_constant_names;
148 unsigned int number_of_dimensions;
149};
150
151#endif /* INCLUDE_INPUTFILEREADER_H_ */
Parameters file reader. Declares parameter names in a dealii parameter_handler and parses the file fo...
Definition inputFileReader.h:18
void declare_load_IC_parameters()
Declare parameters for loading ICs from files.
Definition inputFileReader.cc:540
void declare_parameters()
Method to declare the parameters to be read from an input file.
Definition inputFileReader.cc:268
void declare_mesh()
Declare parameters for the mesh.
Definition inputFileReader.cc:286
void declare_checkpoint_parameters()
Declare parameters for checkpoints.
Definition inputFileReader.cc:565
static bool parse_line(std::string line, const std::string &keyword, const std::string &entry_name, std::string &out_string, bool expect_equals_sign)
Method to check if a line has the desired contents and if so, extract it.
Definition inputFileReader.cc:68
static void strip_spaces(std::string &line)
Strip spaces from the front and back of a string.
Definition inputFileReader.cc:33
void declare_solver_parameters()
Declare parameters for linear and nonlinear solvers.
Definition inputFileReader.cc:401
void declare_pinning_parameters()
Declare parameters for pinned points.
Definition inputFileReader.cc:637
std::set< std::string > get_model_constant_names()
Get the trailing part of the entry name after a specified string (used to extract the model constant ...
Definition inputFileReader.cc:211
void declare_time_discretization()
Declare parameters for timestepping.
Definition inputFileReader.cc:383
void declare_grain_remapping_parameters()
Declare parameters for grain remapping.
Definition inputFileReader.cc:744
void declare_model_constants()
Declare parameters for user-defined model constants.
Definition inputFileReader.cc:831
void declare_output_parameters()
Declare parameters for outputs.
Definition inputFileReader.cc:495
void declare_BC_parameters()
Declare parameters for boundary conditions.
Definition inputFileReader.cc:590
std::vector< std::string > get_subsection_entry_list(const std::string &subsec_name, const std::string &entry_name, const std::string &default_entry)
Method to get a list of entry values from multiple subsections in an input file.
Definition inputFileReader.cc:136
void declare_grain_loading_parameters()
Declare parameters for grain structure loading.
Definition inputFileReader.cc:783
void declare_nucleation_parameters()
Declare parameters for nucleation.
Definition inputFileReader.cc:663
static bool check_keyword_match(std::string &line, const std::string &keyword)
Check whether a string starts with a keyword.
Definition inputFileReader.cc:47