288 template <
typename T = ForcesAndSourcesCore>
297 template <
typename T = ForcesAndSourcesCore>
306 template <
typename T = ForcesAndSourcesCore>
316 template <
int DIM = -1>
326 template <
int DIM = -1>
336 template <
int DIM = -1>
346 template <
int DIM = -1>
356 template <
int DIM = -1>
366 template <
int DIM = -1>
376 template <
int DIM = -1>
386 template <
int DIM = -1>
396 template <
int DIM = -1>
406 template <
int DIM = -1>
416 template <
int DIM = -1>
426 template <
int DIM = -1>
436 template <
int DIM = -1>
446 template <
int DIM = -1>
456 template <
int DIM = -1>
466 template <
int DIM = -1>
476 template <
int DIM = -1>
485 template <
int DIM = -1>
495 template <
int DIM = -1>
505 template <
int DIM = -1>
515 template <
int DIM = -1>
525 template <
int DIM = -1>
684 boost::shared_ptr<FEMethod>
686 boost::shared_ptr<FEMethod>
688 boost::shared_ptr<FEMethod>
690 boost::shared_ptr<FEMethod>
692 boost::shared_ptr<FEMethod>
694 boost::shared_ptr<FEMethod>
696 boost::shared_ptr<FEMethod>
698 boost::shared_ptr<FEMethod>
700 boost::shared_ptr<FEMethod>
703 boost::shared_ptr<FEMethod>
705 boost::shared_ptr<FEMethod>
708 boost::shared_ptr<FEMethod>
728 inline boost::shared_ptr<FEMethod> &
739 inline boost::shared_ptr<FEMethod> &
748 inline boost::shared_ptr<FEMethod> &
759boost::shared_ptr<FEMethod> &
761 static_assert(DIM == 1 || DIM == 2 || DIM == 3,
"not implemented");
762 fe = boost::make_shared<FEMethod>();
767inline boost::shared_ptr<FEMethod> &
768PipelineManager::createDomainFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
770 fe = boost::make_shared<VolEle>(
cOre);
775inline boost::shared_ptr<FEMethod> &
776PipelineManager::createDomainFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
778 fe = boost::make_shared<FaceEle>(
cOre);
783inline boost::shared_ptr<FEMethod> &
784PipelineManager::createDomainFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
786 fe = boost::make_shared<EdgeEle>(
cOre);
791inline boost::shared_ptr<FEMethod> &
793 switch (cOre.getInterface<Simple>()->getDim()) {
795 return createDomainFEPipeline<1>(fe);
797 return createDomainFEPipeline<2>(fe);
799 return createDomainFEPipeline<3>(fe);
806boost::shared_ptr<FEMethod> &
808 static_assert(DIM == 1 || DIM == 2 || DIM == 3,
"not implemented");
809 fe = boost::make_shared<FEMethod>();
814inline boost::shared_ptr<FEMethod> &
815PipelineManager::createBoundaryFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
817 fe = boost::make_shared<FaceElementForcesAndSourcesCore>(
cOre);
822inline boost::shared_ptr<FEMethod> &
823PipelineManager::createBoundaryFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
825 fe = boost::make_shared<EdgeEle>(
cOre);
830inline boost::shared_ptr<FEMethod> &
831PipelineManager::createBoundaryFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
833 fe = boost::make_shared<VertexElementForcesAndSourcesCore>(
cOre);
898inline boost::shared_ptr<FEMethod> &
902 return createBoundaryFEPipeline<1>(fe);
904 return createBoundaryFEPipeline<2>(fe);
906 return createBoundaryFEPipeline<3>(fe);
913 return boost::dynamic_pointer_cast<T>(
918 return boost::dynamic_pointer_cast<T>(
923 return boost::dynamic_pointer_cast<T>(
927template <
typename T,
int DIM>
929 return boost::dynamic_pointer_cast<T>(
934 return boost::dynamic_pointer_cast<T>(
938template <
typename T,
int DIM>
940 return boost::dynamic_pointer_cast<T>(
945 return boost::dynamic_pointer_cast<T>(
949template <
typename T,
int DIM>
951 return boost::dynamic_pointer_cast<T>(
956 return boost::dynamic_pointer_cast<T>(
960template <
typename T,
int DIM>
962 return boost::dynamic_pointer_cast<T>(
966template <
typename T,
int DIM>
968 return boost::dynamic_pointer_cast<T>(
972template <
typename T,
int DIM>
974 return boost::dynamic_pointer_cast<T>(
987 return boost::dynamic_pointer_cast<T>(
995 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
997 ->getRuleHook = rule;
1022 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1024 ->getRuleHook = rule;
1049 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1051 ->getRuleHook = rule;
1076 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1078 ->getRuleHook = rule;
1103 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1105 ->getRuleHook = rule;
1130 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1132 ->getRuleHook = rule;
1157 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1159 ->getRuleHook = rule;
1184 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1186 ->getRuleHook = rule;
1211 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1213 ->getRuleHook = rule;
1239 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1241 ->getRuleHook = rule;
1264boost::ptr_deque<PipelineManager::UserDataOperator> &
1266 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1272inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1276 return getOpDomainLhsPipeline<1>();
1278 return getOpDomainLhsPipeline<2>();
1284 return getOpDomainLhsPipeline<3>();
1288boost::ptr_deque<PipelineManager::UserDataOperator> &
1290 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1296inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1300 return getOpDomainRhsPipeline<1>();
1302 return getOpDomainRhsPipeline<2>();
1308 return getOpDomainRhsPipeline<3>();
1312boost::ptr_deque<PipelineManager::UserDataOperator> &
1314 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1320inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1324 return getOpBoundaryLhsPipeline<1>();
1326 return getOpBoundaryLhsPipeline<2>();
1332 return getOpBoundaryLhsPipeline<3>();
1336boost::ptr_deque<PipelineManager::UserDataOperator> &
1338 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1344inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1348 return getOpBoundaryRhsPipeline<1>();
1350 return getOpBoundaryRhsPipeline<2>();
1356 return getOpBoundaryRhsPipeline<3>();
1360boost::ptr_deque<PipelineManager::UserDataOperator> &
1362 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1368inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1372 return getOpDomainPostProcPipeline<1>();
1374 return getOpDomainPostProcPipeline<2>();
1380 return getOpDomainPostProcPipeline<3>();
1384boost::ptr_deque<PipelineManager::UserDataOperator> &
1386 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1392inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1396 return getOpBoundaryPostProcPipeline<1>();
1398 return getOpBoundaryPostProcPipeline<2>();
1404 return getOpBoundaryPostProcPipeline<3>();
1408boost::ptr_deque<PipelineManager::UserDataOperator> &
1410 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1416inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1420 return getOpEvaluationPipeline<1>();
1422 return getOpEvaluationPipeline<2>();
1428 return getOpEvaluationPipeline<3>();
1432boost::ptr_deque<PipelineManager::UserDataOperator> &
1434 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1440inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1444 return getOpSkeletonLhsPipeline<1>();
1446 return getOpSkeletonLhsPipeline<2>();
1452 return getOpSkeletonLhsPipeline<3>();
1456boost::ptr_deque<PipelineManager::UserDataOperator> &
1458 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1464inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1468 return getOpSkeletonRhsPipeline<1>();
1470 return getOpSkeletonRhsPipeline<2>();
1476 return getOpSkeletonRhsPipeline<3>();
1480boost::ptr_deque<PipelineManager::UserDataOperator> &
1482 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1488inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1492 return getOpDomainExplicitRhsPipeline<1>();
1494 return getOpDomainExplicitRhsPipeline<2>();
1500 return getOpDomainExplicitRhsPipeline<3>();
1504boost::ptr_deque<PipelineManager::UserDataOperator> &
1506 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1512inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1516 return getOpBoundaryExplicitRhsPipeline<1>();
1518 return getOpBoundaryExplicitRhsPipeline<2>();
1524 return getOpBoundaryExplicitRhsPipeline<3>();
1528boost::ptr_deque<PipelineManager::UserDataOperator> &
1530 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1536inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1540 return getOpSkeletonExplicitRhsPipeline<1>();
1542 return getOpSkeletonExplicitRhsPipeline<2>();
1548 return getOpSkeletonExplicitRhsPipeline<3>();
ElementsAndOps< SPACE_DIM >::DomainParentEle DomainParentEle
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
MoFEMErrorCode loopFiniteElementsEvaluation(SmartPetscObj< DM > dm=nullptr)
Iterate evaluation finite elements.
MoFEMErrorCode loopBoundaryPostProc(SmartPetscObj< DM > dm=nullptr)
Iterate boundary postprocessing finite elements only.
boost::ptr_deque< UserDataOperator > & getOpBoundaryExplicitRhsPipeline()
Get the Op Boundary Rhs Pipeline object for implicit-explicit G term.
boost::ptr_deque< UserDataOperator > & getOpBoundaryPostProcPipeline()
Get the Op Boundary PostProc Pipeline object.
boost::ptr_deque< UserDataOperator > & getOpDomainExplicitRhsPipeline()
Get the Op Domain Rhs Pipeline object for implicit-explicit G term.
MoFEMErrorCode loopFiniteElements(SmartPetscObj< DM > dm=nullptr)
Iterate finite elements.
boost::ptr_deque< UserDataOperator > & getOpSkeletonExplicitRhsPipeline()
Get the Op Skeleton Rhs Pipeline object for implicit-explicit G term.
boost::ptr_deque< UserDataOperator > & getOpDomainLhsPipeline()
Get the Op Domain Lhs Pipeline object.
SmartPetscObj< SNES > createSNES(SmartPetscObj< DM > dm=nullptr)
Create SNES (nonlinear) solver.
boost::ptr_deque< UserDataOperator > & getOpSkeletonLhsPipeline()
Get the Op Skeleton Lhs Pipeline object.
SmartPetscObj< TS > createTSIM(SmartPetscObj< DM > dm=nullptr)
Create TS (time) implicit solver.
SmartPetscObj< TS > createTSIM2(SmartPetscObj< DM > dm=nullptr)
Create TS (time) solver for second order equation in time.
boost::ptr_deque< UserDataOperator > & getOpBoundaryLhsPipeline()
Get the Op Boundary Lhs Pipeline object.
SmartPetscObj< KSP > createKSP(SmartPetscObj< DM > dm=nullptr)
Create KSP (linear) solver.
boost::ptr_deque< UserDataOperator > & getOpBoundaryRhsPipeline()
Get the Op Boundary Rhs Pipeline object.
boost::ptr_deque< UserDataOperator > & getOpDomainPostProcPipeline()
Get the Op Domain PostProc Pipeline object.
SmartPetscObj< TS > createTSIMEX(SmartPetscObj< DM > dm=nullptr)
Create TS (time) implicit-explicit solver.
boost::ptr_deque< UserDataOperator > & getOpSkeletonRhsPipeline()
Get the Op Skeleton Rhs Pipeline object.
SmartPetscObj< TS > createTSEX(SmartPetscObj< DM > dm=nullptr)
Create TS (time) explicit solver.
MoFEMErrorCode loopFiniteElementsPostProc(SmartPetscObj< DM > dm=nullptr)
Iterate postprocessing finite elements.
boost::ptr_deque< UserDataOperator > & getOpDomainRhsPipeline()
Get the Op Domain Rhs Pipeline object.
boost::ptr_deque< UserDataOperator > & getOpEvaluationPipeline()
Get the Op Domain Evaluation Pipeline object.
MoFEMErrorCode loopDomainPostProc(SmartPetscObj< DM > dm=nullptr)
Iterate domain postprocessing finite elements only.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Base face element used to integrate on skeleton.
Base face element used to integrate on skeleton.
Base face element used to integrate on skeleton.
structure to get information from mofem into EntitiesFieldData
boost::function< int(int order_row, int order_col, int order_data)> RuleHookFun
Template struct for dimension-specific finite element types.
PipelineManager interface.
TSType
Enumeration of time solver types.
@ IM
Implicit time integration.
@ IM2
Second-order implicit time integration.
@ IMEX
Implicit-explicit time integration.
@ EX
Explicit time integration.
boost::shared_ptr< FEMethod > feBoundaryRhs
Element to assemble RHS side by integrating boundary.
boost::shared_ptr< FEMethod > & getDomainRhsFE()
Get domain right-hand side finite element.
boost::ptr_deque< UserDataOperator > & getOpMeshsetRhsPipeline()
Get the Op Meshset Rhs Pipeline object.
MoFEMErrorCode setSkeletonLhsIntegrationRule(RuleHookFun rule)
Set integration rule for skeleton left-hand side finite element.
auto getCastEvaluationFE()
Get typed domain evaluation finite element.
auto getCastDomainLhsFE()
Get typed domain left-hand side finite element.
MoFEM::VolumeElementForcesAndSourcesCore VolEle
auto getCastBoundaryExplicitRhsFE()
Get typed boundary explicit right-hand side finite element.
boost::shared_ptr< FEMethod > feDomainExplicitRhs
Element to assemble explicit Rhs for IMEX solver.
boost::shared_ptr< FEMethod > feEvaluation
Element for evaluation by integrating domain.
auto getCastMeshsetExplicitRhsFE()
Get typed meshset explicit right-hand side finite element.
boost::shared_ptr< FEMethod > feMeshsetLhs
DEPRECATED auto createTS2(SmartPetscObj< DM > dm=nullptr)
MoFEMErrorCode setEvaluationIntegrationRule(RuleHookFun rule)
Set integration rule for domain evaluation finite element.
boost::shared_ptr< FEMethod > & getDomainLhsFE()
Get domain left-hand side finite element.
auto getCastBoundaryLhsFE()
Get typed boundary left-hand side finite element.
auto getCastSkeletonRhsFE()
Get typed skeleton right-hand side finite element.
MoFEM::ForcesAndSourcesCore::RuleHookFun RuleHookFun
boost::ptr_deque< UserDataOperator > & getOpMeshsetExplicitRhsPipeline()
Get the Op Meshset Explicit Rhs Pipeline object.
boost::shared_ptr< FEMethod > feBoundaryLhs
Element to assemble LHS side by integrating boundary.
boost::shared_ptr< FEMethod > & getSkeletonRhsFE()
Get skeleton right-hand side finite element.
MoFEMErrorCode setBoundaryExplicitRhsIntegrationRule(RuleHookFun rule)
Set integration rule for boundary explicit right-hand side finite element.
MoFEM::FaceElementForcesAndSourcesCore FaceEle
boost::shared_ptr< FEMethod > & getDomainPostProcFE()
Get domain postprocessing finite element.
boost::shared_ptr< FEMethod > & getMeshsetLhsFE()
Get meshset left-hand side finite element.
boost::shared_ptr< FEMethod > feSkeletonExplicitRhs
boost::shared_ptr< FEMethod > feMeshsetExplicitRhs
SmartPetscObj< TS > createTS(const TSType type, SmartPetscObj< DM > dm=nullptr)
Create TS (time) solver with specified type.
auto getCastSkeletonLhsFE()
Get typed skeleton left-hand side finite element.
boost::shared_ptr< FEMethod > & getBoundaryLhsFE()
Get boundary left-hand side finite element.
boost::shared_ptr< FEMethod > & getSkeletonLhsFE()
Get skeleton left-hand side finite element.
MoFEMErrorCode setDomainRhsIntegrationRule(RuleHookFun rule)
Set integration rule for domain right-hand side finite element.
auto getCastSkeletonExplicitRhsFE()
Get typed skeleton explicit right-hand side finite element.
MoFEMErrorCode setBoundaryLhsIntegrationRule(RuleHookFun rule)
Set integration rule for boundary left-hand side finite element.
boost::shared_ptr< FEMethod > feSkeletonLhs
Element to assemble LHS side by integrating skeleton.
boost::shared_ptr< FEMethod > & createBoundaryFEPipeline(boost::shared_ptr< FEMethod > &fe)
Create boundary finite element pipeline based on dimension.
auto getCastDomainExplicitRhsFE()
Get typed domain explicit right-hand side finite element.
MoFEMErrorCode setBoundaryRhsIntegrationRule(RuleHookFun rule)
Set integration rule for boundary right-hand side finite element.
MoFEMErrorCode setDomainExplicitRhsIntegrationRule(RuleHookFun rule)
Set integration rule for domain explicit right-hand side finite element.
boost::shared_ptr< FEMethod > & getEvaluationFE()
Get domain evaluation finite element.
boost::shared_ptr< FEMethod > feDomainLhs
Element to assemble LHS side by integrating domain.
boost::shared_ptr< FEMethod > & getBoundaryPostProcFE()
Get boundary postprocessing finite element.
boost::shared_ptr< FEMethod > feSkeletonRhs
Element to assemble RHS side by integrating skeleton.
MoFEM::EdgeElementForcesAndSourcesCore EdgeEle
boost::shared_ptr< FEMethod > feMeshsetRhs
boost::shared_ptr< FEMethod > & getMeshsetRhsFE()
Get meshset right-hand side finite element.
boost::shared_ptr< FEMethod > & getDomainExplicitRhsFE()
Get domain explicit right-hand side finite element.
boost::shared_ptr< FEMethod > feDomainPostProc
Element for postprocessing by integrating domain.
boost::shared_ptr< FEMethod > & getBoundaryRhsFE()
Get boundary right-hand side finite element.
boost::shared_ptr< FEMethod > feBoundaryPostProc
Element for postprocessing by integrating boundary.
boost::shared_ptr< FEMethod > feDomainRhs
Element to assemble RHS side by integrating domain.
boost::ptr_deque< UserDataOperator > & getOpMeshsetLhsPipeline()
Get the Op Meshset Lhs Pipeline object.
boost::shared_ptr< FEMethod > & createMeshsetFEPipeline(boost::shared_ptr< FEMethod > &fe)
Create meshset finite element pipeline.
boost::shared_ptr< FEMethod > & getSkeletonExplicitRhsFE()
Get skeleton explicit right-hand side finite element.
MoFEMErrorCode setDomainLhsIntegrationRule(RuleHookFun rule)
Set integration rule for domain left-hand side finite element.
auto getCastMeshsetRhsFE()
Get typed meshset right-hand side finite element.
MoFEM::Core & cOre
Reference to MoFEM core instance.
DEPRECATED auto createTS(SmartPetscObj< DM > dm=nullptr)
boost::shared_ptr< FEMethod > & getBoundaryExplicitRhsFE()
Get boundary explicit right-hand side finite element.
auto getCastMeshsetLhsFE()
Get typed meshset left-hand side finite element.
auto getCastBoundaryRhsFE()
Get typed boundary right-hand side finite element.
boost::shared_ptr< FEMethod > & getMeshsetExplicitRhsFE()
Get meshset explicit right-hand side finite element.
MoFEMErrorCode setSkeletonRhsIntegrationRule(RuleHookFun rule)
Set integration rule for skeleton right-hand side finite element.
auto getCastDomainRhsFE()
Get typed domain right-hand side finite element.
boost::shared_ptr< FEMethod > feBoundaryExplicitRhs
auto getCastDomainPostProcFE()
Get typed domain postprocessing finite element.
boost::shared_ptr< FEMethod > & createDomainFEPipeline(boost::shared_ptr< FEMethod > &fe)
Create domain finite element pipeline based on dimension.
auto getCastBoundaryPostProcFE()
Get typed boundary postprocessing finite element.
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Query interface for type-safe casting.
MoFEMErrorCode setSkeletonExplicitRhsIntegrationRule(RuleHookFun rule)
Set integration rule for skeleton explicit right-hand side finite element.
Simple interface for fast problem set-up.
int getDim() const
Get the problem dimension.
intrusive_ptr for managing petsc objects
base class for all interface classes
Base volume element used to integrate on skeleton.
Volume finite element base.