Parameters class to handle output parameters.
More...
#include <output-parameters.h>
|
|
| OutputParameters () |
| | Constructor.
|
| void | declare_parameters (ParameterHandler &prm) |
| | Delcare parameters in parameter file.
|
| void | parse_parameters (ParameterHandler &prm) |
| | Parse parameters from parameter file.
|
| template<unsigned int dim> |
| void | write_results (DataOut< dim > &data_out, const unsigned int time_step_number=0, const double cur_time=std::numeric_limits< double >::min(), const bool write_mesh_hdf5=true, const std::string &filename="") |
| | Write results to file.
|
| template<unsigned int dim> |
| void | write_grid (const Triangulation< dim > &triangulation, const std::string &filename="grid.ucd") const |
| | Write a grid to a file in ucd format.
|
| void | move_checkpoint (const std::filesystem::path &checkpoint_folder, const std::string &old_filename="tmp.checkpoint", const std::string &new_filename="checkpoint") const |
| | Rename temporary checkpoint files to final checkpoint.
|
| template<class Archive> |
| void | serialize (Archive &ar, const unsigned int version) |
| | Write and read the data of this object from a archive.
|
Parameters class to handle output parameters.
This function handles the output of Sapphire++. It defines all the output related parameters and provides functions to write the results.
◆ declare_parameters()
| void sapphirepp::Utils::OutputParameters::declare_parameters |
( |
ParameterHandler & | prm | ) |
|
Delcare parameters in parameter file.
- Parameters
-
◆ move_checkpoint()
| void sapphirepp::Utils::OutputParameters::move_checkpoint |
( |
const std::filesystem::path & | checkpoint_folder, |
|
|
const std::string & | old_filename = "tmp.checkpoint", |
|
|
const std::string & | new_filename = "checkpoint" ) const |
Rename temporary checkpoint files to final checkpoint.
This operation can be considered atomic.
- Parameters
-
| checkpoint_folder | Folder of the checkpoint files. |
| old_filename | Basefilename of the temporary checkpoint. |
| new_filename | Basefilename of the final checkpoint. |
- Todo
- Make this operation atomic.
◆ parse_parameters()
| void sapphirepp::Utils::OutputParameters::parse_parameters |
( |
ParameterHandler & | prm | ) |
|
Parse parameters from parameter file.
- Parameters
-
◆ serialize()
template<class Archive>
| void sapphirepp::Utils::OutputParameters::serialize |
( |
Archive & | ar, |
|
|
const unsigned int | version ) |
|
inline |
Write and read the data of this object from a archive.
- Template Parameters
-
| Archive | BOOST input/outout archive. |
- Parameters
-
| ar | Archive. |
| version | Archive version. |
◆ write_grid()
template<unsigned int dim>
| template void sapphirepp::Utils::OutputParameters::write_grid< 3 > |
( |
const Triangulation< dim > & | triangulation, |
|
|
const std::string & | filename = "grid.ucd" ) const |
Write a grid to a file in ucd format.
- Template Parameters
-
- Parameters
-
| triangulation | Grid |
| filename | Name of the file |
◆ write_results()
template<unsigned int dim>
| template void sapphirepp::Utils::OutputParameters::write_results< 3 > |
( |
DataOut< dim > & | data_out, |
|
|
const unsigned int | time_step_number = 0, |
|
|
const double | cur_time = std::numeric_limits< double >::min(), |
|
|
const bool | write_mesh_hdf5 = true, |
|
|
const std::string & | filename = "" ) |
Write results to file.
- Template Parameters
-
| dim | Dimension of the solution |
- Parameters
-
| data_out | DataOut class with the solution. It must already contain all the data that should be written. This function only handles the last step of writing to the file. |
| time_step_number | Number of the time step |
| cur_time | Simulation time associated with this time step |
| write_mesh_hdf5 | Only for hdf5: Write the mesh file? Needed at (re-)start of simulation or after refinement. |
| filename | Overwrite for the base_file_name |
- Note
- This function should be a const member. The problem is, that in case of HDF5 output, the xdmf_entries are changed.
- Todo
- Append lines to xdmf file instead of rewriting the file
◆ base_file_name
| std::string sapphirepp::Utils::OutputParameters::base_file_name = "solution" |
File name for the solution
◆ checkpoint_frequency
| unsigned int sapphirepp::Utils::OutputParameters::checkpoint_frequency = 0 |
Save a checkpoint every n-th time step. Use 0 to disable checkpoints.
◆ debug_input_functions
| bool sapphirepp::Utils::OutputParameters::debug_input_functions = false |
Append user defined input functions to output as debug information?
◆ format
◆ n_digits_for_counter
| unsigned int sapphirepp::Utils::OutputParameters::n_digits_for_counter = 4 |
Number of digits for time steps
◆ output_frequency
| unsigned int sapphirepp::Utils::OutputParameters::output_frequency = 1 |
Only put out every n-th step
◆ output_path
| std::filesystem::path sapphirepp::Utils::OutputParameters::output_path |
Output folder = results_path + simulation_id
◆ results_path
| std::filesystem::path sapphirepp::Utils::OutputParameters::results_path |
Path to the results directory
◆ simulation_id
| std::string sapphirepp::Utils::OutputParameters::simulation_id = "01" |
Name of the simulation run, i.e. subfolder for the simulation
The documentation for this class was generated from the following files: