v0.13.1
PipelineManager.hpp
Go to the documentation of this file.
1/** \file PipelineManager.hpp
2 * \brief Header file for basic interface
3 * \ingroup mofem_basic_interface
4 *
5 * Make basic interface, to speedup problem setup and analysts.
6 * See discussion here
7 * <a
8 * href=https://groups.google.com/d/msg/mofem-group/Vkc00aia4dU/o9RF3ZmPAAAJ>link
9 * to google groups</a>
10 *
11 */
12
13#ifndef __BASIC_HPP__
14#define __BASIC_HPP__
15
16#include "UnknownInterface.hpp"
17
18namespace MoFEM {
19
20/**
21 * \brief PipelineManager interface
22 * \ingroup mofem_basic_interface
23 */
25
26 MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
27 UnknownInterface **iface) const;
28
29 PipelineManager(const MoFEM::Core &core);
30
33
37
38 inline boost::shared_ptr<FEMethod> &getDomainLhsFE();
39
40 inline boost::shared_ptr<FEMethod> &getDomainRhsFE();
41
42 inline boost::shared_ptr<FEMethod> &getBoundaryLhsFE();
43
44 inline boost::shared_ptr<FEMethod> &getBoundaryRhsFE();
45
46 inline boost::shared_ptr<FEMethod> &getSkeletonLhsFE();
47
48 inline boost::shared_ptr<FEMethod> &getSkeletonRhsFE();
49
50 inline boost::shared_ptr<FEMethod> &getDomainExplicitRhsFE();
51
52 inline boost::shared_ptr<FEMethod> &getBoundaryExplicitRhsFE();
53
54 inline boost::shared_ptr<FEMethod> &getSkeletonExplicitRhsFE();
55
56 template <int DIM = -1>
58
59 template <int DIM = -1>
61
62 template <int DIM = -1>
64
65 template <int DIM = -1>
67
68 template <int DIM = -1>
70
71 template <int DIM = -1>
73
74 template <int DIM = -1>
76
77 template <int DIM = -1>
79
80 template <int DIM = -1>
82
83 /**
84 * @brief Get the Op Domain Lhs Pipeline object
85 * @ingroup mofem_basic_interface
86 *
87 * @tparam -1
88 * @return boost::ptr_vector<UserDataOperator>&
89 */
90 template <int DIM = -1>
91 inline boost::ptr_vector<UserDataOperator> &getOpDomainLhsPipeline();
92
93 /**
94 * @brief Get the Op Domain Rhs Pipeline object
95 * @ingroup mofem_basic_interface
96 *
97 * @tparam -1
98 * @return boost::ptr_vector<UserDataOperator>&
99 */
100 template <int DIM = -1>
101 inline boost::ptr_vector<UserDataOperator> &getOpDomainRhsPipeline();
102
103 /**
104 * @brief Get the Op Boundary Lhs Pipeline object
105 * @ingroup mofem_basic_interface
106 *
107 * @tparam -1
108 * @return boost::ptr_vector<UserDataOperator>&
109 */
110 template <int DIM = -1>
111 inline boost::ptr_vector<UserDataOperator> &getOpBoundaryLhsPipeline();
112
113 /**
114 * @brief Get the Op Boundary Rhs Pipeline object
115 * @ingroup mofem_basic_interface
116 *
117 * @tparam -1
118 * @return boost::ptr_vector<UserDataOperator>&
119 */
120 template <int DIM = -1>
121 inline boost::ptr_vector<UserDataOperator> &getOpBoundaryRhsPipeline();
122
123 /**
124 * @brief Get the Op Skeleton Lhs Pipeline object
125 * @ingroup mofem_basic_interface
126 *
127 * @return boost::ptr_vector<UserDataOperator>&
128 */
129 template <int DIM = -1>
130 inline boost::ptr_vector<UserDataOperator> &getOpSkeletonLhsPipeline();
131
132 /**
133 * @brief Get the Op Skeleton Rhs Pipeline object
134 * @ingroup mofem_basic_interface
135 *
136 * @tparam -1
137 * @return boost::ptr_vector<UserDataOperator>&
138 */
139 template <int DIM = -1>
140 inline boost::ptr_vector<UserDataOperator> &getOpSkeletonRhsPipeline();
141
142 /**
143 * @brief Get the Op Domain Rhs Pipeline object for implicit-explicit G term
144 * @ingroup mofem_basic_interface
145 *
146 * @tparam -1
147 * @return boost::ptr_vector<UserDataOperator>&
148 */
149 template <int DIM = -1>
150 inline boost::ptr_vector<UserDataOperator> &getOpDomainExplicitRhsPipeline();
151
152 /**
153 * @brief Get the Op Bondary Rhs Pipeline object for implicit-explicit G term
154 * @ingroup mofem_basic_interface
155 *
156 * @tparam -1
157 * @return boost::ptr_vector<UserDataOperator>&
158 */
159 template <int DIM = -1>
160 inline boost::ptr_vector<UserDataOperator> &
162
163 /**
164 * @brief Get the Op Skeleton Rhs Pipeline object for implicit-explicit G term
165 * @ingroup mofem_basic_interface
166 *
167 * @tparam -1
168 * @return boost::ptr_vector<UserDataOperator>&
169 */
170 template <int DIM = -1>
171 inline boost::ptr_vector<UserDataOperator> &
173
174 /**
175 * @brief Iterate finite elements
176 * @ingroup mofem_basic_interface
177 *
178 * @return MoFEMErrorCode
179 */
181
182 /**
183 * @brief Create KSP (linear) solver
184 * @ingroup mofem_basic_interface
185 *
186 * @param dm
187 * @return SmartPetscObj<KSP>
188 */
190
191 /**
192 * @brief Create SNES (nonlinear) solver
193 * @ingroup mofem_basic_interface
194 *
195 * @param dm
196 * @return SmartPetscObj<SNES>
197 */
199
200 enum TSType { EX, IM, IM2, IMEX };
201
202 /**
203 * @brief create TS (time) solver
204 *
205 * @param type Type of time solver PipelineManager:EX/IM/IM2/IMEX
206 * @param dm
207 * @return SmartPetscObj<TS>
208 */
210
211 /**
212 * @brief Create TS (time) explit solver
213 * @ingroup mofem_basic_interface
214 *
215 * @param dm
216 * @return SmartPetscObj<TS>
217 */
219
220 /**
221 * @brief Create TS (time) implicit solver
222 * @ingroup mofem_basic_interface
223 *
224 * @param dm
225 * @return SmartPetscObj<TS>
226 */
228
229 /**
230 * @deprecated Use version with explicit TS solver type
231 */
233 return createTSIM(dm);
234 }
235
236 /**
237 * @brief Create TS (time) solver for second order equation in time
238 * @ingroup mofem_basic_interface
239 *
240 * @param dm
241 * @return SmartPetscObj<TS>
242 */
244
245 /**
246 * @deprecated Change name. Use createTSIM2 instead.
247 */
248 inline DEPRECATED auto createTS2(SmartPetscObj<DM> dm = nullptr) {
249 return createTSIM2(dm);
250 }
251
252 /**
253 * @brief Create TS (time) implicit-explicit solver
254 * @ingroup mofem_basic_interface
255 *
256 * @param dm
257 * @return SmartPetscObj<TS>
258 */
260
261private:
263
264 boost::shared_ptr<FEMethod>
265 feDomainRhs; ///< Element to assemble RHS side by integrating domain
266 boost::shared_ptr<FEMethod>
267 feDomainLhs; ///< Element to assemble LHS side by integrating domain
268 boost::shared_ptr<FEMethod>
269 feBoundaryRhs; ///< Element to assemble RHS side by integrating boundary
270 boost::shared_ptr<FEMethod>
271 feBoundaryLhs; ///< Element to assemble LHS side by integrating boundary
272 boost::shared_ptr<FEMethod>
273 feSkeletonRhs; ///< Element to assemble RHS side by integrating skeleton
274 boost::shared_ptr<FEMethod>
275 feSkeletonLhs; ///< Element to assemble LHS side by integrating skeleton
276
277 boost::shared_ptr<FEMethod>
278 feDomainExplicitRhs; ///< Element to assemble explict Rhs for IMEX solver
279 boost::shared_ptr<FEMethod>
280 feBoundaryExplicitRhs; ///< Element to assemble explict Rhs for IMEX
281 ///< solver
282 boost::shared_ptr<FEMethod>
283 feSkeletonExplicitRhs; ///< Element to assemble explict Rhs for IMEX
284 ///< solver
285
286 template <int DIM>
287 inline boost::shared_ptr<FEMethod> &
288 createDomainFEPipeline(boost::shared_ptr<FEMethod> &fe);
289
290 template <int DIM>
291 inline boost::shared_ptr<FEMethod> &
292 createBoundaryFEPipeline(boost::shared_ptr<FEMethod> &fe);
293};
294
295template <int DIM>
296boost::shared_ptr<FEMethod> &
297PipelineManager::createDomainFEPipeline(boost::shared_ptr<FEMethod> &fe) {
298 static_assert(DIM == 1 || DIM == 2 || DIM == 3, "not implemented");
299 fe = boost::make_shared<FEMethod>();
300 return fe;
301}
302
303template <>
304inline boost::shared_ptr<FEMethod> &
305PipelineManager::createDomainFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
306 if (!fe)
307 fe = boost::make_shared<VolEle>(cOre);
308 return fe;
309}
310
311template <>
312inline boost::shared_ptr<FEMethod> &
313PipelineManager::createDomainFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
314 if (!fe)
315 fe = boost::make_shared<FaceEle>(cOre);
316 return fe;
317}
318
319template <>
320inline boost::shared_ptr<FEMethod> &
321PipelineManager::createDomainFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
322 if (!fe)
323 fe = boost::make_shared<EdgeEle>(cOre);
324 return fe;
325}
326
327template <int DIM>
328boost::shared_ptr<FEMethod> &
329PipelineManager::createBoundaryFEPipeline(boost::shared_ptr<FEMethod> &fe) {
330 static_assert(DIM == 1 || DIM == 2 || DIM == 3, "not implemented");
331 fe = boost::make_shared<FEMethod>();
332 return fe;
333}
334
335template <>
336inline boost::shared_ptr<FEMethod> &
337PipelineManager::createBoundaryFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
338 if (!fe)
339 fe = boost::make_shared<FaceElementForcesAndSourcesCore>(cOre);
340 return fe;
341}
342
343template <>
344inline boost::shared_ptr<FEMethod> &
345PipelineManager::createBoundaryFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
346 if (!fe)
347 fe = boost::make_shared<EdgeEle>(cOre);
348 return fe;
349}
350
351template <>
352inline boost::shared_ptr<FEMethod> &
353PipelineManager::createBoundaryFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
354 if (!fe)
355 fe = boost::make_shared<VertexElementForcesAndSourcesCore>(cOre);
356 return fe;
357}
358
359boost::shared_ptr<FEMethod> &PipelineManager::getDomainLhsFE() {
360 return feDomainLhs;
361}
362
363boost::shared_ptr<FEMethod> &PipelineManager::getDomainRhsFE() {
364 return feDomainRhs;
365}
366
367boost::shared_ptr<FEMethod> &PipelineManager::getBoundaryLhsFE() {
368 return feBoundaryLhs;
369}
370
371boost::shared_ptr<FEMethod> &PipelineManager::getBoundaryRhsFE() {
372 return feBoundaryRhs;
373}
374
375boost::shared_ptr<FEMethod> &PipelineManager::getSkeletonLhsFE() {
376 return feSkeletonLhs;
377}
378
379boost::shared_ptr<FEMethod> &PipelineManager::getSkeletonRhsFE() {
380 return feSkeletonRhs;
381}
382
383boost::shared_ptr<FEMethod> &PipelineManager::getDomainExplicitRhsFE() {
384 return feDomainExplicitRhs;
385}
386
387boost::shared_ptr<FEMethod> &PipelineManager::getBoundaryExplicitRhsFE() {
389}
390
391boost::shared_ptr<FEMethod> &PipelineManager::getSkeletonExplicitRhsFE() {
393}
394
395template <int DIM>
399 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
400 createDomainFEPipeline<DIM>(feDomainLhs))
401 ->getRuleHook = rule;
403}
404
405template <>
409 switch (cOre.getInterface<Simple>()->getDim()) {
410 case 1:
411 return setDomainLhsIntegrationRule<1>(rule);
412 case 2:
413 return setDomainLhsIntegrationRule<2>(rule);
414 case 3:
415 return setDomainLhsIntegrationRule<3>(rule);
416 default:
417 THROW_MESSAGE("Not implemented");
418 }
420}
421
422template <int DIM>
426 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
427 createDomainFEPipeline<DIM>(feDomainRhs))
428 ->getRuleHook = rule;
430}
431
432template <>
436 switch (cOre.getInterface<Simple>()->getDim()) {
437 case 1:
438 return setDomainRhsIntegrationRule<1>(rule);
439 case 2:
440 return setDomainRhsIntegrationRule<2>(rule);
441 case 3:
442 return setDomainRhsIntegrationRule<3>(rule);
443 default:
444 THROW_MESSAGE("Not implemented");
445 }
447}
448
449template <int DIM>
453 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
454 createBoundaryFEPipeline<DIM>(feBoundaryLhs))
455 ->getRuleHook = rule;
457}
458
459template <>
463 switch (cOre.getInterface<Simple>()->getDim()) {
464 case 1:
465 return setBoundaryLhsIntegrationRule<1>(rule);
466 case 2:
467 return setBoundaryLhsIntegrationRule<2>(rule);
468 case 3:
469 return setBoundaryLhsIntegrationRule<3>(rule);
470 default:
471 THROW_MESSAGE("Not implemented");
472 }
474}
475
476template <int DIM>
480 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
481 createBoundaryFEPipeline<DIM>(feBoundaryRhs))
482 ->getRuleHook = rule;
484}
485
486template <>
490 switch (cOre.getInterface<Simple>()->getDim()) {
491 case 1:
492 return setBoundaryRhsIntegrationRule<1>(rule);
493 case 2:
494 return setBoundaryRhsIntegrationRule<2>(rule);
495 case 3:
496 return setBoundaryRhsIntegrationRule<3>(rule);
497 default:
498 THROW_MESSAGE("Not implemented");
499 }
501}
502
503template <int DIM>
507 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
508 createBoundaryFEPipeline<DIM>(feSkeletonLhs))
509 ->getRuleHook = rule;
511}
512
513template <>
517 switch (cOre.getInterface<Simple>()->getDim()) {
518 case 1:
519 return setSkeletonLhsIntegrationRule<1>(rule);
520 case 2:
521 return setSkeletonLhsIntegrationRule<2>(rule);
522 case 3:
523 return setSkeletonLhsIntegrationRule<3>(rule);
524 default:
525 THROW_MESSAGE("Not implemented");
526 }
528}
529
530template <int DIM>
534 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
535 createBoundaryFEPipeline<DIM>(feSkeletonRhs))
536 ->getRuleHook = rule;
538}
539
540template <>
544 switch (cOre.getInterface<Simple>()->getDim()) {
545 case 1:
546 return setSkeletonRhsIntegrationRule<1>(rule);
547 case 2:
548 return setSkeletonRhsIntegrationRule<2>(rule);
549 case 3:
550 return setSkeletonRhsIntegrationRule<3>(rule);
551 default:
552 THROW_MESSAGE("Not implemented");
553 }
555}
556
557template <int DIM>
561 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
562 createDomainFEPipeline<DIM>(feDomainExplicitRhs))
563 ->getRuleHook = rule;
565}
566
567template <>
571 switch (cOre.getInterface<Simple>()->getDim()) {
572 case 1:
573 return setDomainExplicitRhsIntegrationRule<1>(rule);
574 case 2:
575 return setDomainExplicitRhsIntegrationRule<2>(rule);
576 case 3:
577 return setDomainExplicitRhsIntegrationRule<3>(rule);
578 default:
579 THROW_MESSAGE("Not implemented");
580 }
582}
583
584template <int DIM>
588 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
589 createBoundaryFEPipeline<DIM>(feBoundaryExplicitRhs))
590 ->getRuleHook = rule;
592}
593
594template <>
599 switch (cOre.getInterface<Simple>()->getDim()) {
600 case 1:
601 return setBoundaryExplicitRhsIntegrationRule<1>(rule);
602 case 2:
603 return setBoundaryExplicitRhsIntegrationRule<2>(rule);
604 case 3:
605 return setBoundaryExplicitRhsIntegrationRule<3>(rule);
606 default:
607 THROW_MESSAGE("Not implemented");
608 }
610}
611
612template <int DIM>
616 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
617 createBoundaryFEPipeline<DIM>(feSkeletonExplicitRhs))
618 ->getRuleHook = rule;
620}
621
622template <>
627 switch (cOre.getInterface<Simple>()->getDim()) {
628 case 1:
629 return setSkeletonExplicitRhsIntegrationRule<1>(rule);
630 case 2:
631 return setSkeletonExplicitRhsIntegrationRule<2>(rule);
632 case 3:
633 return setSkeletonExplicitRhsIntegrationRule<3>(rule);
634 default:
635 THROW_MESSAGE("Not implemented");
636 }
638}
639
640template <int DIM>
641boost::ptr_vector<PipelineManager::UserDataOperator> &
643 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
644 createDomainFEPipeline<DIM>(feDomainLhs))
645 ->getOpPtrVector();
646}
647
648template <>
649inline boost::ptr_vector<PipelineManager::UserDataOperator> &
651 switch (cOre.getInterface<Simple>()->getDim()) {
652 case 1:
653 return getOpDomainLhsPipeline<1>();
654 case 2:
655 return getOpDomainLhsPipeline<2>();
656 case 3:
657 break;
658 default:
659 THROW_MESSAGE("Not implemented");
660 }
661 return getOpDomainLhsPipeline<3>();
662}
663
664template <int DIM>
665boost::ptr_vector<PipelineManager::UserDataOperator> &
667 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
668 createDomainFEPipeline<DIM>(feDomainRhs))
669 ->getOpPtrVector();
670}
671
672template <>
673inline boost::ptr_vector<PipelineManager::UserDataOperator> &
675 switch (cOre.getInterface<Simple>()->getDim()) {
676 case 1:
677 return getOpDomainRhsPipeline<1>();
678 case 2:
679 return getOpDomainRhsPipeline<2>();
680 case 3:
681 break;
682 default:
683 THROW_MESSAGE("Not implemented");
684 }
685 return getOpDomainRhsPipeline<3>();
686}
687
688template <int DIM>
689boost::ptr_vector<PipelineManager::UserDataOperator> &
691 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
692 createBoundaryFEPipeline<DIM>(feBoundaryLhs))
693 ->getOpPtrVector();
694}
695
696template <>
697inline boost::ptr_vector<PipelineManager::UserDataOperator> &
699 switch (cOre.getInterface<Simple>()->getDim()) {
700 case 1:
701 return getOpBoundaryLhsPipeline<1>();
702 case 2:
703 return getOpBoundaryLhsPipeline<2>();
704 case 3:
705 break;
706 default:
707 THROW_MESSAGE("Not implemented");
708 }
709 return getOpBoundaryLhsPipeline<3>();
710}
711
712template <int DIM>
713boost::ptr_vector<PipelineManager::UserDataOperator> &
715 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
716 createBoundaryFEPipeline<DIM>(feBoundaryRhs))
717 ->getOpPtrVector();
718}
719
720template <>
721inline boost::ptr_vector<PipelineManager::UserDataOperator> &
723 switch (cOre.getInterface<Simple>()->getDim()) {
724 case 1:
725 return getOpBoundaryRhsPipeline<1>();
726 case 2:
727 return getOpBoundaryRhsPipeline<2>();
728 case 3:
729 break;
730 default:
731 THROW_MESSAGE("Not implemented");
732 }
733 return getOpBoundaryRhsPipeline<3>();
734}
735
736template <int DIM>
737boost::ptr_vector<PipelineManager::UserDataOperator> &
739 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
740 createBoundaryFEPipeline<DIM>(feSkeletonLhs))
741 ->getOpPtrVector();
742}
743
744template <>
745inline boost::ptr_vector<PipelineManager::UserDataOperator> &
747 switch (cOre.getInterface<Simple>()->getDim()) {
748 case 1:
749 return getOpSkeletonLhsPipeline<1>();
750 case 2:
751 return getOpSkeletonLhsPipeline<2>();
752 case 3:
753 break;
754 default:
755 THROW_MESSAGE("Not implemented");
756 }
757 return getOpSkeletonLhsPipeline<3>();
758}
759
760template <int DIM>
761boost::ptr_vector<PipelineManager::UserDataOperator> &
763 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
764 createBoundaryFEPipeline<DIM>(feSkeletonRhs))
765 ->getOpPtrVector();
766}
767
768template <>
769inline boost::ptr_vector<PipelineManager::UserDataOperator> &
771 switch (cOre.getInterface<Simple>()->getDim()) {
772 case 1:
773 return getOpSkeletonRhsPipeline<1>();
774 case 2:
775 return getOpSkeletonRhsPipeline<2>();
776 case 3:
777 break;
778 default:
779 THROW_MESSAGE("Not implemented");
780 }
781 return getOpSkeletonRhsPipeline<3>();
782}
783
784template <int DIM>
785boost::ptr_vector<PipelineManager::UserDataOperator> &
787 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
788 createDomainFEPipeline<DIM>(feDomainExplicitRhs))
789 ->getOpPtrVector();
790}
791
792template <>
793inline boost::ptr_vector<PipelineManager::UserDataOperator> &
795 switch (cOre.getInterface<Simple>()->getDim()) {
796 case 1:
797 return getOpDomainExplicitRhsPipeline<1>();
798 case 2:
799 return getOpDomainExplicitRhsPipeline<2>();
800 case 3:
801 break;
802 default:
803 THROW_MESSAGE("Not implemented");
804 }
805 return getOpDomainExplicitRhsPipeline<3>();
806}
807
808template <int DIM>
809boost::ptr_vector<PipelineManager::UserDataOperator> &
811 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
812 createBoundaryFEPipeline<DIM>(feSkeletonExplicitRhs))
813 ->getOpPtrVector();
814}
815
816template <>
817inline boost::ptr_vector<PipelineManager::UserDataOperator> &
819 switch (cOre.getInterface<Simple>()->getDim()) {
820 case 1:
821 return getOpBoundaryExplicitRhsPipeline<1>();
822 case 2:
823 return getOpBoundaryExplicitRhsPipeline<2>();
824 case 3:
825 break;
826 default:
827 THROW_MESSAGE("Not implemented");
828 }
829 return getOpBoundaryExplicitRhsPipeline<3>();
830}
831
832template <int DIM>
833boost::ptr_vector<PipelineManager::UserDataOperator> &
835 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
836 createBoundaryFEPipeline<DIM>(feSkeletonExplicitRhs))
837 ->getOpPtrVector();
838}
839
840template <>
841inline boost::ptr_vector<PipelineManager::UserDataOperator> &
843 switch (cOre.getInterface<Simple>()->getDim()) {
844 case 1:
845 return getOpSkeletonExplicitRhsPipeline<1>();
846 case 2:
847 return getOpSkeletonExplicitRhsPipeline<2>();
848 case 3:
849 break;
850 default:
851 THROW_MESSAGE("Not implemented");
852 }
853 return getOpSkeletonExplicitRhsPipeline<3>();
854}
855
856} // namespace MoFEM
857
858#endif // __BASIC_HPP__
859
860/**
861 * \defgroup mofem_basic_interface PipelineManager interface
862 * \brief Implementation of basic interface for rapid problem implementation.
863 *
864 * \ingroup mofem
865 **/
MoFEM interface.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define DEPRECATED
Definition: definitions.h:17
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
Definition: definitions.h:561
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.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
implementation of Data Operators for Forces and Sources
Definition: MoFEM.hpp:24
Core (interface) class.
Definition: Core.hpp:82
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)
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.
Definition: Simple.hpp:26
int getDim() const
Get the problem dimension.
Definition: Simple.hpp:264
base class for all interface classes