Flow123d  JS_before_hm-2198-g122e1f2e2
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Application Class Reference

#include <main.h>

Inheritance diagram for Application:
Inheritance graph
[legend]
Collaboration diagram for Application:
Collaboration graph
[legend]

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")
 
 Application (const std::string &python_path)
 Application constructor. More...
 
void display_version ()
 
Input::Record read_input ()
 
void run () override
 
void terminate ()
 
virtual ~Application ()
 Destructor. More...
 
- Public Member Functions inherited from ApplicationBase
void init (int argc, char **argv)
 

Static Public Member Functions

static Input::Type::Recordget_input_type ()
 Root of the Input::Type tree. Description of whole input structure. More...
 

Protected Member Functions

void after_run ()
 
virtual void parse_cmd_line (const int argc, char **argv)
 
- Protected Member Functions inherited from ApplicationBase
 ApplicationBase ()
 
virtual ~ApplicationBase ()
 Destructor. More...
 
void system_init (MPI_Comm comm, const string &log_filename)
 
void petsc_initialize (int argc, char **argv)
 
int petcs_finalize ()
 

Private Member Functions

Input::Type::RevNumData get_rev_num_data ()
 Get version of program and other base data from rev_num.h and store them to map. More...
 

Private Attributes

HC_ExplicitSequentialproblem_
 Main Flow123d problem. 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...
 

Additional Inherited Members

- Static Public Attributes inherited from ApplicationBase
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
 
- Protected Attributes inherited from ApplicationBase
string log_filename_
 
string petsc_redirect_file_ =""
 
bool signal_handler_off_
 Turn off signal handling useful to debug with valgrind. More...
 
- Static Protected Attributes inherited from ApplicationBase
static FILE * petsc_output_ =NULL
 File handler for redirecting PETSc output. More...
 

Detailed Description

Definition at line 35 of file main.h.

Constructor & Destructor Documentation

◆ Application()

Application::Application ( const std::string &  python_path)

Application constructor.

Definition at line 80 of file main.cc.

◆ ~Application()

Application::~Application ( )
virtual

Destructor.

Definition at line 394 of file main.cc.

Member Function Documentation

◆ after_run()

void Application::after_run ( )
protected

Check pause_after_run flag defined in input file.

Definition at line 366 of file main.cc.

Here is the caller graph for this function:

◆ DECLARE_EXCEPTION()

Application::DECLARE_EXCEPTION ( ExcVersionFormat  ,
<< "Wrong format of the version specification: "<< EI_InputVersionStr::qval   
)

◆ DECLARE_INPUT_EXCEPTION()

Application::DECLARE_INPUT_EXCEPTION ( ExcUnknownProblem  ,
<< "Problem type not implemented.\n"   
)

◆ display_version()

void Application::display_version ( )

Displays program version and build info. Pass version information to Profiler.

TODO: Split these two functionalities.

Definition at line 111 of file main.cc.

Here is the caller graph for this function:

◆ get_input_type()

it::Record & Application::get_input_type ( )
static

Root of the Input::Type tree. Description of whole input structure.

Definition at line 62 of file main.cc.

Here is the caller graph for this function:

◆ get_rev_num_data()

Input::Type::RevNumData Application::get_rev_num_data ( )
private

Get version of program and other base data from rev_num.h and store them to map.

Definition at line 99 of file main.cc.

Here is the caller graph for this function:

◆ parse_cmd_line()

void Application::parse_cmd_line ( const int  argc,
char **  argv 
)
protectedvirtual

Parse command line parameters.

Parameters
[in]argccommand line argument count
[in]argvcommand line arguments

Implements ApplicationBase.

Definition at line 147 of file main.cc.

◆ read_input()

Input::Record Application::read_input ( )

Read main input file

Returns accessor to the root Record.

Definition at line 129 of file main.cc.

Here is the caller graph for this function:

◆ run()

void Application::run ( )
overridevirtual

Run application.

Read input and solve problem.

Implements ApplicationBase.

Definition at line 304 of file main.cc.

Here is the caller graph for this function:

◆ terminate()

void Application::terminate ( )

Terminate all MPI processes if exception is thrown.

Definition at line 376 of file main.cc.

Here is the caller graph for this function:

◆ TYPEDEF_ERR_INFO()

Application::TYPEDEF_ERR_INFO ( EI_InputVersionStr  ,
string   
)

Member Data Documentation

◆ main_input_filename_

string Application::main_input_filename_
private

filename of main input file

Definition at line 104 of file main.h.

◆ problem_

HC_ExplicitSequential* Application::problem_
private

Main Flow123d problem.

Definition at line 101 of file main.h.

◆ profiler_path

string Application::profiler_path
private

location of the profiler report file

Definition at line 116 of file main.h.

◆ program_arguments_desc_

string Application::program_arguments_desc_
private

Description of possible command line arguments.

Definition at line 110 of file main.h.

◆ root_record

Input::Record Application::root_record
private

root input record

Definition at line 122 of file main.h.

◆ use_profiler

bool Application::use_profiler
private

If true, we do output of profiling information.

Definition at line 113 of file main.h.

◆ yaml_balance_output_

bool Application::yaml_balance_output_
private

If true, preserves output of balance in YAML format.

Definition at line 119 of file main.h.


The documentation for this class was generated from the following files: