PRISMS-PF Manual v3.0-pre
All Classes Functions Variables Enumerations Pages
input_file_reader.h
1// SPDX-FileCopyrightText: © 2025 PRISMS Center at the University of Michigan
2// SPDX-License-Identifier: GNU Lesser General Public Version 2.1
3
4#ifndef input_file_reader_h
5#define input_file_reader_h
6
7#include <deal.II/base/parameter_handler.h>
8
9#include <prismspf/config.h>
10#include <prismspf/core/variable_attribute_loader.h>
11
12#include <set>
13#include <string>
14#include <vector>
15
16PRISMS_PF_BEGIN_NAMESPACE
17
23{
24public:
28 inputFileReader(const std::string &input_file_name,
29 const std::map<unsigned int, variableAttributes> &_var_attributes);
30
35 [[nodiscard]] std::vector<std::string>
36 get_subsection_entry_list(const std::string &subsec_name,
37 const std::string &entry_name,
38 const std::string &default_entry);
39
44 [[nodiscard]] std::set<std::string>
46
50 void
52
56 bool
57 parse_line(std::string line,
58 const std::string &keyword,
59 const std::string &entry_name,
60 std::string &out_string,
61 bool expect_equals_sign);
62
66 void
67 strip_spaces(std::string &line);
68
72 bool
73 check_keyword_match(std::string &line, const std::string &keyword);
74
78 void
80
84 void
86
90 void
92
96 void
98
102 void
104
108 void
110
114 void
116
120 void
122
126 void
128
132 void
134
138 void
140
144 void
146
147 const std::string parameters_file_name;
148 const std::map<unsigned int, variableAttributes> &var_attributes;
149 dealii::ParameterHandler parameter_handler;
150 std::set<std::string> model_constant_names;
151 unsigned int number_of_dimensions;
152};
153
154PRISMS_PF_END_NAMESPACE
155
156#endif
Parameters file reader. Declares parameter names in a dealii parameter_handler and parses the file fo...
Definition input_file_reader.h:23
void declare_load_IC_parameters()
Declare parameters for loading ICs from files.
Definition input_file_reader.cc:584
void declare_parameters()
Method to declare the parameters to be read from an input file.
Definition input_file_reader.cc:278
void declare_mesh()
Declare parameters for the mesh.
Definition input_file_reader.cc:296
void declare_checkpoint_parameters()
Declare parameters for checkpoints.
Definition input_file_reader.cc:609
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 input_file_reader.cc:79
void strip_spaces(std::string &line)
Strip spaces from the front and back of a string.
Definition input_file_reader.cc:44
void declare_solver_parameters()
Declare parameters for linear and nonlinear solvers.
Definition input_file_reader.cc:426
void declare_pinning_parameters()
Declare parameters for pinned points.
Definition input_file_reader.cc:691
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 input_file_reader.cc:222
void declare_time_discretization()
Declare parameters for timestepping.
Definition input_file_reader.cc:408
void declare_grain_remapping_parameters()
Declare parameters for grain remapping.
Definition input_file_reader.cc:824
void declare_model_constants()
Declare parameters for user-defined model constants.
Definition input_file_reader.cc:914
void declare_output_parameters()
Declare parameters for outputs.
Definition input_file_reader.cc:533
void declare_BC_parameters()
Declare parameters for boundary conditions.
Definition input_file_reader.cc:640
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 input_file_reader.cc:147
void declare_grain_loading_parameters()
Declare parameters for grain structure loading.
Definition input_file_reader.cc:863
void declare_nucleation_parameters()
Declare parameters for nucleation.
Definition input_file_reader.cc:743
bool check_keyword_match(std::string &line, const std::string &keyword)
Check whether a string starts with a keyword.
Definition input_file_reader.cc:58