85 template <
int DIM = -1>
88 template <
int DIM = -1>
91 template <
int DIM = -1>
94 template <
int DIM = -1>
97 template <
int DIM = -1>
100 template <
int DIM = -1>
103 template <
int DIM = -1>
106 template <
int DIM = -1>
109 template <
int DIM = -1>
119 template <
int DIM = -1>
129 template <
int DIM = -1>
139 template <
int DIM = -1>
149 template <
int DIM = -1>
158 template <
int DIM = -1>
168 template <
int DIM = -1>
178 template <
int DIM = -1>
188 template <
int DIM = -1>
198 template <
int DIM = -1>
291 boost::shared_ptr<FEMethod>
293 boost::shared_ptr<FEMethod>
295 boost::shared_ptr<FEMethod>
297 boost::shared_ptr<FEMethod>
299 boost::shared_ptr<FEMethod>
301 boost::shared_ptr<FEMethod>
304 boost::shared_ptr<FEMethod>
306 boost::shared_ptr<FEMethod>
309 boost::shared_ptr<FEMethod>
314 inline boost::shared_ptr<FEMethod> &
318 inline boost::shared_ptr<FEMethod> &
323boost::shared_ptr<FEMethod> &
325 static_assert(DIM == 1 || DIM == 2 || DIM == 3,
"not implemented");
326 fe = boost::make_shared<FEMethod>();
331inline boost::shared_ptr<FEMethod> &
332PipelineManager::createDomainFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
334 fe = boost::make_shared<VolEle>(
cOre);
339inline boost::shared_ptr<FEMethod> &
340PipelineManager::createDomainFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
342 fe = boost::make_shared<FaceEle>(
cOre);
347inline boost::shared_ptr<FEMethod> &
348PipelineManager::createDomainFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
350 fe = boost::make_shared<EdgeEle>(
cOre);
355inline boost::shared_ptr<FEMethod> &
357 switch (cOre.getInterface<Simple>()->getDim()) {
359 return createDomainFEPipeline<1>(fe);
361 return createDomainFEPipeline<2>(fe);
363 return createDomainFEPipeline<3>(fe);
370boost::shared_ptr<FEMethod> &
372 static_assert(DIM == 1 || DIM == 2 || DIM == 3,
"not implemented");
373 fe = boost::make_shared<FEMethod>();
378inline boost::shared_ptr<FEMethod> &
379PipelineManager::createBoundaryFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
381 fe = boost::make_shared<FaceElementForcesAndSourcesCore>(
cOre);
386inline boost::shared_ptr<FEMethod> &
387PipelineManager::createBoundaryFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
389 fe = boost::make_shared<EdgeEle>(
cOre);
394inline boost::shared_ptr<FEMethod> &
395PipelineManager::createBoundaryFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
397 fe = boost::make_shared<VertexElementForcesAndSourcesCore>(
cOre);
438inline boost::shared_ptr<FEMethod> &
442 return createBoundaryFEPipeline<1>(fe);
444 return createBoundaryFEPipeline<2>(fe);
446 return createBoundaryFEPipeline<3>(fe);
453 return boost::dynamic_pointer_cast<T>(
458 return boost::dynamic_pointer_cast<T>(
463 return boost::dynamic_pointer_cast<T>(
467template <
typename T,
int DIM>
469 return boost::dynamic_pointer_cast<T>(
473template <
typename T,
int DIM>
475 return boost::dynamic_pointer_cast<T>(
480 return boost::dynamic_pointer_cast<T>(
484template <
typename T,
int DIM>
486 return boost::dynamic_pointer_cast<T>(
490template <
typename T,
int DIM>
492 return boost::dynamic_pointer_cast<T>(
496template <
typename T,
int DIM>
498 return boost::dynamic_pointer_cast<T>(
506 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
508 ->getRuleHook = rule;
518 return setDomainLhsIntegrationRule<1>(rule);
520 return setDomainLhsIntegrationRule<2>(rule);
522 return setDomainLhsIntegrationRule<3>(rule);
533 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
535 ->getRuleHook = rule;
545 return setDomainRhsIntegrationRule<1>(rule);
547 return setDomainRhsIntegrationRule<2>(rule);
549 return setDomainRhsIntegrationRule<3>(rule);
560 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
562 ->getRuleHook = rule;
572 return setBoundaryLhsIntegrationRule<1>(rule);
574 return setBoundaryLhsIntegrationRule<2>(rule);
576 return setBoundaryLhsIntegrationRule<3>(rule);
587 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
589 ->getRuleHook = rule;
599 return setBoundaryRhsIntegrationRule<1>(rule);
601 return setBoundaryRhsIntegrationRule<2>(rule);
603 return setBoundaryRhsIntegrationRule<3>(rule);
614 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
616 ->getRuleHook = rule;
626 return setSkeletonLhsIntegrationRule<1>(rule);
628 return setSkeletonLhsIntegrationRule<2>(rule);
630 return setSkeletonLhsIntegrationRule<3>(rule);
641 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
643 ->getRuleHook = rule;
653 return setSkeletonRhsIntegrationRule<1>(rule);
655 return setSkeletonRhsIntegrationRule<2>(rule);
657 return setSkeletonRhsIntegrationRule<3>(rule);
668 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
670 ->getRuleHook = rule;
680 return setDomainExplicitRhsIntegrationRule<1>(rule);
682 return setDomainExplicitRhsIntegrationRule<2>(rule);
684 return setDomainExplicitRhsIntegrationRule<3>(rule);
695 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
697 ->getRuleHook = rule;
708 return setBoundaryExplicitRhsIntegrationRule<1>(rule);
710 return setBoundaryExplicitRhsIntegrationRule<2>(rule);
712 return setBoundaryExplicitRhsIntegrationRule<3>(rule);
723 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
725 ->getRuleHook = rule;
736 return setSkeletonExplicitRhsIntegrationRule<1>(rule);
738 return setSkeletonExplicitRhsIntegrationRule<2>(rule);
740 return setSkeletonExplicitRhsIntegrationRule<3>(rule);
748boost::ptr_deque<PipelineManager::UserDataOperator> &
750 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
756inline boost::ptr_deque<PipelineManager::UserDataOperator> &
760 return getOpDomainLhsPipeline<1>();
762 return getOpDomainLhsPipeline<2>();
768 return getOpDomainLhsPipeline<3>();
772boost::ptr_deque<PipelineManager::UserDataOperator> &
774 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
780inline boost::ptr_deque<PipelineManager::UserDataOperator> &
784 return getOpDomainRhsPipeline<1>();
786 return getOpDomainRhsPipeline<2>();
792 return getOpDomainRhsPipeline<3>();
796boost::ptr_deque<PipelineManager::UserDataOperator> &
798 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
804inline boost::ptr_deque<PipelineManager::UserDataOperator> &
808 return getOpBoundaryLhsPipeline<1>();
810 return getOpBoundaryLhsPipeline<2>();
816 return getOpBoundaryLhsPipeline<3>();
820boost::ptr_deque<PipelineManager::UserDataOperator> &
822 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
828inline boost::ptr_deque<PipelineManager::UserDataOperator> &
832 return getOpBoundaryRhsPipeline<1>();
834 return getOpBoundaryRhsPipeline<2>();
840 return getOpBoundaryRhsPipeline<3>();
844boost::ptr_deque<PipelineManager::UserDataOperator> &
846 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
852inline boost::ptr_deque<PipelineManager::UserDataOperator> &
856 return getOpSkeletonLhsPipeline<1>();
858 return getOpSkeletonLhsPipeline<2>();
864 return getOpSkeletonLhsPipeline<3>();
868boost::ptr_deque<PipelineManager::UserDataOperator> &
870 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
876inline boost::ptr_deque<PipelineManager::UserDataOperator> &
880 return getOpSkeletonRhsPipeline<1>();
882 return getOpSkeletonRhsPipeline<2>();
888 return getOpSkeletonRhsPipeline<3>();
892boost::ptr_deque<PipelineManager::UserDataOperator> &
894 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
900inline boost::ptr_deque<PipelineManager::UserDataOperator> &
904 return getOpDomainExplicitRhsPipeline<1>();
906 return getOpDomainExplicitRhsPipeline<2>();
912 return getOpDomainExplicitRhsPipeline<3>();
916boost::ptr_deque<PipelineManager::UserDataOperator> &
918 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
924inline boost::ptr_deque<PipelineManager::UserDataOperator> &
928 return getOpBoundaryExplicitRhsPipeline<1>();
930 return getOpBoundaryExplicitRhsPipeline<2>();
936 return getOpBoundaryExplicitRhsPipeline<3>();
940boost::ptr_deque<PipelineManager::UserDataOperator> &
942 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
948inline boost::ptr_deque<PipelineManager::UserDataOperator> &
952 return getOpSkeletonExplicitRhsPipeline<1>();
954 return getOpSkeletonExplicitRhsPipeline<2>();
960 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_deque< UserDataOperator > & getOpBoundaryExplicitRhsPipeline()
Get the Op Bondary 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) explit 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 form mofem into EntitiesFieldData
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)
auto getCastDomainLhsFE()
MoFEM::VolumeElementForcesAndSourcesCore VolEle
auto getCastBoundaryExplicitRhsFE()
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()
auto getCastBoundaryLhsFE()
auto getCastSkeletonRhsFE()
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
auto getCastSkeletonLhsFE()
boost::shared_ptr< FEMethod > & getBoundaryLhsFE()
boost::shared_ptr< FEMethod > & getSkeletonLhsFE()
MoFEMErrorCode setDomainRhsIntegrationRule(RuleHookFun rule)
auto getCastSkeletonExplicitRhsFE()
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)
auto getCastDomainExplicitRhsFE()
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.
MoFEM::EdgeElementForcesAndSourcesCore EdgeEle
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()
auto getCastBoundaryRhsFE()
MoFEMErrorCode setSkeletonRhsIntegrationRule(RuleHookFun rule)
auto getCastDomainRhsFE()
boost::shared_ptr< FEMethod > feBoundaryExplicitRhs
boost::shared_ptr< FEMethod > & createDomainFEPipeline(boost::shared_ptr< FEMethod > &fe)
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.
intrusive_ptr for managing petsc objects
base class for all interface classes
Volume finite element base.
Base volume element used to integrate on skeleton.