18 #ifndef APPLICATION_BASE_HH_ 19 #define APPLICATION_BASE_HH_ 30 #include <boost/exception/info.hpp> 45 DECLARE_EXCEPTION( ExcSignal, <<
"[ Signal " << EI_Signal::val <<
" (" << EI_SignalName::val <<
") received! ]" );
72 void init(
int argc,
char ** argv);
79 virtual void run() = 0;
82 static const int exit_success = 0;
83 static const int exit_failure = 1;
84 static const int exit_output = 0;
103 void system_init(
MPI_Comm comm,
const string &log_filename);
110 virtual void parse_cmd_line(
const int argc,
char ** argv) = 0;
115 #ifdef FLOW123D_HAVE_PETSC 116 static PetscErrorCode petscvfprintf(FILE *fd,
const char format[], va_list Argp);
122 void petsc_initialize(
int argc,
char ** argv);
127 int petcs_finalize();
138 string petsc_redirect_file_=
"";
static bool petsc_initialized
std::string format(CStringRef format_str, ArgList args)
static FILE * petsc_output_
File handler for redirecting PETSc output.
bool signal_handler_off_
Turn off signal handling useful to debug with valgrind.
TYPEDEF_ERR_INFO(EI_Signal, int)
DECLARE_EXCEPTION(ExcSignal,<< "[ Signal "<< EI_Signal::val<< " ("<< EI_SignalName::val<< ") received! ]")