Flow123d
DF_patch_fe_data_tables-65e7202
|
#include <application.hh>
Public Member Functions | |
TYPEDEF_ERR_INFO (EI_InputVersionStr, string) | |
DECLARE_EXCEPTION (ExcVersionFormat,<< "Wrong format of the version specification: "<< EI_InputVersionStr::qval) | |
DECLARE_INPUT_EXCEPTION (ExcUnknownProblem,<< "Problem type not implemented.\n") | |
DECLARE_INPUT_EXCEPTION (ExcNoRunOption,<< "No run option should be catched. Seeng this message is an error.\n") | |
Application () | |
Input::Record | read_input () |
void | init (int argc, char **argv) |
void | run () |
void | display_version () |
~Application () | |
Destructor. More... | |
Static Public Member Functions | |
static Input::Type::Record & | get_input_type () |
Root of the Input::Type tree. Description of whole input structure. More... | |
Static Public Attributes | |
static const int | exit_success = 0 |
Return codes of application. More... | |
static const int | exit_failure = 1 |
static const int | exit_output = 0 |
static bool | petsc_initialized = false |
static bool | permon_initialized = false |
Protected Member Functions | |
void | after_run () |
void | parse_cmd_line (const int argc, char **argv) |
void | system_init (MPI_Comm comm, const string &log_filename) |
void | petsc_initialize (int argc, char **argv) |
int | petcs_finalize () |
void | permon_initialize (int argc, char **argv) |
int | permon_finalize () |
Protected Attributes | |
string | log_filename_ |
string | petsc_redirect_file_ ="" |
bool | signal_handler_off_ |
Turn off signal handling useful to debug with valgrind. More... | |
HC_ExplicitSequential * | problem_ |
Get version of program and other base data from rev_num.h and store them to map. More... | |
string | main_input_filename_ |
filename of main input file More... | |
string | program_arguments_desc_ |
Description of possible command line arguments. More... | |
bool | use_profiler |
If true, we do output of profiling information. More... | |
string | profiler_path |
location of the profiler report file More... | |
bool | yaml_balance_output_ |
If true, preserves output of balance in YAML format. More... | |
Input::Record | root_record |
root input record More... | |
Static Protected Attributes | |
static FILE * | petsc_output_ =NULL |
File handler for redirecting PETSc output. More... | |
Base virtual class of Flow123D application.
Contains base methods of application for initialization, run and finalization which is used in derived class.
Usage:
Definition at line 80 of file application.hh.
Application::Application | ( | ) |
Constructor
Construction is done in init method. We need to call virtual methods during construction.
Definition at line 76 of file application.cc.
Application::~Application | ( | ) |
Destructor.
Definition at line 611 of file application.cc.
|
protected |
Check pause_after_run flag defined in input file.
Definition at line 583 of file application.cc.
Application::DECLARE_EXCEPTION | ( | ExcVersionFormat | , |
<< "Wrong format of the version specification: "<< EI_InputVersionStr::qval | |||
) |
Application::DECLARE_INPUT_EXCEPTION | ( | ExcNoRunOption | , |
<< "No run option should be catched. Seeng this message is an error.\n" | |||
) |
Application::DECLARE_INPUT_EXCEPTION | ( | ExcUnknownProblem | , |
<< "Problem type not implemented.\n" | |||
) |
void Application::display_version | ( | ) |
Displays program version and build info. Pass version information to Profiler.
TODO: Split these two functionalities.
Definition at line 286 of file application.cc.
|
static |
Root of the Input::Type tree. Description of whole input structure.
Definition at line 264 of file application.cc.
void Application::init | ( | int | argc, |
char ** | argv | ||
) |
Contains basic structure of application (initialization, run and finalization). Method is call after constructor and allows to call virtual methods.
Definition at line 492 of file application.cc.
|
protected |
Parse command line parameters.
[in] | argc | command line argument count |
[in] | argv | command line arguments |
Definition at line 323 of file application.cc.
|
protected |
Finalize PERMON. If finalization failed return nonzero value.
Definition at line 213 of file application.cc.
|
protected |
Initialize PERMON.
Definition at line 207 of file application.cc.
|
protected |
Finalize PETSC. If finalization failed return nonzero value.
Definition at line 187 of file application.cc.
|
protected |
Implement printf function for PETSc with support for redirecting. Initialize PETSC.
Definition at line 162 of file application.cc.
Input::Record Application::read_input | ( | ) |
Read main input file
Returns accessor to the root Record.
Definition at line 305 of file application.cc.
void Application::run | ( | ) |
Run application.
Read input and solve problem.
Definition at line 521 of file application.cc.
|
protected |
Read system parameters, open log.
Definition at line 101 of file application.cc.
Application::TYPEDEF_ERR_INFO | ( | EI_InputVersionStr | , |
string | |||
) |
|
static |
Definition at line 91 of file application.hh.
|
static |
Definition at line 92 of file application.hh.
|
static |
Return codes of application.
Definition at line 90 of file application.hh.
|
protected |
Log file name argument - passed to system_init; "" means default, "\n" means no logging TODO: move whole system_init into Application, use singleton for some runtime global options for the Flow123d library.
Definition at line 201 of file application.hh.
|
protected |
filename of main input file
Definition at line 221 of file application.hh.
|
static |
Definition at line 95 of file application.hh.
|
static |
Definition at line 94 of file application.hh.
|
staticprotected |
File handler for redirecting PETSc output.
Definition at line 208 of file application.hh.
|
protected |
Optional file name for output of PETSc parameters. Has to be set in parse_cmd_line()
Definition at line 205 of file application.hh.
|
protected |
Get version of program and other base data from rev_num.h and store them to map.
Main Flow123d problem
Definition at line 218 of file application.hh.
|
protected |
location of the profiler report file
Definition at line 233 of file application.hh.
|
protected |
Description of possible command line arguments.
Definition at line 227 of file application.hh.
|
protected |
root input record
Definition at line 239 of file application.hh.
|
protected |
Turn off signal handling useful to debug with valgrind.
Definition at line 211 of file application.hh.
|
protected |
If true, we do output of profiling information.
Definition at line 230 of file application.hh.
|
protected |
If true, preserves output of balance in YAML format.
Definition at line 236 of file application.hh.