PRISMS-PF Manual
Loading...
Searching...
No Matches
input_file_reader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2025 PRISMS Center at the University of Michigan
2// SPDX-License-Identifier: GNU Lesser General Public Version 2.1
3
4#pragma once
5
6#include <deal.II/base/parameter_handler.h>
7
8#include <prismspf/config.h>
9
10#include <set>
11#include <string>
12
14
20{
21public:
25 explicit InputFileReader(std::string input_file_name);
26
31 [[nodiscard]] std::set<std::string>
33
37 [[nodiscard]] dealii::ParameterHandler &
42
46 [[nodiscard]] const std::set<std::string> &
48 {
50 }
51
55 void
57
61 bool
62 parse_line(std::string line,
63 const std::string &keyword,
64 const std::string &entry_name,
65 std::string &out_string,
67
71 void
72 strip_spaces(std::string &line);
73
77 bool
78 check_keyword_match(const std::string &line, const std::string &keyword);
79
83 void
85
89 void
91
95 void
97
101 void
103
107 void
109
113 void
115
119 void
121
125 void
127
131 void
133
137 void
139
143 void
145
149 void
151
155 static constexpr unsigned int max_criteria = 16;
156
157private:
159 dealii::ParameterHandler parameter_handler;
160 std::set<std::string> model_constant_names;
161};
162
Parameters file reader. Declares parameter names in a dealii parameter_handler and parses the file fo...
Definition input_file_reader.h:20
void declare_grain_loading_parameters()
Declare parameters for grain structure loading.
Definition input_file_reader.cc:782
void declare_grain_remapping_parameters()
Declare parameters for grain remapping.
Definition input_file_reader.cc:743
void declare_time_discretization()
Declare parameters for timestepping.
Definition input_file_reader.cc:346
dealii::ParameterHandler parameter_handler
Definition input_file_reader.h:159
void declare_solver_parameters()
Declare parameters for linear and nonlinear solvers.
Definition input_file_reader.cc:371
std::string parameters_file_name
Definition input_file_reader.h:158
void declare_miscellaneous_parameters()
Declare parameters for rng.
Definition input_file_reader.cc:835
void declare_bc_parameters()
Declare parameters for boundary conditions.
Definition input_file_reader.cc:613
dealii::ParameterHandler & get_parameter_handler()
Get the parameter handler.
Definition input_file_reader.h:38
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:74
void declare_mesh()
Declare parameters for the mesh.
Definition input_file_reader.cc:212
void declare_nucleation_parameters()
Declare parameters for nucleation.
Definition input_file_reader.cc:675
void declare_output_parameters()
Declare parameters for outputs.
Definition input_file_reader.cc:482
static constexpr unsigned int max_criteria
Number of available independent settings for certain fields.
Definition input_file_reader.h:155
std::set< std::string > model_constant_names
Definition input_file_reader.h:160
void declare_parameters()
Method to declare the parameters to be read from an input file.
Definition input_file_reader.cc:194
const std::set< std::string > & get_model_constant_names() const
Get the model constant names.
Definition input_file_reader.h:47
void declare_load_ic_parameters()
Declare parameters for loading ICs from files.
Definition input_file_reader.cc:532
void declare_model_constants()
Declare parameters for user-defined model constants.
Definition input_file_reader.cc:850
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:140
bool check_keyword_match(const std::string &line, const std::string &keyword)
Check whether a string starts with a keyword.
Definition input_file_reader.cc:53
void declare_checkpoint_parameters()
Declare parameters for checkpoints.
Definition input_file_reader.cc:582
void strip_spaces(std::string &line)
Strip spaces from the front and back of a string.
Definition input_file_reader.cc:39
@ Value
Use value of the variable as a criterion for refinement.
Definition grid_refiner_criterion.h:31
Definition conditional_ostreams.cc:20