IOManager Class Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
#include <IOManager.H>
Public Member Functions | |
IOManager (CFDSim &) | |
~IOManager () | |
IOManager (const IOManager &)=delete | |
IOManager & | operator= (const IOManager &)=delete |
void | initialize_io () |
Process user inputs and perform one-time initialization tasks. | |
void | write_plot_file () |
Write all user-requested fields to disk. | |
void | write_checkpoint_file (const int start_level=0, const int end_level=-1) |
Write all necessary fields for restart. | |
void | read_checkpoint_fields (const std::string &restart_file, const amrex::Vector< amrex::BoxArray > &ba_chk, const amrex::Vector< amrex::DistributionMapping > &dm_chk, const amrex::IntVect &rep) |
Read all necessary fields for a restart. | |
void | register_output_var (const std::string &fname) |
Register a variable for output. | |
void | register_output_int_var (const std::string &fname) |
void | register_restart_var (const std::string &fname) |
Register a variable for restart file. | |
void | register_io_var (const std::string &fname) |
Convenience function to register a variable for both output and restart. | |
const std::string & | restart_file () |
Name of the checkpoint file to be read during a restart. | |
bool | is_restart () const |
const amrex::Vector< Field * > & | plot_fields () const |
const amrex::Vector< Field * > & | checkpoint_fields () const |
const std::string & | post_processing_directory () |
Name of the post processing directory. | |
Private Member Functions | |
void | write_header (const std::string &, const int start_level, const int end_level) |
void | write_info_file (const std::string &) |
Private Attributes | |
CFDSim & | m_sim |
std::unique_ptr< DerivedQtyMgr > | m_derived_mgr |
std::set< std::string > | m_pltvars_default |
Default output variables registered automatically in the code. | |
std::set< std::string > | m_int_pltvars_default |
Default output integer variables registered automatically in the code. | |
std::set< std::string > | m_chkvars |
Variables for output in checkpoint/restart files. | |
amrex::Vector< Field * > | m_plt_fields |
Final list of fields to be output. | |
amrex::Vector< IntField * > | m_int_plt_fields |
Final list of integer fields to be output. | |
amrex::Vector< Field * > | m_chk_fields |
Final list of fields for restart. | |
amrex::Vector< std::string > | m_plt_var_names |
Variable names (including components) for output. | |
std::string | m_plt_prefix {"plt"} |
Prefix used for the plot file directories. | |
std::string | m_chk_prefix {"chk"} |
Prefix used for the restart file directories. | |
std::string | m_post_dir {"post_processing"} |
Name for the post_processing directory. | |
std::string | m_restart_file |
Restart file name. | |
int | m_plt_num_comp {0} |
Total number of variables (including components) output to plot file. | |
bool | m_output_default_vars {true} |
Flag indicating whether default fields should be output. | |
bool | m_allow_missing_restart_fields {true} |
Flag indicating whether we should allow missing restart fields. | |
int | m_nfiles {256} |
Number of plot and checkpoint data files per write. | |
Detailed Description
Input/Output manager
This class contains infrastructure to output solution fields during the simulation as well as code that reads a checkpoint file during a restarted simulation. By default the Equation Systems register the necessary fields during initialization and these fields are output into plot-file and checkpoint file formats based on output frequencies managed by SimTime. The user can request additional fields be output by setting appropriate parameters in the input file. The class also provides the ability to override output of the default fields and output a subset of those fields.
Constructor & Destructor Documentation
◆ IOManager() [1/2]
|
explicit |
◆ ~IOManager()
|
default |
◆ IOManager() [2/2]
|
delete |
Member Function Documentation
◆ checkpoint_fields()
|
inline |
◆ initialize_io()
void amr_wind::IOManager::initialize_io | ( | ) |
Process user inputs and perform one-time initialization tasks.
◆ is_restart()
|
inline |
◆ operator=()
◆ plot_fields()
|
inline |
◆ post_processing_directory()
|
inline |
Name of the post processing directory.
◆ read_checkpoint_fields()
void amr_wind::IOManager::read_checkpoint_fields | ( | const std::string & | restart_file, |
const amrex::Vector< amrex::BoxArray > & | ba_chk, | ||
const amrex::Vector< amrex::DistributionMapping > & | dm_chk, | ||
const amrex::IntVect & | rep ) |
Read all necessary fields for a restart.
◆ register_io_var()
|
inline |
Convenience function to register a variable for both output and restart.
◆ register_output_int_var()
|
inline |
◆ register_output_var()
|
inline |
Register a variable for output.
◆ register_restart_var()
|
inline |
Register a variable for restart file.
◆ restart_file()
|
inline |
Name of the checkpoint file to be read during a restart.
◆ write_checkpoint_file()
void amr_wind::IOManager::write_checkpoint_file | ( | const int | start_level = 0, |
const int | end_level = -1 ) |
Write all necessary fields for restart.
◆ write_header()
|
private |
◆ write_info_file()
|
private |
◆ write_plot_file()
void amr_wind::IOManager::write_plot_file | ( | ) |
Write all user-requested fields to disk.
Member Data Documentation
◆ m_allow_missing_restart_fields
|
private |
Flag indicating whether we should allow missing restart fields.
◆ m_chk_fields
|
private |
Final list of fields for restart.
◆ m_chk_prefix
|
private |
Prefix used for the restart file directories.
◆ m_chkvars
|
private |
Variables for output in checkpoint/restart files.
◆ m_derived_mgr
|
private |
◆ m_int_plt_fields
|
private |
Final list of integer fields to be output.
◆ m_int_pltvars_default
|
private |
Default output integer variables registered automatically in the code.
◆ m_nfiles
|
private |
Number of plot and checkpoint data files per write.
◆ m_output_default_vars
|
private |
Flag indicating whether default fields should be output.
◆ m_plt_fields
|
private |
Final list of fields to be output.
◆ m_plt_num_comp
|
private |
Total number of variables (including components) output to plot file.
◆ m_plt_prefix
|
private |
Prefix used for the plot file directories.
◆ m_plt_var_names
|
private |
Variable names (including components) for output.
◆ m_pltvars_default
|
private |
Default output variables registered automatically in the code.
◆ m_post_dir
|
private |
Name for the post_processing directory.
◆ m_restart_file
|
private |
Restart file name.
◆ m_sim
|
private |
The documentation for this class was generated from the following files:
- /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/IOManager.H
- /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/IOManager.cpp
Generated by 1.12.0