Flow123d  jenkins-Flow123d-linux-release-multijob-198
Public Member Functions | Static Public Attributes | Protected 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

 Application (int argc, char **argv)
 Application constructor. More...
 
void display_version ()
 
Input::Record read_input ()
 
virtual ~Application ()
 Destructor. More...
 
- Public Member Functions inherited from ApplicationBase
void init (int argc, char **argv)
 

Static Public Attributes

static Input::Type::Record input_type
 Root of the Input::Type tree. Description of whole input structure. More...
 
- 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 Member Functions

virtual void run ()
 
virtual void after_run ()
 
virtual void parse_cmd_line (const int argc, char **argv)
 
void split_path (const string &path, string &directory, string &file_name)
 
- Protected Member Functions inherited from ApplicationBase
 ApplicationBase (int argc, char **argv)
 
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 Attributes

string main_input_dir_
 directory of main input file (used to resolve relative paths of other input files) More...
 
string main_input_filename_
 filename of main input file More...
 
int passed_argc_
 
char ** passed_argv_
 
string program_arguments_desc_
 Description of possible command line arguments. More...
 
bool use_profiler
 If true, we do output of profiling information. More...
 
Input::Record root_record
 root input record More...
 

Additional Inherited Members

- Protected Attributes inherited from ApplicationBase
string log_filename_
 
string petsc_redirect_file_ =""
 
- Static Protected Attributes inherited from ApplicationBase
static FILE * petsc_output_ =NULL
 File handler for redirecting PETSc output. More...
 

Detailed Description

Definition at line 42 of file main.h.

Constructor & Destructor Documentation

Application::Application ( int  argc,
char **  argv 
)

Application constructor.

Definition at line 80 of file main.cc.

Application::~Application ( )
virtual

Destructor.

Definition at line 323 of file main.cc.

Member Function Documentation

void Application::after_run ( )
protectedvirtual

Check pause_after_run flag defined in input file.

Reimplemented from ApplicationBase.

Definition at line 313 of file main.cc.

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:

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

Reimplemented from ApplicationBase.

Definition at line 160 of file main.cc.

Input::Record Application::read_input ( )

Read main input file

Returns accessor to the root Record.

Definition at line 132 of file main.cc.

Here is the caller graph for this function:

void Application::run ( )
protectedvirtual

Run application.

Read input and solve problem.

Implements ApplicationBase.

Definition at line 278 of file main.cc.

void Application::split_path ( const string &  path,
string &  directory,
string &  file_name 
)
protected

Split path to directory (part up to last DIR_SEPARATOR excluded) and filename. Directory is set to "." if no DIR_SEPARATOR is found.

Definition at line 97 of file main.cc.

Here is the caller graph for this function:

Member Data Documentation

it::Record Application::input_type
static
Initial value:
= it::Record("Root", "Root record of JSON input for Flow123d.")
"Simulation problem to be solved.")
.declare_key("pause_after_run", it::Bool(), it::Default("false"),
"If true, the program will wait for key press before it terminates.")

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

Definition at line 45 of file main.h.

string Application::main_input_dir_
private

directory of main input file (used to resolve relative paths of other input files)

Definition at line 98 of file main.h.

string Application::main_input_filename_
private

filename of main input file

Definition at line 100 of file main.h.

int Application::passed_argc_
private

Definition at line 102 of file main.h.

char** Application::passed_argv_
private

Definition at line 103 of file main.h.

string Application::program_arguments_desc_
private

Description of possible command line arguments.

Definition at line 106 of file main.h.

Input::Record Application::root_record
private

root input record

Definition at line 112 of file main.h.

bool Application::use_profiler
private

If true, we do output of profiling information.

Definition at line 109 of file main.h.


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