14 (SCHUR_ASSEMBLE) ? AssemblyType::SCHUR
15 : AssemblyType::PETSC;
18 IntegrationType::GAUSS;
46 std::pair<boost::shared_ptr<PostProcEle>,
47 boost::shared_ptr<SkinPostProcEle>>
52 std::array<double, SPACE_DIM> pass_field_eval_coords,
53 boost::shared_ptr<SetPtsData> pass_field_eval_data,
54 boost::shared_ptr<MatrixDouble> vec_field_ptr)
90 auto t_disp = getFTensor1FromMat<SPACE_DIM>(*
vecFieldPtr);
93 <<
"U_X: " << t_disp(0) <<
" U_Y: " << t_disp(1);
96 <<
"U_X: " << t_disp(0) <<
" U_Y: " << t_disp(1)
97 <<
" U_Z: " << t_disp(2);
102 auto make_vtk = [&]() {
108 boost::lexical_cast<std::string>(
ts_step) +
115 "out_skin_incomp_elasticity_" +
116 boost::lexical_cast<std::string>(
ts_step) +
".h5m");
121 auto print_max_min = [&](
auto &tuple,
const std::string msg) {
123 CHKERR VecScatterBegin(std::get<1>(tuple),
ts_u, std::get<0>(tuple),
124 INSERT_VALUES, SCATTER_FORWARD);
125 CHKERR VecScatterEnd(std::get<1>(tuple),
ts_u, std::get<0>(tuple),
126 INSERT_VALUES, SCATTER_FORWARD);
128 CHKERR VecMax(std::get<0>(tuple), PETSC_NULL, &max);
129 CHKERR VecMin(std::get<0>(tuple), PETSC_NULL, &min);
131 "%s time %3.4e min %3.4e max %3.4e", msg.c_str(),
ts_t, min,
166 return MatSetValues<AssemblyTypeSelector<AT>>(
167 op_ptr->
getKSPA(), row_data, col_data,
m, ADD_VALUES);
175 using DomainEleOp::DomainEleOp;
189 return MatSetValues<AssemblyTypeSelector<AT>>(
190 op_ptr->
getKSPB(), row_data, col_data,
m, ADD_VALUES);
198inline static double mu;
227 boost::shared_ptr<MatrixDouble> strain_ptr,
228 boost::shared_ptr<VectorDouble> pressure_ptr)
244 const size_t nb_gauss_pts = getGaussPts().size2();
246 stressPtr->resize((DIM * (DIM + 1)) / 2, nb_gauss_pts);
247 auto t_stress = getFTensor2SymmetricFromMat<DIM>(*(
stressPtr));
248 auto t_strain = getFTensor2SymmetricFromMat<DIM>(*(
strainPtr));
251 const double l_mu =
mU;
253 for (
auto gg = 0; gg != nb_gauss_pts; ++gg) {
255 t_stress(
i,
j) = t_pressure *
t_kd(
i,
j) + 2. * l_mu * t_strain(
i,
j);
300 enum bases { AINSWORTH, DEMKOWICZ, LASBASETOPT };
301 const char *list_bases[LASBASETOPT] = {
"ainsworth",
"demkowicz"};
302 PetscInt choice_base_value = AINSWORTH;
304 LASBASETOPT, &choice_base_value, PETSC_NULL);
307 switch (choice_base_value) {
310 MOFEM_LOG(
"INCOMP_ELASTICITY", Sev::inform)
311 <<
"Set AINSWORTH_LEGENDRE_BASE for displacements";
315 MOFEM_LOG(
"INCOMP_ELASTICITY", Sev::inform)
316 <<
"Set DEMKOWICZ_JACOBI_BASE for displacements";
351 auto project_ho_geometry = [&]() {
355 CHKERR project_ho_geometry();
364 auto get_options = [&]() {
371 MOFEM_LOG(
"INCOMP_ELASTICITY", Sev::inform)
373 MOFEM_LOG(
"INCOMP_ELASTICITY", Sev::inform)
377 const double lambda_denom =
397 auto time_scale = boost::make_shared<TimeScale>();
413 pipeline_mng->getOpBoundaryRhsPipeline(), {NOSPACE},
"GEOMETRY");
416 pipeline_mng->getOpBoundaryRhsPipeline(),
mField,
"U", {time_scale},
417 "FORCE", Sev::inform);
421 pipeline_mng->getOpDomainRhsPipeline(),
mField,
"U", {time_scale},
422 "BODY_FORCE", Sev::inform);
425 CHKERR bc_mng->removeBlockDOFsOnEntities(
simple->getProblemName(),
"REMOVE_X",
427 CHKERR bc_mng->removeBlockDOFsOnEntities(
simple->getProblemName(),
"REMOVE_Y",
429 CHKERR bc_mng->removeBlockDOFsOnEntities(
simple->getProblemName(),
"REMOVE_Z",
432 simple->getProblemName(),
"U");
445 auto integration_rule_vol = [](int, int,
int approx_order) {
449 auto add_domain_base_ops = [&](
auto &pip) {
456 auto add_domain_ops_lhs = [&](
auto &pip) {
474 auto mat_D_ptr = boost::make_shared<MatrixDouble>();
484 auto t_mat = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, 0>(*mat_D_ptr);
489 [](
const double,
const double,
const double)
constexpr {
return -1.; },
491 pip.push_back(
new OpGradSymTensorGrad(
"U",
"U", mat_D_ptr));
497 pip.push_back(
new OpMassPressure(
"P",
"P", get_lambda_reciprocal));
503 pip.push_back(
new OpMassPressureStab(
504 "P",
"P", [eps_stab](
double,
double,
double) {
return eps_stab; }));
509 auto add_domain_ops_rhs = [&](
auto &pip) {
524 auto pressure_ptr = boost::make_shared<VectorDouble>();
527 auto div_u_ptr = boost::make_shared<VectorDouble>();
531 auto grad_u_ptr = boost::make_shared<MatrixDouble>();
535 auto strain_ptr = boost::make_shared<MatrixDouble>();
546 pip.push_back(
new OpDomainGradTimesTensor(
"U", strain_ptr, get_four_mu));
548 pip.push_back(
new OpDivDeltaUTimesP(
"U", pressure_ptr, minus_one));
550 pip.push_back(
new OpBaseTimesScalarValues(
"P", div_u_ptr, minus_one));
556 pip.push_back(
new OpBaseTimesScalarValues(
"P", pressure_ptr,
557 get_lambda_reciprocal));
563 CHKERR add_domain_base_ops(pip_mng->getOpDomainLhsPipeline());
564 CHKERR add_domain_base_ops(pip_mng->getOpDomainRhsPipeline());
565 CHKERR add_domain_ops_lhs(pip_mng->getOpDomainLhsPipeline());
566 CHKERR add_domain_ops_rhs(pip_mng->getOpDomainRhsPipeline());
568 CHKERR pip_mng->setDomainRhsIntegrationRule(integration_rule_vol);
569 CHKERR pip_mng->setDomainLhsIntegrationRule(integration_rule_vol);
577 static boost::shared_ptr<SetUpSchur>
592 auto set_section_monitor = [&](
auto solver) {
595 CHKERR TSGetSNES(solver, &snes);
596 PetscViewerAndFormat *vf;
597 CHKERR PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD,
598 PETSC_VIEWER_DEFAULT, &vf);
601 (
MoFEMErrorCode(*)(SNES, PetscInt, PetscReal,
void *))SNESMonitorFields,
606 auto scatter_create = [&](
auto D,
auto coeff) {
608 CHKERR is_manager->isCreateProblemFieldAndRank(
simple->getProblemName(),
609 ROW,
"U", coeff, coeff, is);
611 CHKERR ISGetLocalSize(is, &loc_size);
615 CHKERR VecScatterCreate(
D, is,
v, PETSC_NULL, &scatter);
620 auto create_post_process_elements = [&]() {
621 auto pp_fe = boost::make_shared<PostProcEle>(
mField);
622 auto &pip = pp_fe->getOpPtrVector();
624 auto push_vol_ops = [
this](
auto &pip) {
632 auto push_vol_post_proc_ops = [
this](
auto &pp_fe,
auto &&
p) {
635 auto &pip = pp_fe->getOpPtrVector();
639 auto x_ptr = boost::make_shared<MatrixDouble>();
642 auto u_ptr = boost::make_shared<MatrixDouble>();
645 auto pressure_ptr = boost::make_shared<VectorDouble>();
648 auto div_u_ptr = boost::make_shared<VectorDouble>();
652 auto grad_u_ptr = boost::make_shared<MatrixDouble>();
656 auto strain_ptr = boost::make_shared<MatrixDouble>();
660 auto stress_ptr = boost::make_shared<MatrixDouble>();
662 mu, stress_ptr, strain_ptr, pressure_ptr));
668 pp_fe->getPostProcMesh(), pp_fe->getMapGaussPts(),
670 {{
"P", pressure_ptr}},
672 {{
"U", u_ptr}, {
"GEOMETRY", x_ptr}},
676 {{
"STRAIN", strain_ptr}, {
"STRESS", stress_ptr}}
685 auto vol_post_proc = [
this, push_vol_post_proc_ops, push_vol_ops]() {
686 PetscBool post_proc_vol = PETSC_FALSE;
688 &post_proc_vol, PETSC_NULL);
689 if (post_proc_vol == PETSC_FALSE)
690 return boost::shared_ptr<PostProcEle>();
691 auto pp_fe = boost::make_shared<PostProcEle>(
mField);
693 push_vol_post_proc_ops(pp_fe, push_vol_ops(pp_fe->getOpPtrVector())),
694 "push_vol_post_proc_ops");
698 auto skin_post_proc = [
this, push_vol_post_proc_ops, push_vol_ops]() {
699 PetscBool post_proc_skin = PETSC_TRUE;
701 &post_proc_skin, PETSC_NULL);
702 if (post_proc_skin == PETSC_FALSE)
703 return boost::shared_ptr<SkinPostProcEle>();
706 auto pp_fe = boost::make_shared<SkinPostProcEle>(
mField);
709 pp_fe->getOpPtrVector().push_back(op_side);
711 pp_fe, push_vol_ops(op_side->getOpPtrVector())),
712 "push_vol_post_proc_ops");
716 return std::make_pair(vol_post_proc(), skin_post_proc());
719 boost::shared_ptr<SetPtsData> field_eval_data;
720 boost::shared_ptr<MatrixDouble> vector_field_ptr;
722 std::array<double, SPACE_DIM> field_eval_coords;
725 field_eval_coords.data(), &coords_dim,
729 vector_field_ptr = boost::make_shared<MatrixDouble>();
734 field_eval_data,
simple->getDomainFEName());
737 field_eval_data,
simple->getDomainFEName());
740 field_eval_data->setEvalPoints(field_eval_coords.data(), 1);
741 auto no_rule = [](
int,
int,
int) {
return -1; };
742 auto field_eval_fe_ptr = field_eval_data->feMethodPtr.lock();
743 field_eval_fe_ptr->getRuleHook = no_rule;
744 field_eval_fe_ptr->getOpPtrVector().push_back(
748 auto set_time_monitor = [&](
auto dm,
auto solver) {
750 boost::shared_ptr<MonitorIncompressible> monitor_ptr(
752 create_post_process_elements(), uXScatter,
753 uYScatter, uZScatter, field_eval_coords,
754 field_eval_data, vector_field_ptr));
755 boost::shared_ptr<ForcesAndSourcesCore> null;
757 monitor_ptr, null, null);
761 auto set_essential_bc = [&]() {
765 auto pre_proc_ptr = boost::make_shared<FEMethod>();
766 auto post_proc_rhs_ptr = boost::make_shared<FEMethod>();
769 auto time_scale = boost::make_shared<TimeScale>();
772 mField, pre_proc_ptr, {time_scale},
false);
773 post_proc_rhs_ptr->postProcessHook =
776 ts_ctx_ptr->getPreProcessIFunction().push_front(pre_proc_ptr);
777 ts_ctx_ptr->getPreProcessIJacobian().push_front(pre_proc_ptr);
778 ts_ctx_ptr->getPostProcessIFunction().push_back(post_proc_rhs_ptr);
782 auto set_schur_pc = [&](
auto solver) {
784 CHKERR TSGetSNES(solver, &snes);
786 CHKERR SNESGetKSP(snes, &ksp);
788 CHKERR KSPGetPC(ksp, &pc);
789 PetscBool is_pcfs = PETSC_FALSE;
790 PetscObjectTypeCompare((PetscObject)pc, PCFIELDSPLIT, &is_pcfs);
791 boost::shared_ptr<SetUpSchur> schur_ptr;
800 auto pre_proc_schur_lhs_ptr = boost::make_shared<FEMethod>();
801 auto post_proc_schur_lhs_ptr = boost::make_shared<FEMethod>();
802 pre_proc_schur_lhs_ptr->preProcessHook = [pre_proc_schur_lhs_ptr]() {
804 MOFEM_LOG(
"INCOMP_ELASTICITY", Sev::verbose) <<
"Lhs Zero matrices";
805 CHKERR MatZeroEntries(pre_proc_schur_lhs_ptr->A);
806 CHKERR MatZeroEntries(pre_proc_schur_lhs_ptr->B);
809 post_proc_schur_lhs_ptr->postProcessHook = [
this,
810 post_proc_schur_lhs_ptr]() {
812 MOFEM_LOG(
"INCOMP_ELASTICITY", Sev::verbose) <<
"Lhs Assemble Begin";
813 *(post_proc_schur_lhs_ptr->matAssembleSwitch) =
false;
814 CHKERR MatAssemblyBegin(post_proc_schur_lhs_ptr->A, MAT_FINAL_ASSEMBLY);
815 CHKERR MatAssemblyEnd(post_proc_schur_lhs_ptr->A, MAT_FINAL_ASSEMBLY);
817 mField, post_proc_schur_lhs_ptr, 1.,
820 CHKERR MatAssemblyBegin(post_proc_schur_lhs_ptr->B, MAT_FINAL_ASSEMBLY);
821 CHKERR MatAssemblyEnd(post_proc_schur_lhs_ptr->B, MAT_FINAL_ASSEMBLY);
822 CHKERR MatAXPY(post_proc_schur_lhs_ptr->B, 1, post_proc_schur_lhs_ptr->A,
823 SAME_NONZERO_PATTERN);
824 MOFEM_LOG(
"INCOMP_ELASTICITY", Sev::verbose) <<
"Lhs Assemble End";
827 ts_ctx_ptr->getPreProcessIJacobian().push_front(pre_proc_schur_lhs_ptr);
828 ts_ctx_ptr->getPostProcessIJacobian().push_back(post_proc_schur_lhs_ptr);
830 if (is_pcfs == PETSC_TRUE) {
831 if (
AT == AssemblyType::SCHUR) {
833 CHK_MOAB_THROW(schur_ptr->setUp(solver),
"setup schur preconditioner");
835 auto set_pcfieldsplit_preconditioned_ts = [&](
auto solver) {
837 auto bc_mng = mField.getInterface<
BcManager>();
838 auto name_prb =
simple->getProblemName();
841 name_prb,
ROW,
"P", 0, 1, is_p);
842 CHKERR PCFieldSplitSetIS(pc, PETSC_NULL, is_p);
846 "set pcfieldsplit preconditioned");
848 return boost::make_tuple(schur_ptr, A,
B);
851 return boost::make_tuple(schur_ptr, A,
B);
854 auto dm =
simple->getDM();
857 uXScatter = scatter_create(
D, 0);
858 uYScatter = scatter_create(
D, 1);
860 uZScatter = scatter_create(
D, 2);
864 CHKERR set_essential_bc();
866 auto solver = pip_mng->createTSIM();
867 CHKERR TSSetFromOptions(solver);
869 CHKERR set_section_monitor(solver);
870 CHKERR set_time_monitor(dm, solver);
871 auto [schur_pc_ptr,
A,
B] = set_schur_pc(solver);
873 CHKERR TSSetSolution(solver,
D);
875 CHKERR TSSolve(solver, NULL);
887int main(
int argc,
char *argv[]) {
894 auto core_log = logging::core::get();
903 DMType dm_name =
"DMMOFEM";
908 moab::Core mb_instance;
909 moab::Interface &moab = mb_instance;
958 auto dm =
simple->getDM();
961 CHKERR TSGetSNES(solver, &snes);
963 CHKERR SNESGetKSP(snes, &ksp);
965 CHKERR KSPGetPC(ksp, &pc);
967 MOFEM_LOG(
"INCOMP_ELASTICITY", Sev::inform) <<
"Setup Schur pc";
971 "Is expected that schur matrix is not allocated. This is "
972 "possible only is PC is set up twice");
975 auto create_sub_dm = [&]() {
977 auto set_up = [&]() {
990 subDM = create_sub_dm();
999 {
"P"}, {
nullptr}, {ao_up}, {
S}, {
false},
false));
1001 auto pre_proc_schur_lhs_ptr = boost::make_shared<FEMethod>();
1002 auto post_proc_schur_lhs_ptr = boost::make_shared<FEMethod>();
1004 pre_proc_schur_lhs_ptr->preProcessHook = [
this]() {
1010 post_proc_schur_lhs_ptr->postProcessHook = [
this, ao_up,
1011 post_proc_schur_lhs_ptr]() {
1014 auto print_mat_norm = [
this](
auto a, std::string prefix) {
1017 CHKERR MatNorm(a, NORM_FROBENIUS, &nrm);
1018 MOFEM_LOG(
"INCOMP_ELASTICITY", Sev::verbose)
1019 << prefix <<
" norm = " << nrm;
1023 CHKERR MatAssemblyBegin(
S, MAT_FINAL_ASSEMBLY);
1024 CHKERR MatAssemblyEnd(
S, MAT_FINAL_ASSEMBLY);
1026 mField, post_proc_schur_lhs_ptr, 1,
S, ao_up)();
1029 CHKERR print_mat_norm(
S,
"S");
1035 ts_ctx_ptr->getPreProcessIJacobian().push_front(pre_proc_schur_lhs_ptr);
1036 ts_ctx_ptr->getPostProcessIJacobian().push_back(post_proc_schur_lhs_ptr);
1040 simple->getProblemName(),
ROW,
"P", 0, 1, is_p);
1041 CHKERR PCFieldSplitSetIS(pc, NULL, is_p);
1042 CHKERR PCFieldSplitSetSchurPre(pc, PC_FIELDSPLIT_SCHUR_PRE_USER,
S);
1047boost::shared_ptr<SetUpSchur>
1049 return boost::shared_ptr<SetUpSchur>(
new SetUpSchurImpl(m_field));
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#define MOFEM_LOG_SEVERITY_SYNC(comm, severity)
Synchronise "SYNC" on curtain severity level.
#define MOFEM_LOG_C(channel, severity, format,...)
void simple(double P1[], double P2[], double P3[], double c[], const int N)
ElementsAndOps< SPACE_DIM >::DomainEle DomainEle
ElementsAndOps< SPACE_DIM >::BoundaryEle BoundaryEle
Kronecker Delta class symmetric.
#define CATCH_ERRORS
Catch errors.
FieldApproximationBase
approximation base
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
@ L2
field with C-1 continuity
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
@ MOFEM_DATA_INCONSISTENCY
CoordinateTypes
Coodinate system.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
constexpr int SPACE_DIM
[Define dimension]
FTensor::Index< 'm', SPACE_DIM > m
FormsIntegrators< DomainEleOp >::Assembly< A >::BiLinearForm< I >::OpMixScalarTimesDiv< SPACE_DIM, COORD_TYPE > OpMixScalarTimesDiv
PetscErrorCode DMMoFEMCreateSubDM(DM subdm, DM dm, const char problem_name[])
Must be called by user to set Sub DM MoFEM data structures.
PetscErrorCode DMMoFEMAddElement(DM dm, std::string fe_name)
add element to dm
PetscErrorCode DMMoFEMSetSquareProblem(DM dm, PetscBool square_problem)
set squared problem
PetscErrorCode DMMoFEMAddSubFieldRow(DM dm, const char field_name[])
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
auto createDMVector(DM dm)
Get smart vector from DM.
PetscErrorCode DMoFEMGetInterfacePtr(DM dm, MoFEM::Interface **m_field_ptr)
Get pointer to MoFEM::Interface.
auto createDMMatrix(DM dm)
Get smart matrix from DM.
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG(channel, severity)
Log.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
virtual MoFEMErrorCode loop_dofs(const Problem *problem_ptr, const std::string &field_name, RowColData rc, DofMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
Make a loop over dofs.
FTensor::Index< 'i', SPACE_DIM > i
static double young_modulus
constexpr AssemblyType AT
constexpr IntegrationType IT
static char help[]
[Check]
constexpr CoordinateTypes coord_type
static double poisson_ratio
PetscBool isDiscontinuousPressure
int order
[Specialisation for assembly]
const double v
phase velocity of light in medium (cm/ns)
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::LinearForm< GAUSS >::OpSource< 1, 3 > OpBodyForce
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
PetscErrorCode DMMoFEMTSSetMonitor(DM dm, TS ts, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
Set Monitor To TS solver.
PetscErrorCode TsSetIJacobian(TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a, Mat A, Mat B, void *ctx)
Set function evaluating jacobina in TS solver.
auto getDMTsCtx(DM dm)
Get TS context data structure used by DM.
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
PetscErrorCode PetscOptionsGetScalar(PetscOptions *, const char pre[], const char name[], PetscScalar *dval, PetscBool *set)
PetscErrorCode PetscOptionsGetRealArray(PetscOptions *, const char pre[], const char name[], PetscReal dval[], PetscInt *nmax, PetscBool *set)
auto getDMSubData(DM dm)
Get sub problem data structure.
auto createAOMappingIS(IS isapp, IS ispetsc)
Creates an application mapping using two index sets.
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
PetscErrorCode PetscOptionsGetEList(PetscOptions *, const char pre[], const char name[], const char *const *list, PetscInt next, PetscInt *value, PetscBool *set)
SmartPetscObj< Mat > matDuplicate(Mat mat, MatDuplicateOption op)
auto createDM(MPI_Comm comm, const std::string dm_type_name)
Creates smart DM object.
OpPostProcMapInMoab< SPACE_DIM, SPACE_DIM > OpPPMap
#define EXECUTABLE_DIMENSION
static constexpr int approx_order
Element used to specialise assembly.
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uZScatter
MoFEMErrorCode checkResults()
[Solve]
MoFEMErrorCode createCommonData()
[Set up problem]
MoFEMErrorCode setupProblem()
[Run problem]
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uYScatter
MoFEM::Interface & mField
MoFEMErrorCode runProblem()
[Run problem]
MoFEMErrorCode OPs()
[Boundary condition]
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uXScatter
MoFEMErrorCode bC()
[Create common data]
Incompressible(MoFEM::Interface &m_field)
Add operators pushing bases from local to physical configuration.
boost::weak_ptr< CacheTuple > getCacheWeakPtr() const
Get the cache weak ptr object.
Simple interface for fast problem set-up.
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0
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.
Definition of the displacement bc data structure.
Data on single entity (This is passed as argument to DataOperator::doWork)
Class (Function) to enforce essential constrains on the left hand side diagonal.
Class (Function) to enforce essential constrains on the right hand side diagonal.
Class (Function) to enforce essential constrains.
structure for User Loop Methods on finite elements
default operator for TRI element
Field evaluator interface.
structure to get information form mofem into EntitiesFieldData
Section manager is used to create indexes and sections.
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.
boost::function< MoFEMErrorCode(ForcesAndSourcesCore::UserDataOperator *op_ptr, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, MatrixDouble &m)> MatSetValuesHook
Calculate field values (template specialization) for tensor field rank 1, i.e. vector field.
Get value at integration points for scalar field.
Get field gradients at integration pts for scalar filed rank 0, i.e. vector field.
Get values at integration pts for tensor filed rank 1, i.e. vector field.
Element used to execute operators on side of the element.
Post post-proc data at points from hash maps.
Clear Schur complement internal data.
Assemble Schur complement.
PipelineManager interface.
Projection of edge entities with one mid-node on hierarchical basis.
Simple interface for fast problem set-up.
intrusive_ptr for managing petsc objects
PetscInt ts_step
time step number
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
MoFEMErrorCode preProcess()
function is run at the beginning of loop
boost::shared_ptr< MatrixDouble > vecFieldPtr
std::array< double, SPACE_DIM > fieldEvalCoords
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uXScatter
boost::shared_ptr< SkinPostProcEle > skinPostProcFe
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uYScatter
MonitorIncompressible(SmartPetscObj< DM > dm, std::pair< boost::shared_ptr< PostProcEle >, boost::shared_ptr< SkinPostProcEle > > pair_post_proc_fe, std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > ux_scatter, std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uy_scatter, std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uz_scatter, std::array< double, SPACE_DIM > pass_field_eval_coords, boost::shared_ptr< SetPtsData > pass_field_eval_data, boost::shared_ptr< MatrixDouble > vec_field_ptr)
MoFEMErrorCode operator()()
function is run for every finite element
boost::shared_ptr< SetPtsData > fieldEvalData
std::tuple< SmartPetscObj< Vec >, SmartPetscObj< VecScatter > > uZScatter
boost::shared_ptr< PostProcEle > postProcFe
MoFEMErrorCode postProcess()
function is run at the end of loop
OpCalculateLameStress(double m_u, boost::shared_ptr< MatrixDouble > stress_ptr, boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< VectorDouble > pressure_ptr)
boost::shared_ptr< MatrixDouble > stressPtr
boost::shared_ptr< VectorDouble > pressurePtr
boost::shared_ptr< MatrixDouble > strainPtr
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
[Push operators to pipeline]
static boost::shared_ptr< SetUpSchur > createSetUpSchur(MoFEM::Interface &m_field, SmartPetscObj< DM > sub_dm, SmartPetscObj< IS > field_split_it, SmartPetscObj< AO > ao_map)
Create data structure for handling Schur complement.
virtual MoFEMErrorCode setUp(SmartPetscObj< TS > solver)=0
static boost::shared_ptr< SetUpSchur > createSetUpSchur(MoFEM::Interface &m_field)
SmartPetscObj< DM > subDM
field split sub dm
MoFEMErrorCode setUp(KSP solver)
SetUpSchurImpl(MoFEM::Interface &m_field)
SmartPetscObj< DM > createSubDM()
MoFEMErrorCode setUp(SmartPetscObj< TS > solver)
virtual ~SetUpSchurImpl()
MoFEMErrorCode setPC(PC pc)
MoFEMErrorCode setOperator()
MoFEM::Interface & mField