18 #ifndef APPLICATION_BASE_HH_
19 #define APPLICATION_BASE_HH_
36 #include <boost/program_options/parsers.hpp>
37 #include <boost/program_options/variables_map.hpp>
38 #include <boost/program_options/options_description.hpp>
70 DECLARE_EXCEPTION( ExcSignal, <<
"[ Signal " << EI_Signal::val <<
" (" << EI_SignalName::val <<
") received! ]" );
96 <<
"Wrong format of the version specification: "
97 << EI_InputVersionStr::qval);
102 static const int exit_success = 0;
103 static const int exit_failure = 1;
104 static const int exit_output = 0;
132 void init(
int argc,
char ** argv);
147 void display_version();
168 void parse_cmd_line(
const int argc,
char ** argv);
177 void system_init(
MPI_Comm comm,
const string &log_filename);
183 #ifdef FLOW123D_HAVE_PETSC
184 static PetscErrorCode petscvfprintf(FILE *fd,
const char format[], va_list Argp);
190 void petsc_initialize(
int argc,
char ** argv);
195 int petcs_finalize();
200 void permon_initialize(
int argc,
char ** argv);
205 int permon_finalize();
217 string petsc_redirect_file_=
"";
DECLARE_EXCEPTION(ExcSignal,<< "[ Signal "<< EI_Signal::val<< " ("<< EI_SignalName::val<< ") received! ]")
TYPEDEF_ERR_INFO(EI_Signal, int)
static bool permon_initialized
string main_input_filename_
filename of main input file
static FILE * petsc_output_
File handler for redirecting PETSc output.
DECLARE_EXCEPTION(ExcVersionFormat,<< "Wrong format of the version specification: "<< EI_InputVersionStr::qval)
string program_arguments_desc_
Description of possible command line arguments.
DECLARE_INPUT_EXCEPTION(ExcNoRunOption,<< "No run option should be catched. Seeng this message is an error.\n")
bool use_profiler
If true, we do output of profiling information.
string profiler_path
location of the profiler report file
DECLARE_INPUT_EXCEPTION(ExcUnknownProblem,<< "Problem type not implemented.\n")
Input::Record root_record
root input record
HC_ExplicitSequential * problem_
Get version of program and other base data from rev_num.h and store them to map.
bool yaml_balance_output_
If true, preserves output of balance in YAML format.
static bool petsc_initialized
TYPEDEF_ERR_INFO(EI_InputVersionStr, string)
bool signal_handler_off_
Turn off signal handling useful to debug with valgrind.
Class for solution of steady or unsteady flow with sequentially coupled explicit transport.
manipulators::Array< T, Delim > format(T const &deduce, Delim delim=", ")