PRISMS-PF Manual
Loading...
Searching...
No Matches
InputFileReader Class Reference

Parameters file reader. Declares parameter names in a dealii parameter_handler and parses the file for the values. Variable assignment occurs in UserInputParameters. More...

#include <input_file_reader.h>

Public Member Functions

 InputFileReader (std::string input_file_name)
 Constructor.
 
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 names).
 
dealii::ParameterHandler & get_parameter_handler ()
 Get the parameter handler.
 
const std::set< std::string > & get_model_constant_names () const
 Get the model constant names.
 
void declare_parameters ()
 Method to declare the parameters to be read from an input file.
 
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.
 
void strip_spaces (std::string &line)
 Strip spaces from the front and back of a string.
 
bool check_keyword_match (const std::string &line, const std::string &keyword)
 Check whether a string starts with a keyword.
 
void declare_mesh ()
 Declare parameters for the mesh.
 
void declare_time_discretization ()
 Declare parameters for timestepping.
 
void declare_solver_parameters ()
 Declare parameters for linear and nonlinear solvers.
 
void declare_output_parameters ()
 Declare parameters for outputs.
 
void declare_load_ic_parameters ()
 Declare parameters for loading ICs from files.
 
void declare_checkpoint_parameters ()
 Declare parameters for checkpoints.
 
void declare_bc_parameters ()
 Declare parameters for boundary conditions.
 
void declare_nucleation_parameters ()
 Declare parameters for nucleation.
 
void declare_grain_remapping_parameters ()
 Declare parameters for grain remapping.
 
void declare_grain_loading_parameters ()
 Declare parameters for grain structure loading.
 
void declare_miscellaneous_parameters ()
 Declare parameters for rng.
 
void declare_model_constants ()
 Declare parameters for user-defined model constants.
 

Static Public Attributes

static constexpr unsigned int max_criteria = 16
 Number of available independent settings for certain fields.
 

Private Attributes

std::string parameters_file_name
 
dealii::ParameterHandler parameter_handler
 
std::set< std::string > model_constant_names
 

Detailed Description

Parameters file reader. Declares parameter names in a dealii parameter_handler and parses the file for the values. Variable assignment occurs in UserInputParameters.

Constructor & Destructor Documentation

◆ InputFileReader()

PRISMS_PF_BEGIN_NAMESPACE InputFileReader::InputFileReader ( std::string  input_file_name)
explicit

Constructor.

Member Function Documentation

◆ check_keyword_match()

bool InputFileReader::check_keyword_match ( const std::string &  line,
const std::string &  keyword 
)

Check whether a string starts with a keyword.

◆ declare_bc_parameters()

void InputFileReader::declare_bc_parameters ( )

Declare parameters for boundary conditions.

◆ declare_checkpoint_parameters()

void InputFileReader::declare_checkpoint_parameters ( )

Declare parameters for checkpoints.

◆ declare_grain_loading_parameters()

void InputFileReader::declare_grain_loading_parameters ( )

Declare parameters for grain structure loading.

◆ declare_grain_remapping_parameters()

void InputFileReader::declare_grain_remapping_parameters ( )

Declare parameters for grain remapping.

◆ declare_load_ic_parameters()

void InputFileReader::declare_load_ic_parameters ( )

Declare parameters for loading ICs from files.

◆ declare_mesh()

void InputFileReader::declare_mesh ( )

Declare parameters for the mesh.

◆ declare_miscellaneous_parameters()

void InputFileReader::declare_miscellaneous_parameters ( )

Declare parameters for rng.

◆ declare_model_constants()

void InputFileReader::declare_model_constants ( )

Declare parameters for user-defined model constants.

◆ declare_nucleation_parameters()

void InputFileReader::declare_nucleation_parameters ( )

Declare parameters for nucleation.

◆ declare_output_parameters()

void InputFileReader::declare_output_parameters ( )

Declare parameters for outputs.

◆ declare_parameters()

void InputFileReader::declare_parameters ( )

Method to declare the parameters to be read from an input file.

◆ declare_solver_parameters()

void InputFileReader::declare_solver_parameters ( )

Declare parameters for linear and nonlinear solvers.

◆ declare_time_discretization()

void InputFileReader::declare_time_discretization ( )

Declare parameters for timestepping.

◆ get_model_constant_names() [1/2]

std::set< std::string > InputFileReader::get_model_constant_names ( )

Get the trailing part of the entry name after a specified string (used to extract the model constant names).

◆ get_model_constant_names() [2/2]

const std::set< std::string > & InputFileReader::get_model_constant_names ( ) const
inline

Get the model constant names.

◆ get_parameter_handler()

dealii::ParameterHandler & InputFileReader::get_parameter_handler ( )
inline

Get the parameter handler.

◆ parse_line()

bool InputFileReader::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.

◆ strip_spaces()

void InputFileReader::strip_spaces ( std::string &  line)

Strip spaces from the front and back of a string.

Member Data Documentation

◆ max_criteria

constexpr unsigned int InputFileReader::max_criteria = 16
staticconstexpr

Number of available independent settings for certain fields.

◆ model_constant_names

std::set<std::string> InputFileReader::model_constant_names
private

◆ parameter_handler

dealii::ParameterHandler InputFileReader::parameter_handler
private

◆ parameters_file_name

std::string InputFileReader::parameters_file_name
private

The documentation for this class was generated from the following files: