Flow123d
3.9.0-9a54d804e
|
#include <application_base.hh>
Public Member Functions | |
void | init (int argc, char **argv) |
virtual void | run ()=0 |
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 | |
ApplicationBase () | |
virtual | ~ApplicationBase () |
Destructor. More... | |
void | system_init (MPI_Comm comm, const string &log_filename) |
virtual void | parse_cmd_line (const int argc, char **argv)=0 |
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... | |
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 65 of file application_base.hh.
|
protected |
Constructor
Construction is done in init method. We need to call virtual methods during construction.
Definition at line 75 of file application_base.cc.
|
protectedvirtual |
Destructor.
Definition at line 231 of file application_base.cc.
void ApplicationBase::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 214 of file application_base.cc.
|
protectedpure virtual |
Parse command line parameters before Flow123D initialization.
Method must be implemented in derived class.
Implemented in Application.
|
protected |
Finalize PERMON. If finalization failed return nonzero value.
Definition at line 196 of file application_base.cc.
|
protected |
Initialize PERMON.
Definition at line 190 of file application_base.cc.
|
protected |
Finalize PETSC. If finalization failed return nonzero value.
Definition at line 170 of file application_base.cc.
|
protected |
Implement printf function for PETSc with support for redirecting. Initialize PETSC.
Definition at line 145 of file application_base.cc.
|
pure virtual |
|
protected |
Read system parameters, open log.
Definition at line 84 of file application_base.cc.
|
static |
Definition at line 83 of file application_base.hh.
|
static |
Definition at line 84 of file application_base.hh.
|
static |
Return codes of application.
Definition at line 82 of file application_base.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 145 of file application_base.hh.
|
static |
Definition at line 87 of file application_base.hh.
|
static |
Definition at line 86 of file application_base.hh.
|
staticprotected |
File handler for redirecting PETSc output.
Definition at line 152 of file application_base.hh.
|
protected |
Optional file name for output of PETSc parameters. Has to be set in parse_cmd_line()
Definition at line 149 of file application_base.hh.
|
protected |
Turn off signal handling useful to debug with valgrind.
Definition at line 155 of file application_base.hh.