ParametersBase Struct Reference
|
Developer Documentation
|
Abstract base class for managing parameter files. More...
#include <parameters_base.hpp>
Public Member Functions | |
| virtual void | process_parameters_file (dealii::ParameterHandler &prm, const std::string ¶meter_filename) |
| Process a parameter file and populate the ParameterHandler. | |
| void | print_parameters (dealii::ParameterHandler &prm, std::ostream &pcout, const bool print_details) |
| Print parameters to an output stream. | |
Protected Member Functions | |
| virtual void | add_parameters (dealii::ParameterHandler &prm)=0 |
| Add parameters to the ParameterHandler. | |
| virtual void | post (const std::string ¶meter_filename)=0 |
| Post-processing after reading the parameter file. | |
Protected Attributes | |
| bool | parameters_read = false |
Private Member Functions | |
| void | check_for_file (const std::string ¶meter_filename) const |
| Check if a parameter file exists and is accessible. | |
Detailed Description
Abstract base class for managing parameter files.
Provides an interface for processing, validating, and printing parameter files using ParameterHandler. Derived classes must implement methods for adding parameters and handling post-processing logic.
Member Function Documentation
◆ add_parameters()
|
protectedpure virtual |
Add parameters to the ParameterHandler.
Derived classes must implement this method to define the parameters managed by the ParameterHandler.
- Parameters
-
prm The ParameterHandlerobject where parameters will be added.
Implemented in MeltPoolDG::LevelSet::AdvectionDiffusionCaseParameters< number >, MeltPoolDG::Heat::HeatTransferCaseParameters< number >, MeltPoolDG::LevelSet::LevelSetCaseParameters< number >, MeltPoolDG::MeltPoolCaseParameters< number >, MeltPoolDG::RadiativeTransport::RadiativeTransportCaseParameters< number >, and MeltPoolDG::LevelSet::ReinitializationCaseParameters< number >.
◆ check_for_file()
|
private |
Check if a parameter file exists and is accessible.
Verifies that the specified file exists and can be opened for reading.
- Parameters
-
parameter_filename The name of the file to check.
- Exceptions
-
dealii::ExcMessage If the file cannot be found or opened.
◆ post()
|
protectedpure virtual |
Post-processing after reading the parameter file.
This method is called after the parameter file has been parsed. Derived classes can override it to perform additional setup or validation based on the file contents.
- Parameters
-
parameter_filename The name of the parameter file that was processed.
Implemented in MeltPoolDG::LevelSet::AdvectionDiffusionCaseParameters< number >, MeltPoolDG::Heat::HeatTransferCaseParameters< number >, MeltPoolDG::LevelSet::LevelSetCaseParameters< number >, MeltPoolDG::MeltPoolCaseParameters< number >, MeltPoolDG::RadiativeTransport::RadiativeTransportCaseParameters< number >, and MeltPoolDG::LevelSet::ReinitializationCaseParameters< number >.
◆ print_parameters()
| void MeltPoolDG::ParametersBase::print_parameters | ( | dealii::ParameterHandler & | prm, |
| std::ostream & | pcout, | ||
| const bool | print_details | ||
| ) |
Print parameters to an output stream.
Prints the parameters in the ParameterHandler to a specified stream, either in detailed or compact format.
- Parameters
-
prm The ParameterHandlerobject containing the parameters to print.pcout The output stream where parameters will be printed. print_details If true, prints parameters in detailed format.
◆ process_parameters_file()
|
virtual |
Process a parameter file and populate the ParameterHandler.
Reads a parameter file in .json or .prm format, validates its contents, and updates the associated ParameterHandler object.
- Parameters
-
prm The ParameterHandlerobject to populate with parameters.parameter_filename The name of the parameter file to process.
- Exceptions
-
dealii::ExcMessage If parameters have already been read or the file format is unsupported.
Member Data Documentation
◆ parameters_read
|
protected |
Tracks whether parameters have been read.
The documentation for this struct was generated from the following files:
- include/meltpooldg/core/parameters_base.hpp
- source/core/parameters_base.cpp
Generated by