18 #ifndef APPLICATION_BASE_HH_
19 #define APPLICATION_BASE_HH_
29 #include <boost/program_options/parsers.hpp>
30 #include <boost/program_options/variables_map.hpp>
31 #include <boost/program_options/options_description.hpp>
58 DECLARE_EXCEPTION( ExcSignal, <<
"[ Signal " << EI_Signal::val <<
" (" << EI_SignalName::val <<
") received! ]" );
84 <<
"Wrong format of the version specification: "
85 << EI_InputVersionStr::qval);
90 static const int exit_success = 0;
91 static const int exit_failure = 1;
92 static const int exit_output = 0;
120 void init(
int argc,
char ** argv);
135 void display_version();
156 void parse_cmd_line(
const int argc,
char ** argv);
165 void system_init(
MPI_Comm comm,
const string &log_filename);
171 #ifdef FLOW123D_HAVE_PETSC
172 static PetscErrorCode petscvfprintf(FILE *fd,
const char format[], va_list Argp);
178 void petsc_initialize(
int argc,
char ** argv);
183 int petcs_finalize();
188 void permon_initialize(
int argc,
char ** argv);
193 int permon_finalize();
205 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=", ")