379 "-pc_factor_mat_solver_type mumps \n"
380 "-mat_mumps_icntl_20 0 \n"
384 if (!
static_cast<bool>(ifstream(
param_file))) {
385 std::ofstream file(
param_file.c_str(), std::ios::ate);
386 if (file.is_open()) {
399 MPI_Comm_rank(PETSC_COMM_WORLD, &rank);
402 PetscBool flg = PETSC_TRUE;
406 if (flg != PETSC_TRUE) {
408 "*** ERROR -my_file (MESH FILE NEEDED)");
424 PetscPrintf(PETSC_COMM_WORLD,
425 "Read meshsets add added meshsets for bc.cfg\n");
427 PetscPrintf(PETSC_COMM_WORLD,
"%s",
428 static_cast<std::ostringstream &
>(
429 std::ostringstream().seekp(0) << *it << endl)
447 if (flg != PETSC_TRUE) {
459 CHKERR ufe.addFiniteElements(
"FLUXES",
"VALUES");
461 CHKERR ufe.addBoundaryElements(ref_level);
462 CHKERR ufe.buildProblem(ref_level);
463 CHKERR ufe.createMatrices();
464 CHKERR ufe.solveLinearProblem();
465 CHKERR ufe.calculateResidual();
466 CHKERR ufe.evaluateError();
467 CHKERR ufe.destroyMatrices();
468 CHKERR ufe.postProc(
"out_0.h5m");
477 for (
int ll = 1; ll != nb_levels; ll++) {
478 const int nb_levels = ll;
483 CHKERR ufe.addBoundaryElements(ref_level);
484 CHKERR ufe.buildProblem(ref_level);
485 CHKERR ufe.createMatrices();
486 CHKERR ufe.solveLinearProblem();
487 CHKERR ufe.calculateResidual();
488 CHKERR ufe.evaluateError();
489 CHKERR ufe.destroyMatrices();
491 static_cast<std::ostringstream &
>(std::ostringstream().seekp(0)
492 <<
"out_" << nb_levels <<
".h5m")
const std::string default_options
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
#define _IT_CUBITMESHSETS_FOR_LOOP_(MESHSET_MANAGER, IT)
Iterator that loops over all the Cubit MeshSets in a moFEM field.
map< int, BcFluxData > BcFluxMap
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)
DeprecatedCoreInterface Interface
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.
Deprecated interface functions.
Interface for managing meshsets containing materials and boundary conditions.
MoFEMErrorCode setMeshsetFromFile(const string file_name, const bool clean_file_options=true)
add blocksets reading config file
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
Application of mix transport data structure.