|
IBAMR
IBAMR version 0.20.
|
Class AppInitializer provides functionality to simplify the initialization code in an application code. More...
#include <ibtk/AppInitializer.h>

Private Member Functions | |
| AppInitializer (const AppInitializer &from)=delete | |
| Copy constructor. More... | |
| AppInitializer & | operator= (const AppInitializer &that)=delete |
| Assignment operator. More... | |
Private Attributes | |
| SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > | d_input_db |
| std::string | d_restart_read_dirname |
| int | d_restart_restore_num = 0 |
| bool | d_is_from_restart = false |
| int | d_viz_dump_interval = 0 |
| std::string | d_viz_dump_dirname |
| std::vector< std::string > | d_viz_writers |
| SAMRAI::tbox::Pointer< SAMRAI::appu::VisItDataWriter< NDIM > > | d_visit_data_writer |
| SAMRAI::tbox::Pointer< LSiloDataWriter > | d_silo_data_writer |
| std::string | d_exodus_filename = "output.ex2" |
| std::string | d_gmv_filename = "output.gmv" |
| int | d_restart_dump_interval = 0 |
| std::string | d_restart_dump_dirname |
| int | d_data_dump_interval = 0 |
| std::string | d_data_dump_dirname |
| int | d_timer_dump_interval = 0 |
PETSc options may be supplied by petsc_settings or petsc_settings_<tag> databases placed anywhere in the input file, usually beside the component configuration they support. Their location is only organizational. For example,
The untagged entries produce -ksp_type and -rtol, while the tagged entries produce -SP_ksp_max_it and -SP_monitor: the tag becomes a literal prefix and the enclosing database name does not contribute one. Values may be scalar Boolean, integer, float, double, or string values. Following PETSc conventions, command-line options take precedence over settings in the input file.
As a mutually exclusive alternative to inline settings, the top-level PETSC_OPTIONS_FILE or petsc_options_file key may name an options file; PETSC_OPTIONS_FILE takes precedence when both spellings are present. The file is sought first at the path as written and then relative to the directory containing the input file.
| IBTK::AppInitializer::AppInitializer | ( | int | argc, |
| char * | argv[], | ||
| const std::string & | default_log_file_name = "IBAMR.log" |
||
| ) |
Constructor for class AppInitializer parses command line arguments, sets up input and restart databases, and enables SAMRAI logging.
|
virtual |
Destructor for class AppInitializer frees the SAMRAI manager objects used to set up input and restart databases.
|
privatedelete |
| from | The value to copy to this object. |
| SAMRAI::tbox::Pointer<SAMRAI::tbox::Database> IBTK::AppInitializer::getInputDatabase | ( | ) |
Return a pointer to the input database.
| bool IBTK::AppInitializer::isFromRestart | ( | ) | const |
Return a boolean value indicating whether this is a restarted run. This is defined as true when the program recognizes command line arguments for restart_restore_num and restart_dump_dirname.
| const std::string& IBTK::AppInitializer::getRestartReadDirectory | ( | ) | const |
Return the restart directory. If we are not starting from restart, this method returns an empty string. This value is set by the second command line argument to the executable.
| int IBTK::AppInitializer::getRestartRestoreNumber | ( | ) | const |
Return the restart restore number. If we are not starting from restart, this method returns 0. This value is set by the third command line argument to the executable.
| SAMRAI::tbox::Pointer<SAMRAI::tbox::Database> IBTK::AppInitializer::getRestartDatabase | ( | bool | suppress_warning = false | ) |
Return a pointer to the restart database. If there is no restart database for the application, this method emits a warning message and returns a NullDatabse.
| SAMRAI::tbox::Pointer<SAMRAI::tbox::Database> IBTK::AppInitializer::getComponentDatabase | ( | const std::string & | component_name, |
| bool | suppress_warning = false |
||
| ) |
Return initialization database for the requested solver component. This is equivalent to: getInputDatabase()->getDatabase(component_name).
If the requested component is not found in the input database, this method emits a warning message and returns a NullDatabse.
| bool IBTK::AppInitializer::dumpVizData | ( | ) | const |
Return a boolean value indicating whether to write visualization data.
| int IBTK::AppInitializer::getVizDumpInterval | ( | ) | const |
Return the visualization dump interval.
| std::string IBTK::AppInitializer::getVizDumpDirectory | ( | ) | const |
Return the visualization dump directory name.
| std::vector<std::string> IBTK::AppInitializer::getVizWriters | ( | ) | const |
Return the visualization writers to be used in the simulation.
| SAMRAI::tbox::Pointer<SAMRAI::appu::VisItDataWriter<NDIM> > IBTK::AppInitializer::getVisItDataWriter | ( | ) | const |
Return a VisIt data writer object to be used to output Cartesian grid data.
If the application is not configured to use VisIt, a nullptr pointer will be returned.
| SAMRAI::tbox::Pointer<LSiloDataWriter> IBTK::AppInitializer::getLSiloDataWriter | ( | ) | const |
Return a VisIt data writer object to be used to output Lagrangian data.
If the application is not configured to use VisIt, a nullptr pointer will be returned.
| std::string IBTK::AppInitializer::getExodusIIFilename | ( | const std::string & | prefix = "" | ) | const |
Return the ExodusII visualization file name.
If the application is not configured to use ExodusII, an empty string will be returned.
| std::string IBTK::AppInitializer::getGMVFilename | ( | const std::string & | prefix = "" | ) | const |
Return the GMV visualization file name.
If the application is not configured to use GMV, an empty string will be returned.
| bool IBTK::AppInitializer::dumpRestartData | ( | ) | const |
Return a boolean value indicating whether to write restart data.
| int IBTK::AppInitializer::getRestartDumpInterval | ( | ) | const |
Return the restart dump interval. This is set in the Main database of the input file. This can be defined in the input file as restart_interval, restart_dump_interval, or restart_write_interval.
| std::string IBTK::AppInitializer::getRestartDumpDirectory | ( | ) | const |
Return the restart dump directory name. This is set in the Main database of the input file. This can be defined in the input file as restart_dump_dirname, restart_dirname, or restart_write_dirname.
| bool IBTK::AppInitializer::dumpPostProcessingData | ( | ) | const |
Return a boolean value indicating whether to write post processing data.
| int IBTK::AppInitializer::getPostProcessingDataDumpInterval | ( | ) | const |
Return the post processing data dump interval.
| std::string IBTK::AppInitializer::getPostProcessingDataDumpDirectory | ( | ) | const |
Return the post processing data dump directory name.
| bool IBTK::AppInitializer::dumpTimerData | ( | ) | const |
Return a boolean value indicating whether to write timer data.
| int IBTK::AppInitializer::getTimerDumpInterval | ( | ) | const |
Return the timer dump interval.
|
privatedelete |
| that | The value to assign to this object. |
|
private |
The input database.
|
private |
Restart settings.
|
private |
|
private |
|
private |
Visualization options.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Restart options.
|
private |
|
private |
Post-processing options.
|
private |
|
private |
Timer options.