 |
| v0.14.0
|
◆ SetUpSchurImpl() [1/6]
◆ ~SetUpSchurImpl() [1/6]
virtual SetUpSchurImpl::~SetUpSchurImpl |
( |
| ) |
|
|
virtualdefault |
◆ SetUpSchurImpl() [2/6]
Definition at line 1639 of file plastic.cpp.
1645 "Is expected that schur matrix is not "
1646 "allocated. This is "
1647 "possible only is PC is set up twice");
◆ ~SetUpSchurImpl() [2/6]
virtual SetUpSchurImpl::~SetUpSchurImpl |
( |
| ) |
|
|
inlinevirtual |
◆ SetUpSchurImpl() [3/6]
◆ ~SetUpSchurImpl() [3/6]
virtual SetUpSchurImpl::~SetUpSchurImpl |
( |
| ) |
|
|
inlinevirtual |
◆ SetUpSchurImpl() [4/6]
◆ ~SetUpSchurImpl() [4/6]
virtual SetUpSchurImpl::~SetUpSchurImpl |
( |
| ) |
|
|
inlinevirtual |
◆ SetUpSchurImpl() [5/6]
Definition at line 924 of file elastic.cpp.
928 "Is expected that schur matrix is not allocated. This is "
929 "possible only is PC is set up twice");
◆ ~SetUpSchurImpl() [5/6]
virtual SetUpSchurImpl::~SetUpSchurImpl |
( |
| ) |
|
|
virtualdefault |
◆ SetUpSchurImpl() [6/6]
◆ ~SetUpSchurImpl() [6/6]
virtual SetUpSchurImpl::~SetUpSchurImpl |
( |
| ) |
|
|
inlinevirtual |
◆ createSubDM() [1/3]
◆ createSubDM() [2/3]
◆ createSubDM() [3/3]
Definition at line 1082 of file contact.cpp.
1086 auto create_dm = [&](
const char *name,
const char *
field_name,
auto dm_type) {
1088 auto create_dm_imp = [&]() {
1100 "Error in creating schurDM. It is possible that schurDM is "
1108 schurDM = create_dm(
"SCHUR",
"U",
"DMMOFEM_MG");
1109 blockDM = create_dm(
"BLOCK",
"SIGMA",
"DMMOFEM");
1113 auto get_nested_mat_data = [&](
auto schur_dm,
auto block_dm) {
1119 simple->getDomainFEName(),
1123 {
"U",
"U"}, {
"SIGMA",
"U"}, {
"U",
"SIGMA"}, {
"SIGMA",
"SIGMA"}
1131 {schur_dm, block_dm}, block_mat_data,
1133 {
"SIGMA"}, {
nullptr}, true
1143 "Only BLOCK_SCHUR is implemented");
◆ getA00Fields()
auto SetUpSchurImpl::getA00Fields |
( |
| ) |
|
|
inlineprivate |
Definition at line 60 of file SetUpSchurImpl.cpp.
61 std::vector<std::string> a00_field_list{
74 std::vector<boost::shared_ptr<Range>> range_list_ptr(a00_field_list.size(),
76 return std::make_pair(a00_field_list, range_list_ptr);
◆ getSchurFields()
auto SetUpSchurImpl::getSchurFields |
( |
| ) |
|
|
inlineprivate |
Definition at line 53 of file SetUpSchurImpl.cpp.
56 std::vector<boost::shared_ptr<Range>> dm_range_list{
nullptr,
nullptr};
57 return std::make_pair(schur_field_list, dm_range_list);
◆ postProc() [1/2]
MoFEMErrorCode SetUpSchurImpl::postProc |
( |
| ) |
|
◆ postProc() [2/2]
◆ preProc() [1/2]
MoFEMErrorCode SetUpSchurImpl::preProc |
( |
| ) |
|
◆ preProc() [2/2]
◆ setDiagonalPC() [1/2]
◆ setDiagonalPC() [2/2]
Definition at line 1233 of file contact.cpp.
1236 CHKERR PCFieldSplitSchurGetSubKSP(pc, PETSC_NULL, &subksp);
1237 auto get_pc = [](
auto ksp) {
1239 CHKERR KSPGetPC(ksp, &pc_raw);
1244 auto set_pc_p_mg = [](
auto dm,
auto pc,
auto S) {
1247 PetscBool same = PETSC_FALSE;
1248 PetscObjectTypeCompare((PetscObject)pc, PCMG, &same);
1252 CHKERR PCSetFromOptions(pc);
1259 CHKERR PetscFree(subksp);
◆ setEntities()
◆ setOperator() [1/3]
◆ setOperator() [2/3]
◆ setOperator() [3/3]
Definition at line 1149 of file contact.cpp.
1152 double eps_stab = 1e-4;
1158 using OpMassStab = B::OpMass<3, SPACE_DIM * SPACE_DIM>;
1168 pip->getOpBoundaryLhsPipeline().push_back(
1169 new OpMassStab(
"SIGMA",
"SIGMA",
1170 [eps_stab](
double,
double,
double) {
return eps_stab; }));
1171 pip->getOpBoundaryLhsPipeline().push_back(
1179 pip->getOpDomainLhsPipeline().push_back(
1186 auto pre_proc_schur_lhs_ptr = boost::make_shared<FEMethod>();
1187 auto post_proc_schur_lhs_ptr = boost::make_shared<FEMethod>();
1189 pre_proc_schur_lhs_ptr->preProcessHook = [
this]() {
1192 MOFEM_LOG(
"CONTACT", Sev::verbose) <<
"Lhs Assemble Begin";
1196 post_proc_schur_lhs_ptr->postProcessHook = [
this, ao_up,
1197 post_proc_schur_lhs_ptr]() {
1199 MOFEM_LOG(
"CONTACT", Sev::verbose) <<
"Lhs Assemble End";
1200 auto print_mat_norm = [
this](
auto a, std::string prefix) {
1203 CHKERR MatNorm(
a, NORM_FROBENIUS, &nrm);
1204 MOFEM_LOG(
"CONTACT", Sev::noisy) << prefix <<
" norm = " << nrm;
1207 CHKERR MatAssemblyBegin(
S, MAT_FINAL_ASSEMBLY);
1208 CHKERR MatAssemblyEnd(
S, MAT_FINAL_ASSEMBLY);
1210 mField, post_proc_schur_lhs_ptr, 1,
S, ao_up)();
1212 CHKERR print_mat_norm(
S,
"S");
1214 MOFEM_LOG(
"CONTACT", Sev::verbose) <<
"Lhs Assemble Finish";
1219 ts_ctx_ptr->getPreProcessIJacobian().push_front(pre_proc_schur_lhs_ptr);
1220 ts_ctx_ptr->getPostProcessIJacobian().push_back(post_proc_schur_lhs_ptr);
◆ setPC() [1/3]
◆ setPC() [2/3]
◆ setPC() [3/3]
Definition at line 1225 of file contact.cpp.
1228 CHKERR PCFieldSplitSetIS(pc, NULL, block_is);
1229 CHKERR PCFieldSplitSetSchurPre(pc, PC_FIELDSPLIT_SCHUR_PRE_USER,
S);
◆ setUp() [1/6]
◆ setUp() [2/6]
Implements SetUpSchur.
- Examples
- plastic.cpp, and test_broken_space.cpp.
Definition at line 532 of file test_broken_space.cpp.
537 CHKERR KSPSetFromOptions(ksp);
539 CHKERR KSPGetPC(ksp, &pc);
541 PetscBool is_pcfs = PETSC_FALSE;
542 PetscObjectTypeCompare((PetscObject)pc, PCFIELDSPLIT, &is_pcfs);
545 MOFEM_LOG(
"AT", Sev::inform) <<
"Setup Schur pc";
547 auto create_sub_dm = [&]() {
550 auto create_dm = [&](
552 std::string problem_name,
553 std::vector<std::string> fe_names,
554 std::vector<std::string> fields,
560 auto create_dm_imp = [&]() {
564 for (
auto fe : fe_names) {
568 for (
auto field : fields) {
577 "Error in creating schurDM. It is possible that schurDM is "
582 auto schur_dm = create_dm(
586 {
simple->getDomainFEName(),
simple->getSkeletonFEName()},
592 auto block_dm = create_dm(
596 {
simple->getDomainFEName(),
simple->getSkeletonFEName()},
602 return std::make_tuple(schur_dm, block_dm);
605 auto get_nested_mat_data = [&](
auto schur_dm,
auto block_dm) {
613 simple->getDomainFEName(),
617 {
"BROKEN",
"BROKEN"},
628 simple->getSkeletonFEName(),
632 {
"BROKEN",
"HYBRID"}, {
"HYBRID",
"BROKEN"}
644 {schur_dm, block_dm}, block_mat_data,
646 {
"BROKEN",
"U"}, {
nullptr,
nullptr}, true
651 auto set_ops = [&](
auto schur_dm) {
656 boost::shared_ptr<BlockStructure> block_data;
660 pip_mng->getOpDomainLhsPipeline().push_front(
662 pip_mng->getOpDomainLhsPipeline().push_back(
670 auto pre_proc_schur_lhs_ptr = boost::make_shared<FEMethod>();
671 auto post_proc_schur_lhs_ptr = boost::make_shared<FEMethod>();
673 pre_proc_schur_lhs_ptr->preProcessHook = [
this]() {
676 MOFEM_LOG(
"AT", Sev::verbose) <<
"Lhs Assemble Begin";
680 post_proc_schur_lhs_ptr->postProcessHook = [
this, ao_up,
681 post_proc_schur_lhs_ptr]() {
683 MOFEM_LOG(
"AT", Sev::verbose) <<
"Lhs Assemble End";
686 CHKERR MatAssemblyBegin(
S, MAT_FINAL_ASSEMBLY);
687 CHKERR MatAssemblyEnd(
S, MAT_FINAL_ASSEMBLY);
689 auto S_from_block =
matDuplicate(
S, MAT_SHARE_NONZERO_PATTERN);
692 S_from_block, {
"BROKEN",
"U"},
693 {nullptr, nullptr}, ao_up);
694 CHKERR MatAssemblyBegin(S_from_block, MAT_FINAL_ASSEMBLY);
695 CHKERR MatAssemblyEnd(S_from_block, MAT_FINAL_ASSEMBLY);
696 CHKERR MatAYPX(S_from_block, -1,
S, DIFFERENT_NONZERO_PATTERN);
698 CHKERR MatNorm(S_from_block, NORM_FROBENIUS, &norm);
699 MOFEM_LOG(
"AT", Sev::inform) <<
"Norm of difference: " << norm;
703 "Norm of difference between Schur and block matrix is larger "
708 {
"BROKEN",
"U"}, {nullptr, nullptr}, ao_up);
709 CHKERR MatAssemblyBegin(
S, MAT_FINAL_ASSEMBLY);
710 CHKERR MatAssemblyEnd(
S, MAT_FINAL_ASSEMBLY);
713 MOFEM_LOG(
"AT", Sev::verbose) <<
"Lhs Assemble Finish";
718 ksp_ctx_ptr->getPreProcSetOperators().push_front(pre_proc_schur_lhs_ptr);
719 ksp_ctx_ptr->getPostProcSetOperators().push_back(post_proc_schur_lhs_ptr);
724 auto set_pc = [&](
auto pc,
auto block_dm) {
726 auto block_is =
getDMSubData(block_dm)->getSmartRowIs();
727 CHKERR PCFieldSplitSetIS(pc, NULL, block_is);
728 CHKERR PCFieldSplitSetSchurPre(pc, PC_FIELDSPLIT_SCHUR_PRE_USER,
S);
732 auto set_diagonal_pc = [&](
auto pc,
auto schur_dm) {
742 CHKERR PCFieldSplitSchurGetSubKSP(pc, PETSC_NULL, &subksp);
743 auto get_pc = [](
auto ksp) {
745 CHKERR KSPGetPC(ksp, &pc_raw);
750 auto set_pc_p_mg = [&](
auto dm,
auto pc) {
754 PetscBool same = PETSC_FALSE;
755 PetscObjectTypeCompare((PetscObject)pc, PCMG, &same);
760 CHKERR PCSetFromOptions(pc);
765 CHKERR set_pc_p_mg(schur_dm, get_pc(subksp[1]));
771 auto [schur_dm, block_dm] = create_sub_dm();
773 auto nested_mat_data = get_nested_mat_data(schur_dm, block_dm);
777 CHKERR MatSetDM(
S, PETSC_NULL);
784 CHKERR set_pc(pc, block_dm);
786 CHKERR KSPGetDM(ksp, &solver_dm);
788 CHKERR DMSetMatType(solver_dm, MATSHELL);
792 CHKERR set_diagonal_pc(pc, schur_dm);
796 "PC is not set to PCFIELDSPLIT");
◆ setUp() [3/6]
◆ setUp() [4/6]
Implements SetUpSchur.
Definition at line 1007 of file contact.cpp.
1013 CHKERR TSGetSNES(solver, &snes);
1015 CHKERR SNESGetKSP(snes, &ksp);
1016 CHKERR KSPSetFromOptions(ksp);
1019 CHKERR KSPGetPC(ksp, &pc);
1021 PetscBool is_pcfs = PETSC_FALSE;
1022 PetscObjectTypeCompare((PetscObject)pc, PCFIELDSPLIT, &is_pcfs);
1025 MOFEM_LOG(
"CONTACT", Sev::inform) <<
"Setup Schur pc";
1030 "It is expected that Schur matrix is not allocated. This is "
1031 "possible only if PC is set up twice");
1043 CHKERR TSGetDM(solver, &solver_dm);
1044 CHKERR DMSetMatType(solver_dm, MATSHELL);
1051 auto swap_assemble = [](TS ts, PetscReal
t,
Vec u,
Vec u_t, PetscReal
a,
1052 Mat
A, Mat B,
void *ctx) {
1055 CHKERR TSSetIJacobian(solver,
A,
P, swap_assemble, ts_ctx_ptr.get());
1057 auto swap_assemble = [](TS ts, PetscReal
t,
Vec u,
Vec u_t,
Vec utt,
1058 PetscReal
a, PetscReal aa, Mat
A, Mat B,
1062 CHKERR TSSetI2Jacobian(solver,
A,
P, swap_assemble, ts_ctx_ptr.get());
1073 MOFEM_LOG(
"CONTACT", Sev::inform) <<
"No Schur PC";
◆ setUp() [5/6]
Implements SetUpSchur.
Definition at line 1665 of file plastic.cpp.
1671 CHKERR TSGetSNES(solver, &snes);
1673 CHKERR SNESGetKSP(snes, &ksp);
1674 CHKERR KSPSetFromOptions(ksp);
1677 CHKERR KSPGetPC(ksp, &pc);
1678 PetscBool is_pcfs = PETSC_FALSE;
1679 PetscObjectTypeCompare((PetscObject)pc, PCFIELDSPLIT, &is_pcfs);
1683 "Is expected that schur matrix is not "
1684 "allocated. This is "
1685 "possible only is PC is set up twice");
1693 CHKERR TSGetDM(solver, &solver_dm);
1694 CHKERR DMSetMatType(solver_dm, MATSHELL);
1701 auto swap_assemble = [](TS ts, PetscReal
t,
Vec u,
Vec u_t, PetscReal
a,
1702 Mat
A, Mat B,
void *ctx) {
1705 CHKERR TSSetIJacobian(solver,
A,
P, swap_assemble, ts_ctx_ptr.get());
1707 auto swap_assemble = [](TS ts, PetscReal
t,
Vec u,
Vec u_t,
Vec utt,
1708 PetscReal
a, PetscReal aa, Mat
A, Mat B,
1712 CHKERR TSSetI2Jacobian(solver,
A,
P, swap_assemble, ts_ctx_ptr.get());
1716 auto set_ops = [&]() {
1722 pip_mng->getOpBoundaryLhsPipeline().push_front(
1726 {
"EP",
"TAU"}, {
nullptr,
nullptr},
aoSchur,
S,
false, false
1730 pip_mng->getOpDomainLhsPipeline().push_front(
1734 {
"EP",
"TAU"}, {
nullptr,
nullptr},
aoSchur,
S,
false, false
1739 double eps_stab = 1e-4;
1745 using OpMassStab = B::OpMass<3, SPACE_DIM * SPACE_DIM>;
1748 pip_mng->getOpBoundaryLhsPipeline().push_front(
1750 pip_mng->getOpBoundaryLhsPipeline().push_back(
1751 new OpMassStab(
"SIGMA",
"SIGMA", [eps_stab](
double,
double,
double) {
1756 {
"SIGMA",
"EP",
"TAU"}, {
nullptr,
nullptr,
nullptr},
aoSchur,
S,
1761 pip_mng->getOpDomainLhsPipeline().push_front(
1765 {
"SIGMA",
"EP",
"TAU"}, {
nullptr,
nullptr,
nullptr},
aoSchur,
S,
1769 #endif // ADD_CONTACT
1773 auto set_assemble_elems = [&]() {
1775 auto schur_asmb_pre_proc = boost::make_shared<FEMethod>();
1776 schur_asmb_pre_proc->preProcessHook = [
this]() {
1779 MOFEM_LOG(
"TIMER", Sev::verbose) <<
"Lhs Assemble Begin";
1782 auto schur_asmb_post_proc = boost::make_shared<FEMethod>();
1784 schur_asmb_post_proc->postProcessHook = [
this, schur_asmb_post_proc]() {
1786 MOFEM_LOG(
"TIMER", Sev::verbose) <<
"Lhs Assemble End";
1789 CHKERR MatAssemblyBegin(
S, MAT_FINAL_ASSEMBLY);
1790 CHKERR MatAssemblyEnd(
S, MAT_FINAL_ASSEMBLY);
1797 ts_ctx_ptr->getPreProcessIJacobian().push_front(schur_asmb_pre_proc);
1798 ts_ctx_ptr->getPostProcessIJacobian().push_front(schur_asmb_post_proc);
1802 auto set_pc = [&]() {
1805 CHKERR PCFieldSplitSetSchurPre(pc, PC_FIELDSPLIT_SCHUR_PRE_USER,
S);
1809 auto set_diagonal_pc = [&]() {
1812 CHKERR PCFieldSplitSchurGetSubKSP(pc, PETSC_NULL, &subksp);
1813 auto get_pc = [](
auto ksp) {
1815 CHKERR KSPGetPC(ksp, &pc_raw);
1820 CHKERR PetscFree(subksp);
1826 CHKERR set_assemble_elems();
1830 CHKERR set_diagonal_pc();
1833 pip_mng->getOpBoundaryLhsPipeline().push_front(
1835 pip_mng->getOpBoundaryLhsPipeline().push_back(
1838 pip_mng->getOpDomainLhsPipeline().push_back(
◆ setUp() [6/6]
MoFEMErrorCode SetUpSchurImpl::setUp |
( |
TS |
ts | ) |
|
|
virtual |
◆ aoS
SmartPetscObj<AO> SetUpSchurImpl::aoS |
|
private |
◆ aoSchur
◆ blockDM
◆ epCorePtr
◆ fieldSplitIS
◆ mField
◆ piolaZeroDofsMarker
boost::shared_ptr<std::vector<unsigned char> > SetUpSchurImpl::piolaZeroDofsMarker |
|
private |
◆ piolaZeroDofsVec
boost::shared_ptr<std::vector<boost::weak_ptr<NumeredDofEntity> > > SetUpSchurImpl::piolaZeroDofsVec |
|
private |
◆ pMGPtr
◆ schurDM
◆ subDM
◆ subEnts
Range SetUpSchurImpl::subEnts |
|
private |
◆ volEnts
Range SetUpSchurImpl::volEnts |
|
private |
The documentation for this struct was generated from the following files:
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
MoFEMErrorCode DMMoFEMGetBlocMatData(DM dm, boost::shared_ptr< BlockStructure > &)
Get data for block mat.
auto createAOMappingIS(IS isapp, IS ispetsc)
Creates an application mapping using two index sets.
PetscErrorCode DMMoFEMAddSubFieldCol(DM dm, const char field_name[])
SmartPetscObj< AO > aoSchur
const std::string spatialL2Disp
Specialization for DisplacementCubitBcData.
virtual MPI_Comm & get_comm() const =0
EshelbianCore * epCorePtr
boost::shared_ptr< PCMGSetUpViaApproxOrdersCtx > createPCMGSetUpViaApproxOrdersCtx(DM dm, Mat A, bool use_shell_mat)
createPCMGSetUpViaApproxOrdersCtx
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
PetscErrorCode DMMoFEMSetSquareProblem(DM dm, PetscBool square_problem)
set squared problem
auto getDMKspCtx(DM dm)
Get KSP context data structure used by DM.
MoFEMErrorCode setPC(PC pc)
PipelineManager interface.
PetscErrorCode TsSetI2Jacobian(TS ts, PetscReal t, Vec u, Vec u_t, Vec u_tt, PetscReal a, PetscReal aa, Mat A, Mat B, void *ctx)
Calculation Jacobian for second order PDE in time.
Simple interface for fast problem set-up.
auto getDMSubData(DM dm)
Get sub problem data structure.
SmartPetscObj< DM > schurDM
MoFEMErrorCode createSubDM()
SmartPetscObj< DM > subDM
field split sub dm
auto createDMMatrix(DM dm)
Get smart matrix from DM.
PetscErrorCode DMMoFEMAddElement(DM dm, std::string fe_name)
add element to dm
auto createDMBlockMat(DM dm)
const std::string contactDisp
SmartPetscObj< DM > blockDM
OpSchurAssembleBase * createOpSchurAssembleEnd(std::vector< std::string > fields_name, std::vector< boost::shared_ptr< Range >> field_ents, SmartPetscObj< AO > ao, SmartPetscObj< Mat > schur, bool sym_schur, bool symm_op)
Construct a new Op Schur Assemble End object.
constexpr AssemblyType AT
#define CHKERR
Inline error check.
virtual moab::Interface & get_moab()=0
auto createDM(MPI_Comm comm, const std::string dm_type_name)
Creates smart DM object.
SmartPetscObj< IS > fieldSplitIS
IS for split Schur block.
const std::string rotAxis
auto createDMHybridisedL2Matrix(DM dm)
Get smart hybridised L2 matrix from DM.
PetscBool is_quasi_static
void simple(double P1[], double P2[], double P3[], double c[], const int N)
#define NBEDGE_L2(P)
Number of base functions on edge from L2 space.
PetscErrorCode DMMoFEMCreateSubDM(DM subdm, DM dm, const char problem_name[])
Must be called by user to set Sub DM MoFEM data structures.
MoFEM::Interface & mField
OpSchurAssembleBase * createOpSchurAssembleBegin()
auto createDMNestSchurMat(DM dm)
PetscErrorCode TsSetIJacobian(TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a, Mat A, Mat B, void *ctx)
Set function evaluating jacobian in TS solver.
constexpr int SPACE_DIM
[Define dimension]
MoFEMErrorCode setOperator()
SmartPetscObj< Mat > matDuplicate(Mat mat, MatDuplicateOption op)
constexpr double t
plate stiffness
const std::string hybridSpatialDisp
const std::string stretchTensor
MoFEMErrorCode assembleBlockMatSchur(MoFEM::Interface &m_field, Mat B, Mat S, std::vector< std::string > fields_name, std::vector< boost::shared_ptr< Range >> field_ents, SmartPetscObj< AO > ao)
Assemble Schur matrix.
constexpr auto field_name
MoFEMErrorCode setSchurA00MatSolvePC(SmartPetscObj< PC > pc)
Set PC for A00 block.
#define MOFEM_LOG(channel, severity)
Log.
const std::string bubbleField
#define NBFACETRI_L2(P)
Number of base functions on triangle for L2 space.
boost::shared_ptr< NestSchurData > createSchurNestedMatrixStruture(std::pair< SmartPetscObj< DM >, SmartPetscObj< DM >> dms, boost::shared_ptr< BlockStructure > block_mat_data_ptr, std::vector< std::string > fields_names, std::vector< boost::shared_ptr< Range >> field_ents, bool add_preconditioner_block)
Get the Schur Nest Mat Array object.
const FTensor::Tensor2< T, Dim, Dim > Vec
@ MOFEM_DATA_INCONSISTENCY
const std::string piolaStress
@ MOFEM_ATOM_TEST_INVALID
MoFEMErrorCode DMMoFEMSetNestSchurData(DM dm, boost::shared_ptr< NestSchurData >)
boost::shared_ptr< BlockStructure > createBlockMatStructure(DM dm, SchurFEOpsFEandFields schur_fe_op_vec)
Create a Mat Diag Blocks object.
MoFEMErrorCode PCMGSetUpViaApproxOrders(PC pc, boost::shared_ptr< PCMGSetUpViaApproxOrdersCtx > ctx, int verb)
Function build MG structure.
PetscErrorCode PetscOptionsGetScalar(PetscOptions *, const char pre[], const char name[], PetscScalar *dval, PetscBool *set)
PetscErrorCode DMMoFEMAddSubFieldRow(DM dm, const char field_name[])
intrusive_ptr for managing petsc objects
MoFEMErrorCode setDiagonalPC(PC pc)
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
auto getDMTsCtx(DM dm)
Get TS context data structure used by DM.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...