65 template <
int DIM = -1>
68 template <
int DIM = -1>
71 template <
int DIM = -1>
74 template <
int DIM = -1>
77 template <
int DIM = -1>
80 template <
int DIM = -1>
83 template <
int DIM = -1>
86 template <
int DIM = -1>
89 template <
int DIM = -1>
99 template <
int DIM = -1>
109 template <
int DIM = -1>
119 template <
int DIM = -1>
129 template <
int DIM = -1>
138 template <
int DIM = -1>
148 template <
int DIM = -1>
158 template <
int DIM = -1>
168 template <
int DIM = -1>
169 inline boost::ptr_vector<UserDataOperator> &
179 template <
int DIM = -1>
180 inline boost::ptr_vector<UserDataOperator> &
273 boost::shared_ptr<FEMethod>
275 boost::shared_ptr<FEMethod>
277 boost::shared_ptr<FEMethod>
279 boost::shared_ptr<FEMethod>
281 boost::shared_ptr<FEMethod>
283 boost::shared_ptr<FEMethod>
286 boost::shared_ptr<FEMethod>
288 boost::shared_ptr<FEMethod>
291 boost::shared_ptr<FEMethod>
296 inline boost::shared_ptr<FEMethod> &
300 inline boost::shared_ptr<FEMethod> &
305 boost::shared_ptr<FEMethod> &
307 static_assert(DIM == 1 || DIM == 2 || DIM == 3,
"not implemented");
308 fe = boost::make_shared<FEMethod>();
313 inline boost::shared_ptr<FEMethod> &
314 PipelineManager::createDomainFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
316 fe = boost::make_shared<VolEle>(
cOre);
321 inline boost::shared_ptr<FEMethod> &
322 PipelineManager::createDomainFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
324 fe = boost::make_shared<FaceEle>(
cOre);
329 inline boost::shared_ptr<FEMethod> &
330 PipelineManager::createDomainFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
332 fe = boost::make_shared<EdgeEle>(
cOre);
337 boost::shared_ptr<FEMethod> &
339 static_assert(DIM == 1 || DIM == 2 || DIM == 3,
"not implemented");
340 fe = boost::make_shared<FEMethod>();
345 inline boost::shared_ptr<FEMethod> &
346 PipelineManager::createBoundaryFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
348 fe = boost::make_shared<FaceElementForcesAndSourcesCore>(
cOre);
353 inline boost::shared_ptr<FEMethod> &
354 PipelineManager::createBoundaryFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
356 fe = boost::make_shared<EdgeEle>(
cOre);
361 inline boost::shared_ptr<FEMethod> &
362 PipelineManager::createBoundaryFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
364 fe = boost::make_shared<VertexElementForcesAndSourcesCore>(
cOre);
408 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
410 ->getRuleHook = rule;
420 return setDomainLhsIntegrationRule<1>(rule);
422 return setDomainLhsIntegrationRule<2>(rule);
424 return setDomainLhsIntegrationRule<3>(rule);
435 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
437 ->getRuleHook = rule;
447 return setDomainRhsIntegrationRule<1>(rule);
449 return setDomainRhsIntegrationRule<2>(rule);
451 return setDomainRhsIntegrationRule<3>(rule);
462 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
464 ->getRuleHook = rule;
474 return setBoundaryLhsIntegrationRule<1>(rule);
476 return setBoundaryLhsIntegrationRule<2>(rule);
478 return setBoundaryLhsIntegrationRule<3>(rule);
489 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
491 ->getRuleHook = rule;
501 return setBoundaryRhsIntegrationRule<1>(rule);
503 return setBoundaryRhsIntegrationRule<2>(rule);
505 return setBoundaryRhsIntegrationRule<3>(rule);
516 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
518 ->getRuleHook = rule;
528 return setSkeletonLhsIntegrationRule<1>(rule);
530 return setSkeletonLhsIntegrationRule<2>(rule);
532 return setSkeletonLhsIntegrationRule<3>(rule);
543 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
545 ->getRuleHook = rule;
555 return setSkeletonRhsIntegrationRule<1>(rule);
557 return setSkeletonRhsIntegrationRule<2>(rule);
559 return setSkeletonRhsIntegrationRule<3>(rule);
570 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
572 ->getRuleHook = rule;
582 return setDomainExplicitRhsIntegrationRule<1>(rule);
584 return setDomainExplicitRhsIntegrationRule<2>(rule);
586 return setDomainExplicitRhsIntegrationRule<3>(rule);
597 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
599 ->getRuleHook = rule;
610 return setBoundaryExplicitRhsIntegrationRule<1>(rule);
612 return setBoundaryExplicitRhsIntegrationRule<2>(rule);
614 return setBoundaryExplicitRhsIntegrationRule<3>(rule);
625 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
627 ->getRuleHook = rule;
638 return setSkeletonExplicitRhsIntegrationRule<1>(rule);
640 return setSkeletonExplicitRhsIntegrationRule<2>(rule);
642 return setSkeletonExplicitRhsIntegrationRule<3>(rule);
650 boost::ptr_vector<PipelineManager::UserDataOperator> &
652 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
658 inline boost::ptr_vector<PipelineManager::UserDataOperator> &
662 return getOpDomainLhsPipeline<1>();
664 return getOpDomainLhsPipeline<2>();
670 return getOpDomainLhsPipeline<3>();
674 boost::ptr_vector<PipelineManager::UserDataOperator> &
676 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
682 inline boost::ptr_vector<PipelineManager::UserDataOperator> &
686 return getOpDomainRhsPipeline<1>();
688 return getOpDomainRhsPipeline<2>();
694 return getOpDomainRhsPipeline<3>();
698 boost::ptr_vector<PipelineManager::UserDataOperator> &
700 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
706 inline boost::ptr_vector<PipelineManager::UserDataOperator> &
710 return getOpBoundaryLhsPipeline<1>();
712 return getOpBoundaryLhsPipeline<2>();
718 return getOpBoundaryLhsPipeline<3>();
722 boost::ptr_vector<PipelineManager::UserDataOperator> &
724 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
730 inline boost::ptr_vector<PipelineManager::UserDataOperator> &
734 return getOpBoundaryRhsPipeline<1>();
736 return getOpBoundaryRhsPipeline<2>();
742 return getOpBoundaryRhsPipeline<3>();
746 boost::ptr_vector<PipelineManager::UserDataOperator> &
748 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
754 inline boost::ptr_vector<PipelineManager::UserDataOperator> &
758 return getOpSkeletonLhsPipeline<1>();
760 return getOpSkeletonLhsPipeline<2>();
766 return getOpSkeletonLhsPipeline<3>();
770 boost::ptr_vector<PipelineManager::UserDataOperator> &
772 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
778 inline boost::ptr_vector<PipelineManager::UserDataOperator> &
782 return getOpSkeletonRhsPipeline<1>();
784 return getOpSkeletonRhsPipeline<2>();
790 return getOpSkeletonRhsPipeline<3>();
794 boost::ptr_vector<PipelineManager::UserDataOperator> &
796 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
802 inline boost::ptr_vector<PipelineManager::UserDataOperator> &
806 return getOpDomainExplicitRhsPipeline<1>();
808 return getOpDomainExplicitRhsPipeline<2>();
814 return getOpDomainExplicitRhsPipeline<3>();
818 boost::ptr_vector<PipelineManager::UserDataOperator> &
820 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
826 inline boost::ptr_vector<PipelineManager::UserDataOperator> &
830 return getOpBoundaryExplicitRhsPipeline<1>();
832 return getOpBoundaryExplicitRhsPipeline<2>();
838 return getOpBoundaryExplicitRhsPipeline<3>();
842 boost::ptr_vector<PipelineManager::UserDataOperator> &
844 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
850 inline boost::ptr_vector<PipelineManager::UserDataOperator> &
854 return getOpSkeletonExplicitRhsPipeline<1>();
856 return getOpSkeletonExplicitRhsPipeline<2>();
862 return getOpSkeletonExplicitRhsPipeline<3>();
#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 THROW_MESSAGE(msg)
Throw MoFEM exception.
boost::ptr_vector< UserDataOperator > & getOpSkeletonExplicitRhsPipeline()
Get the Op Skeleton Rhs Pipeline object for implicit-explicit G term.
MoFEMErrorCode loopFiniteElements(SmartPetscObj< DM > dm=nullptr)
Iterate finite elements.
SmartPetscObj< SNES > createSNES(SmartPetscObj< DM > dm=nullptr)
Create SNES (nonlinear) solver.
boost::ptr_vector< UserDataOperator > & getOpDomainExplicitRhsPipeline()
Get the Op Domain Rhs Pipeline object for implicit-explicit G term.
boost::ptr_vector< UserDataOperator > & getOpDomainLhsPipeline()
Get the Op Domain Lhs Pipeline object.
boost::ptr_vector< UserDataOperator > & getOpBoundaryExplicitRhsPipeline()
Get the Op Bondary Rhs Pipeline object for implicit-explicit G term.
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_vector< UserDataOperator > & getOpBoundaryLhsPipeline()
Get the Op Boundary Lhs Pipeline object.
SmartPetscObj< KSP > createKSP(SmartPetscObj< DM > dm=nullptr)
Create KSP (linear) solver.
boost::ptr_vector< UserDataOperator > & getOpSkeletonRhsPipeline()
Get the Op Skeleton Rhs Pipeline object.
boost::ptr_vector< UserDataOperator > & getOpBoundaryRhsPipeline()
Get the Op Boundary Rhs Pipeline object.
SmartPetscObj< TS > createTSIMEX(SmartPetscObj< DM > dm=nullptr)
Create TS (time) implicit-explicit solver.
SmartPetscObj< TS > createTSEX(SmartPetscObj< DM > dm=nullptr)
Create TS (time) explit solver.
boost::ptr_vector< UserDataOperator > & getOpDomainRhsPipeline()
Get the Op Domain Rhs Pipeline object.
boost::ptr_vector< UserDataOperator > & getOpSkeletonLhsPipeline()
Get the Op Skeleton Lhs Pipeline object.
EdgeElementForcesAndSourcesCoreSwitch< 0 > EdgeElementForcesAndSourcesCore
Edge finite element default.
FaceElementForcesAndSourcesCoreSwitch< 0 > FaceElementForcesAndSourcesCore
Face finite element default.
VolumeElementForcesAndSourcesCoreSwitch< 0 > VolumeElementForcesAndSourcesCore
Volume finite element default.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
friend class UserDataOperator
boost::function< int(int order_row, int order_col, int order_data)> RuleHookFun
PipelineManager interface.
boost::shared_ptr< FEMethod > feBoundaryRhs
Element to assemble RHS side by integrating boundary.
boost::shared_ptr< FEMethod > & getDomainRhsFE()
MoFEMErrorCode setSkeletonLhsIntegrationRule(RuleHookFun rule)
boost::shared_ptr< FEMethod > feDomainExplicitRhs
Element to assemble explict Rhs for IMEX solver.
DEPRECATED auto createTS2(SmartPetscObj< DM > dm=nullptr)
boost::shared_ptr< FEMethod > & getDomainLhsFE()
MoFEM::ForcesAndSourcesCore::RuleHookFun RuleHookFun
boost::shared_ptr< FEMethod > feBoundaryLhs
Element to assemble LHS side by integrating boundary.
boost::shared_ptr< FEMethod > & getSkeletonRhsFE()
MoFEMErrorCode setBoundaryExplicitRhsIntegrationRule(RuleHookFun rule)
MoFEM::FaceElementForcesAndSourcesCore FaceEle
boost::shared_ptr< FEMethod > feSkeletonExplicitRhs
SmartPetscObj< TS > createTS(const TSType type, SmartPetscObj< DM > dm=nullptr)
create TS (time) solver
boost::shared_ptr< FEMethod > & getBoundaryLhsFE()
boost::shared_ptr< FEMethod > & getSkeletonLhsFE()
MoFEMErrorCode setDomainRhsIntegrationRule(RuleHookFun rule)
MoFEMErrorCode setBoundaryLhsIntegrationRule(RuleHookFun rule)
boost::shared_ptr< FEMethod > feSkeletonLhs
Element to assemble LHS side by integrating skeleton.
boost::shared_ptr< FEMethod > & createBoundaryFEPipeline(boost::shared_ptr< FEMethod > &fe)
MoFEMErrorCode setBoundaryRhsIntegrationRule(RuleHookFun rule)
MoFEMErrorCode setDomainExplicitRhsIntegrationRule(RuleHookFun rule)
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.
boost::shared_ptr< FEMethod > & getDomainExplicitRhsFE()
boost::shared_ptr< FEMethod > & getBoundaryRhsFE()
boost::shared_ptr< FEMethod > feDomainRhs
Element to assemble RHS side by integrating domain.
boost::shared_ptr< FEMethod > & getSkeletonExplicitRhsFE()
MoFEMErrorCode setDomainLhsIntegrationRule(RuleHookFun rule)
DEPRECATED auto createTS(SmartPetscObj< DM > dm=nullptr)
boost::shared_ptr< FEMethod > & getBoundaryExplicitRhsFE()
MoFEMErrorCode setSkeletonRhsIntegrationRule(RuleHookFun rule)
boost::shared_ptr< FEMethod > feBoundaryExplicitRhs
boost::shared_ptr< FEMethod > & createDomainFEPipeline(boost::shared_ptr< FEMethod > &fe)
PipelineManager(const MoFEM::Core &core)
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
MoFEMErrorCode setSkeletonExplicitRhsIntegrationRule(RuleHookFun rule)
Simple interface for fast problem set-up.
int getDim() const
Get the problem dimension.
base class for all interface classes
Volume finite element with switches.