MoFEMErroCode doWork() {
MoFEMFunctionBeginHot;
if(2+2!=4) {
SETERRQ(PETSC_COMM_SELF,MOFEM_IMPOSIBLE_CASE,"Huston we have a problem");
}
MoFEMFunctionReturnHot(0);
}
MoFEMErroCode doWork() {
MoFEMFunctionBegin;
// some code
CHKERR funDoSomathig(); /// !!!! <<< LOOK HER HOW ERRROR CAN BE HANDLED
// more code
MoFEMFunctionReturn(0);
}
MoFEMErrorCode merr = fun_mofem(); CHKERRG(merr);
PetscErrorCode ierr = fun_petsc(); CHKERRG(ierr);
moab::ErrorCode rval = fun_moab(); CHKERRG(rval);
CHKERR fun_mofem();
CHKERR fun_petsc();
CHKERR fun_moab();
ierr = PetscOptionsEnd();CHKERRQ(ierr);
/Users/ignathanas/mofem_installation/mofem-cephas/mofem/users_modules/basic_finite_elements/simple_elasticity/simple_elasticity.cpp:420:12: error:
expression is not assignable
CHKERR PetscOptionsEnd();
~~~~~~~^~~~~~~~~~~~~~~~~
/Users/ignathanas/mofem_installation/petsc/include/petscoptions.h:213:38: note: expanded from macro 'PetscOptionsEnd'
#define PetscOptionsEnd() _5_ierr = PetscOptionsEnd_Private(PetscOptionsObject);CHKERRQ(_5_ierr);}} while (0)
ierr = PetscOptionsEnd();
CHKERRQ(ierr);
[0]MoFEM ERROR: --------------------- MoFEM Error Message ---------------------------------------------------
[0]MoFEM ERROR: MoFEM version 0.6.8 (MOAB 4.9.3pre Petsc Release Version 3.7.4, unknown )
[0]MoFEM ERROR: MoFEM git commit id 56cc2cb82a35fe3534f2718ec88ca9c14e093bbc
[0]MoFEM ERROR: See http://mofem.eng.gla.ac.uk/mofem/html/guidelines_bug_reporting.html for bug reporting.
[0]MoFEM ERROR: See http://mofem.eng.gla.ac.uk/mofem/html/faq_and_bugs.html for trouble shooting.
[0]MoFEM ERROR: Vertex of arc-length field not found
[0]MoFEM ERROR: #1 buildArcLengthField() line 948 in /Users/likask/MyBuild/um_opt/users_modules/fracture_mechanics/src/impl/CrackPropagation.cpp
[0]MoFEM ERROR: #2 buildProblemFields() line 5409 in /Users/likask/MyBuild/um_opt/users_modules/fracture_mechanics/src/impl/CrackPropagation.cpp
[0]MoFEM ERROR: #3 createProblemDataStructures() line 5477 in /Users/likask/MyBuild/um_opt/users_modules/fracture_mechanics/src/impl/CrackPropagation.cpp
[0]MoFEM ERROR: #4 main() line 157 in /Users/likask/MyBuild/um_opt/users_modules/fracture_mechanics/crack_propagation.cpp
#PETSc Option Table entries:
-arc_alpha 0.1
-arc_beta 0
-arc_length_ksp_atol 1e-12
-arc_length_ksp_max_it 200
-arc_length_ksp_rtol 1e-6
-arc_length_ksp_type fgmres
-arc_s 1e-3
-elastic_ksp_atol 1e-12
-elastic_ksp_converged_reason
-elastic_ksp_max_it 100
-elastic_ksp_monitor
-elastic_ksp_rtol 1e-12
-elastic_ksp_stol 0
-elastic_ksp_type fgmres
-elastic_mg_coarse_ksp_type gmres
-elastic_mg_coarse_pc_factor_mat_solver_package mumps
-elastic_mg_coarse_pc_type lu
-elastic_pc_mg_log
-elastic_pc_mg_smoothdown 5
-elastic_pc_mg_smoothup 5
-elastic_pc_mg_type multiplicative
-elastic_pc_type mg
-elastic_snes_atol 1e-8
-elastic_snes_converged_reason
-elastic_snes_linesearch_type basic
-elastic_snes_max_fail 100
-elastic_snes_max_linear_solve_fail 100
-elastic_snes_monitor
-elastic_snes_rtol 1e-8
#End of PETSc Option Table entries
[0]MoFEM ERROR: -- MoFEM End of Error Message -- send entire error message to mofem-group@googlegroups.com --