18 #ifndef APPLICATION_BASE_HH_
19 #define APPLICATION_BASE_HH_
29 #ifdef FLOW123D_HAVE_PETSC
38 DECLARE_EXCEPTION( ExcSignal, <<
"[ Signal " << EI_Signal::val <<
" (" << EI_SignalName::val <<
") received! ]" );
65 void init(
int argc,
char ** argv);
68 static const int exit_success = 0;
69 static const int exit_failure = 1;
70 static const int exit_output = 0;
91 virtual void run() = 0;
96 void system_init(
MPI_Comm comm,
const string &log_filename);
108 #ifdef FLOW123D_HAVE_PETSC
109 static PetscErrorCode petscvfprintf(FILE *fd,
const char format[], va_list Argp);
115 void petsc_initialize(
int argc,
char ** argv);
120 int petcs_finalize();
138 string petsc_redirect_file_=
"";
virtual void parse_cmd_line(const int argc, char **argv)
#define DECLARE_EXCEPTION(ExcName, Format)
Macro for simple definition of exceptions.
static bool petsc_initialized
std::string format(CStringRef format_str, ArgList args)
static FILE * petsc_output_
File handler for redirecting PETSc output.
Global macros to enhance readability and debugging, general constants.
#define TYPEDEF_ERR_INFO(EI_Type, Type)
Macro to simplify declaration of error_info types.
bool signal_handler_off_
Turn off signal handling useful to debug with valgrind.