237 template <
typename T = ForcesAndSourcesCore>
246 template <
typename T = ForcesAndSourcesCore>
255 template <
typename T = ForcesAndSourcesCore>
265 template <
int DIM = -1>
275 template <
int DIM = -1>
285 template <
int DIM = -1>
295 template <
int DIM = -1>
305 template <
int DIM = -1>
315 template <
int DIM = -1>
325 template <
int DIM = -1>
335 template <
int DIM = -1>
345 template <
int DIM = -1>
355 template <
int DIM = -1>
365 template <
int DIM = -1>
375 template <
int DIM = -1>
385 template <
int DIM = -1>
394 template <
int DIM = -1>
404 template <
int DIM = -1>
414 template <
int DIM = -1>
424 template <
int DIM = -1>
434 template <
int DIM = -1>
557 boost::shared_ptr<FEMethod>
559 boost::shared_ptr<FEMethod>
561 boost::shared_ptr<FEMethod>
563 boost::shared_ptr<FEMethod>
565 boost::shared_ptr<FEMethod>
567 boost::shared_ptr<FEMethod>
570 boost::shared_ptr<FEMethod>
572 boost::shared_ptr<FEMethod>
575 boost::shared_ptr<FEMethod>
595 inline boost::shared_ptr<FEMethod> &
606 inline boost::shared_ptr<FEMethod> &
615 inline boost::shared_ptr<FEMethod> &
626boost::shared_ptr<FEMethod> &
628 static_assert(DIM == 1 || DIM == 2 || DIM == 3,
"not implemented");
629 fe = boost::make_shared<FEMethod>();
634inline boost::shared_ptr<FEMethod> &
635PipelineManager::createDomainFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
637 fe = boost::make_shared<VolEle>(
cOre);
642inline boost::shared_ptr<FEMethod> &
643PipelineManager::createDomainFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
645 fe = boost::make_shared<FaceEle>(
cOre);
650inline boost::shared_ptr<FEMethod> &
651PipelineManager::createDomainFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
653 fe = boost::make_shared<EdgeEle>(
cOre);
658inline boost::shared_ptr<FEMethod> &
660 switch (cOre.getInterface<Simple>()->getDim()) {
662 return createDomainFEPipeline<1>(fe);
664 return createDomainFEPipeline<2>(fe);
666 return createDomainFEPipeline<3>(fe);
673boost::shared_ptr<FEMethod> &
675 static_assert(DIM == 1 || DIM == 2 || DIM == 3,
"not implemented");
676 fe = boost::make_shared<FEMethod>();
681inline boost::shared_ptr<FEMethod> &
682PipelineManager::createBoundaryFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
684 fe = boost::make_shared<FaceElementForcesAndSourcesCore>(
cOre);
689inline boost::shared_ptr<FEMethod> &
690PipelineManager::createBoundaryFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
692 fe = boost::make_shared<EdgeEle>(
cOre);
697inline boost::shared_ptr<FEMethod> &
698PipelineManager::createBoundaryFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
700 fe = boost::make_shared<VertexElementForcesAndSourcesCore>(
cOre);
753inline boost::shared_ptr<FEMethod> &
757 return createBoundaryFEPipeline<1>(fe);
759 return createBoundaryFEPipeline<2>(fe);
761 return createBoundaryFEPipeline<3>(fe);
768 return boost::dynamic_pointer_cast<T>(
773 return boost::dynamic_pointer_cast<T>(
778 return boost::dynamic_pointer_cast<T>(
782template <
typename T,
int DIM>
784 return boost::dynamic_pointer_cast<T>(
788template <
typename T,
int DIM>
790 return boost::dynamic_pointer_cast<T>(
795 return boost::dynamic_pointer_cast<T>(
799template <
typename T,
int DIM>
801 return boost::dynamic_pointer_cast<T>(
805template <
typename T,
int DIM>
807 return boost::dynamic_pointer_cast<T>(
811template <
typename T,
int DIM>
813 return boost::dynamic_pointer_cast<T>(
826 return boost::dynamic_pointer_cast<T>(
834 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
836 ->getRuleHook = rule;
861 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
863 ->getRuleHook = rule;
888 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
890 ->getRuleHook = rule;
915 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
917 ->getRuleHook = rule;
942 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
944 ->getRuleHook = rule;
969 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
971 ->getRuleHook = rule;
996 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
998 ->getRuleHook = rule;
1023 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1025 ->getRuleHook = rule;
1051 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1053 ->getRuleHook = rule;
1076boost::ptr_deque<PipelineManager::UserDataOperator> &
1078 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1084inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1088 return getOpDomainLhsPipeline<1>();
1090 return getOpDomainLhsPipeline<2>();
1096 return getOpDomainLhsPipeline<3>();
1100boost::ptr_deque<PipelineManager::UserDataOperator> &
1102 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1108inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1112 return getOpDomainRhsPipeline<1>();
1114 return getOpDomainRhsPipeline<2>();
1120 return getOpDomainRhsPipeline<3>();
1124boost::ptr_deque<PipelineManager::UserDataOperator> &
1126 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1132inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1136 return getOpBoundaryLhsPipeline<1>();
1138 return getOpBoundaryLhsPipeline<2>();
1144 return getOpBoundaryLhsPipeline<3>();
1148boost::ptr_deque<PipelineManager::UserDataOperator> &
1150 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1156inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1160 return getOpBoundaryRhsPipeline<1>();
1162 return getOpBoundaryRhsPipeline<2>();
1168 return getOpBoundaryRhsPipeline<3>();
1172boost::ptr_deque<PipelineManager::UserDataOperator> &
1174 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1180inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1184 return getOpSkeletonLhsPipeline<1>();
1186 return getOpSkeletonLhsPipeline<2>();
1192 return getOpSkeletonLhsPipeline<3>();
1196boost::ptr_deque<PipelineManager::UserDataOperator> &
1198 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1204inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1208 return getOpSkeletonRhsPipeline<1>();
1210 return getOpSkeletonRhsPipeline<2>();
1216 return getOpSkeletonRhsPipeline<3>();
1220boost::ptr_deque<PipelineManager::UserDataOperator> &
1222 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1228inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1232 return getOpDomainExplicitRhsPipeline<1>();
1234 return getOpDomainExplicitRhsPipeline<2>();
1240 return getOpDomainExplicitRhsPipeline<3>();
1244boost::ptr_deque<PipelineManager::UserDataOperator> &
1246 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1252inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1256 return getOpBoundaryExplicitRhsPipeline<1>();
1258 return getOpBoundaryExplicitRhsPipeline<2>();
1264 return getOpBoundaryExplicitRhsPipeline<3>();
1268boost::ptr_deque<PipelineManager::UserDataOperator> &
1270 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1276inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1280 return getOpSkeletonExplicitRhsPipeline<1>();
1282 return getOpSkeletonExplicitRhsPipeline<2>();
1288 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.
boost::ptr_deque< UserDataOperator > & getOpBoundaryExplicitRhsPipeline()
Get the Op Boundary Rhs Pipeline object for implicit-explicit G term.
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.
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.
boost::ptr_deque< UserDataOperator > & getOpDomainRhsPipeline()
Get the Op Domain Rhs Pipeline object.
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 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.
auto getCastMeshsetExplicitRhsFE()
Get typed meshset explicit right-hand side finite element.
boost::shared_ptr< FEMethod > feMeshsetLhs
DEPRECATED auto createTS2(SmartPetscObj< DM > dm=nullptr)
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 > & 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 > feDomainLhs
Element to assemble LHS side by integrating domain.
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 > & getBoundaryRhsFE()
Get boundary right-hand side finite element.
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
boost::shared_ptr< FEMethod > & createDomainFEPipeline(boost::shared_ptr< FEMethod > &fe)
Create domain finite element pipeline based on dimension.
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.