1087 {
1088
1089 const string default_options = "-ksp_type fgmres \n"
1090 "-pc_type lu \n"
1091 "-pc_factor_mat_solver_type mumps\n"
1092 "-mat_mumps_icntl_20 0\n"
1093 "-ksp_monitor \n"
1094 "-ksp_atol 1e-10 \n"
1095 "-ksp_rtol 1e-10 \n"
1096 "-snes_monitor \n"
1097 "-snes_type newtonls \n"
1098 "-snes_linesearch_type l2 \n"
1099 "-snes_linesearch_monitor \n"
1100 "-snes_max_it 16 \n"
1101 "-snes_atol 1e-8 \n"
1102 "-snes_rtol 1e-8 \n"
1103 "-snes_converged_reason \n";
1104
1105 string param_file = "param_file.petsc";
1106 if (!static_cast<bool>(ifstream(param_file))) {
1107 std::ofstream
file(param_file.c_str(), std::ios::ate);
1108 if (
file.is_open()) {
1109 file << default_options;
1111 }
1112 }
1114
1115 auto core_log = logging::core::get();
1116 core_log->add_sink(
1120
1121 try {
1122 moab::Core mb_instance;
1123 moab::Interface &moab = mb_instance;
1124
1126 CHKERR example.runProblem();
1127 }
1129
1131
1132 return 0;
1133}
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.