v0.13.2
Loading...
Searching...
No Matches
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 template <int DIM> struct ElementsAndOpsByDim;
39
40 inline boost::shared_ptr<FEMethod> &getDomainLhsFE();
41
42 inline boost::shared_ptr<FEMethod> &getDomainRhsFE();
43
44 inline boost::shared_ptr<FEMethod> &getBoundaryLhsFE();
45
46 inline boost::shared_ptr<FEMethod> &getBoundaryRhsFE();
47
48 inline boost::shared_ptr<FEMethod> &getSkeletonLhsFE();
49
50 inline boost::shared_ptr<FEMethod> &getSkeletonRhsFE();
51
52 inline boost::shared_ptr<FEMethod> &getDomainExplicitRhsFE();
53
54 inline boost::shared_ptr<FEMethod> &getBoundaryExplicitRhsFE();
55
56 inline boost::shared_ptr<FEMethod> &getSkeletonExplicitRhsFE();
57
58 template <int DIM = -1>
60
61 template <int DIM = -1>
63
64 template <int DIM = -1>
66
67 template <int DIM = -1>
69
70 template <int DIM = -1>
72
73 template <int DIM = -1>
75
76 template <int DIM = -1>
78
79 template <int DIM = -1>
81
82 template <int DIM = -1>
84
85 /**
86 * @brief Get the Op Domain Lhs Pipeline object
87 * @ingroup mofem_basic_interface
88 *
89 * @tparam -1
90 * @return boost::ptr_vector<UserDataOperator>&
91 */
92 template <int DIM = -1>
93 inline boost::ptr_vector<UserDataOperator> &getOpDomainLhsPipeline();
94
95 /**
96 * @brief Get the Op Domain Rhs Pipeline object
97 * @ingroup mofem_basic_interface
98 *
99 * @tparam -1
100 * @return boost::ptr_vector<UserDataOperator>&
101 */
102 template <int DIM = -1>
103 inline boost::ptr_vector<UserDataOperator> &getOpDomainRhsPipeline();
104
105 /**
106 * @brief Get the Op Boundary Lhs Pipeline object
107 * @ingroup mofem_basic_interface
108 *
109 * @tparam -1
110 * @return boost::ptr_vector<UserDataOperator>&
111 */
112 template <int DIM = -1>
113 inline boost::ptr_vector<UserDataOperator> &getOpBoundaryLhsPipeline();
114
115 /**
116 * @brief Get the Op Boundary Rhs Pipeline object
117 * @ingroup mofem_basic_interface
118 *
119 * @tparam -1
120 * @return boost::ptr_vector<UserDataOperator>&
121 */
122 template <int DIM = -1>
123 inline boost::ptr_vector<UserDataOperator> &getOpBoundaryRhsPipeline();
124
125 /**
126 * @brief Get the Op Skeleton Lhs Pipeline object
127 * @ingroup mofem_basic_interface
128 *
129 * @return boost::ptr_vector<UserDataOperator>&
130 */
131 template <int DIM = -1>
132 inline boost::ptr_vector<UserDataOperator> &getOpSkeletonLhsPipeline();
133
134 /**
135 * @brief Get the Op Skeleton Rhs Pipeline object
136 * @ingroup mofem_basic_interface
137 *
138 * @tparam -1
139 * @return boost::ptr_vector<UserDataOperator>&
140 */
141 template <int DIM = -1>
142 inline boost::ptr_vector<UserDataOperator> &getOpSkeletonRhsPipeline();
143
144 /**
145 * @brief Get the Op Domain Rhs Pipeline object for implicit-explicit G term
146 * @ingroup mofem_basic_interface
147 *
148 * @tparam -1
149 * @return boost::ptr_vector<UserDataOperator>&
150 */
151 template <int DIM = -1>
152 inline boost::ptr_vector<UserDataOperator> &getOpDomainExplicitRhsPipeline();
153
154 /**
155 * @brief Get the Op Bondary Rhs Pipeline object for implicit-explicit G term
156 * @ingroup mofem_basic_interface
157 *
158 * @tparam -1
159 * @return boost::ptr_vector<UserDataOperator>&
160 */
161 template <int DIM = -1>
162 inline boost::ptr_vector<UserDataOperator> &
164
165 /**
166 * @brief Get the Op Skeleton Rhs Pipeline object for implicit-explicit G term
167 * @ingroup mofem_basic_interface
168 *
169 * @tparam -1
170 * @return boost::ptr_vector<UserDataOperator>&
171 */
172 template <int DIM = -1>
173 inline boost::ptr_vector<UserDataOperator> &
175
176 /**
177 * @brief Iterate finite elements
178 * @ingroup mofem_basic_interface
179 *
180 * @return MoFEMErrorCode
181 */
183
184 /**
185 * @brief Create KSP (linear) solver
186 * @ingroup mofem_basic_interface
187 *
188 * @param dm
189 * @return SmartPetscObj<KSP>
190 */
192
193 /**
194 * @brief Create SNES (nonlinear) solver
195 * @ingroup mofem_basic_interface
196 *
197 * @param dm
198 * @return SmartPetscObj<SNES>
199 */
201
202 enum TSType { EX, IM, IM2, IMEX };
203
204 /**
205 * @brief create TS (time) solver
206 *
207 * @param type Type of time solver PipelineManager:EX/IM/IM2/IMEX
208 * @param dm
209 * @return SmartPetscObj<TS>
210 */
211 SmartPetscObj<TS> createTS(const TSType type, SmartPetscObj<DM> dm = nullptr);
212
213 /**
214 * @brief Create TS (time) explit solver
215 * @ingroup mofem_basic_interface
216 *
217 * @param dm
218 * @return SmartPetscObj<TS>
219 */
221
222 /**
223 * @brief Create TS (time) implicit solver
224 * @ingroup mofem_basic_interface
225 *
226 * @param dm
227 * @return SmartPetscObj<TS>
228 */
230
231 /**
232 * @deprecated Use version with explicit TS solver type
233 */
235 return createTSIM(dm);
236 }
237
238 /**
239 * @brief Create TS (time) solver for second order equation in time
240 * @ingroup mofem_basic_interface
241 *
242 * @param dm
243 * @return SmartPetscObj<TS>
244 */
246
247 /**
248 * @deprecated Change name. Use createTSIM2 instead.
249 */
250 inline DEPRECATED auto createTS2(SmartPetscObj<DM> dm = nullptr) {
251 return createTSIM2(dm);
252 }
253
254 /**
255 * @brief Create TS (time) implicit-explicit solver
256 * @ingroup mofem_basic_interface
257 *
258 * @param dm
259 * @return SmartPetscObj<TS>
260 */
262
263private:
265
266 boost::shared_ptr<FEMethod>
267 feDomainRhs; ///< Element to assemble RHS side by integrating domain
268 boost::shared_ptr<FEMethod>
269 feDomainLhs; ///< Element to assemble LHS side by integrating domain
270 boost::shared_ptr<FEMethod>
271 feBoundaryRhs; ///< Element to assemble RHS side by integrating boundary
272 boost::shared_ptr<FEMethod>
273 feBoundaryLhs; ///< Element to assemble LHS side by integrating boundary
274 boost::shared_ptr<FEMethod>
275 feSkeletonRhs; ///< Element to assemble RHS side by integrating skeleton
276 boost::shared_ptr<FEMethod>
277 feSkeletonLhs; ///< Element to assemble LHS side by integrating skeleton
278
279 boost::shared_ptr<FEMethod>
280 feDomainExplicitRhs; ///< Element to assemble explict Rhs for IMEX solver
281 boost::shared_ptr<FEMethod>
282 feBoundaryExplicitRhs; ///< Element to assemble explict Rhs for IMEX
283 ///< solver
284 boost::shared_ptr<FEMethod>
285 feSkeletonExplicitRhs; ///< Element to assemble explict Rhs for IMEX
286 ///< solver
287
288 template <int DIM>
289 inline boost::shared_ptr<FEMethod> &
290 createDomainFEPipeline(boost::shared_ptr<FEMethod> &fe);
291
292 template <int DIM>
293 inline boost::shared_ptr<FEMethod> &
294 createBoundaryFEPipeline(boost::shared_ptr<FEMethod> &fe);
295};
296
297template <int DIM>
298boost::shared_ptr<FEMethod> &
299PipelineManager::createDomainFEPipeline(boost::shared_ptr<FEMethod> &fe) {
300 static_assert(DIM == 1 || DIM == 2 || DIM == 3, "not implemented");
301 fe = boost::make_shared<FEMethod>();
302 return fe;
303}
304
305template <>
306inline boost::shared_ptr<FEMethod> &
307PipelineManager::createDomainFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
308 if (!fe)
309 fe = boost::make_shared<VolEle>(cOre);
310 return fe;
311}
312
313template <>
314inline boost::shared_ptr<FEMethod> &
315PipelineManager::createDomainFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
316 if (!fe)
317 fe = boost::make_shared<FaceEle>(cOre);
318 return fe;
319}
320
321template <>
322inline boost::shared_ptr<FEMethod> &
323PipelineManager::createDomainFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
324 if (!fe)
325 fe = boost::make_shared<EdgeEle>(cOre);
326 return fe;
327}
328
329template <int DIM>
330boost::shared_ptr<FEMethod> &
331PipelineManager::createBoundaryFEPipeline(boost::shared_ptr<FEMethod> &fe) {
332 static_assert(DIM == 1 || DIM == 2 || DIM == 3, "not implemented");
333 fe = boost::make_shared<FEMethod>();
334 return fe;
335}
336
337template <>
338inline boost::shared_ptr<FEMethod> &
339PipelineManager::createBoundaryFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
340 if (!fe)
341 fe = boost::make_shared<FaceElementForcesAndSourcesCore>(cOre);
342 return fe;
343}
344
345template <>
346inline boost::shared_ptr<FEMethod> &
347PipelineManager::createBoundaryFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
348 if (!fe)
349 fe = boost::make_shared<EdgeEle>(cOre);
350 return fe;
351}
352
353template <>
354inline boost::shared_ptr<FEMethod> &
355PipelineManager::createBoundaryFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
356 if (!fe)
357 fe = boost::make_shared<VertexElementForcesAndSourcesCore>(cOre);
358 return fe;
359}
360
361boost::shared_ptr<FEMethod> &PipelineManager::getDomainLhsFE() {
362 return feDomainLhs;
363}
364
365boost::shared_ptr<FEMethod> &PipelineManager::getDomainRhsFE() {
366 return feDomainRhs;
367}
368
369boost::shared_ptr<FEMethod> &PipelineManager::getBoundaryLhsFE() {
370 return feBoundaryLhs;
371}
372
373boost::shared_ptr<FEMethod> &PipelineManager::getBoundaryRhsFE() {
374 return feBoundaryRhs;
375}
376
377boost::shared_ptr<FEMethod> &PipelineManager::getSkeletonLhsFE() {
378 return feSkeletonLhs;
379}
380
381boost::shared_ptr<FEMethod> &PipelineManager::getSkeletonRhsFE() {
382 return feSkeletonRhs;
383}
384
385boost::shared_ptr<FEMethod> &PipelineManager::getDomainExplicitRhsFE() {
386 return feDomainExplicitRhs;
387}
388
389boost::shared_ptr<FEMethod> &PipelineManager::getBoundaryExplicitRhsFE() {
391}
392
393boost::shared_ptr<FEMethod> &PipelineManager::getSkeletonExplicitRhsFE() {
395}
396
397template <int DIM>
401 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
402 createDomainFEPipeline<DIM>(feDomainLhs))
403 ->getRuleHook = rule;
405}
406
407template <>
411 switch (cOre.getInterface<Simple>()->getDim()) {
412 case 1:
413 return setDomainLhsIntegrationRule<1>(rule);
414 case 2:
415 return setDomainLhsIntegrationRule<2>(rule);
416 case 3:
417 return setDomainLhsIntegrationRule<3>(rule);
418 default:
419 THROW_MESSAGE("Not implemented");
420 }
422}
423
424template <int DIM>
428 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
429 createDomainFEPipeline<DIM>(feDomainRhs))
430 ->getRuleHook = rule;
432}
433
434template <>
438 switch (cOre.getInterface<Simple>()->getDim()) {
439 case 1:
440 return setDomainRhsIntegrationRule<1>(rule);
441 case 2:
442 return setDomainRhsIntegrationRule<2>(rule);
443 case 3:
444 return setDomainRhsIntegrationRule<3>(rule);
445 default:
446 THROW_MESSAGE("Not implemented");
447 }
449}
450
451template <int DIM>
455 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
456 createBoundaryFEPipeline<DIM>(feBoundaryLhs))
457 ->getRuleHook = rule;
459}
460
461template <>
465 switch (cOre.getInterface<Simple>()->getDim()) {
466 case 1:
467 return setBoundaryLhsIntegrationRule<1>(rule);
468 case 2:
469 return setBoundaryLhsIntegrationRule<2>(rule);
470 case 3:
471 return setBoundaryLhsIntegrationRule<3>(rule);
472 default:
473 THROW_MESSAGE("Not implemented");
474 }
476}
477
478template <int DIM>
482 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
483 createBoundaryFEPipeline<DIM>(feBoundaryRhs))
484 ->getRuleHook = rule;
486}
487
488template <>
492 switch (cOre.getInterface<Simple>()->getDim()) {
493 case 1:
494 return setBoundaryRhsIntegrationRule<1>(rule);
495 case 2:
496 return setBoundaryRhsIntegrationRule<2>(rule);
497 case 3:
498 return setBoundaryRhsIntegrationRule<3>(rule);
499 default:
500 THROW_MESSAGE("Not implemented");
501 }
503}
504
505template <int DIM>
509 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
510 createBoundaryFEPipeline<DIM>(feSkeletonLhs))
511 ->getRuleHook = rule;
513}
514
515template <>
519 switch (cOre.getInterface<Simple>()->getDim()) {
520 case 1:
521 return setSkeletonLhsIntegrationRule<1>(rule);
522 case 2:
523 return setSkeletonLhsIntegrationRule<2>(rule);
524 case 3:
525 return setSkeletonLhsIntegrationRule<3>(rule);
526 default:
527 THROW_MESSAGE("Not implemented");
528 }
530}
531
532template <int DIM>
536 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
537 createBoundaryFEPipeline<DIM>(feSkeletonRhs))
538 ->getRuleHook = rule;
540}
541
542template <>
546 switch (cOre.getInterface<Simple>()->getDim()) {
547 case 1:
548 return setSkeletonRhsIntegrationRule<1>(rule);
549 case 2:
550 return setSkeletonRhsIntegrationRule<2>(rule);
551 case 3:
552 return setSkeletonRhsIntegrationRule<3>(rule);
553 default:
554 THROW_MESSAGE("Not implemented");
555 }
557}
558
559template <int DIM>
563 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
564 createDomainFEPipeline<DIM>(feDomainExplicitRhs))
565 ->getRuleHook = rule;
567}
568
569template <>
573 switch (cOre.getInterface<Simple>()->getDim()) {
574 case 1:
575 return setDomainExplicitRhsIntegrationRule<1>(rule);
576 case 2:
577 return setDomainExplicitRhsIntegrationRule<2>(rule);
578 case 3:
579 return setDomainExplicitRhsIntegrationRule<3>(rule);
580 default:
581 THROW_MESSAGE("Not implemented");
582 }
584}
585
586template <int DIM>
590 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
591 createBoundaryFEPipeline<DIM>(feBoundaryExplicitRhs))
592 ->getRuleHook = rule;
594}
595
596template <>
601 switch (cOre.getInterface<Simple>()->getDim()) {
602 case 1:
603 return setBoundaryExplicitRhsIntegrationRule<1>(rule);
604 case 2:
605 return setBoundaryExplicitRhsIntegrationRule<2>(rule);
606 case 3:
607 return setBoundaryExplicitRhsIntegrationRule<3>(rule);
608 default:
609 THROW_MESSAGE("Not implemented");
610 }
612}
613
614template <int DIM>
618 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
619 createBoundaryFEPipeline<DIM>(feSkeletonExplicitRhs))
620 ->getRuleHook = rule;
622}
623
624template <>
629 switch (cOre.getInterface<Simple>()->getDim()) {
630 case 1:
631 return setSkeletonExplicitRhsIntegrationRule<1>(rule);
632 case 2:
633 return setSkeletonExplicitRhsIntegrationRule<2>(rule);
634 case 3:
635 return setSkeletonExplicitRhsIntegrationRule<3>(rule);
636 default:
637 THROW_MESSAGE("Not implemented");
638 }
640}
641
642template <int DIM>
643boost::ptr_vector<PipelineManager::UserDataOperator> &
645 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
646 createDomainFEPipeline<DIM>(feDomainLhs))
647 ->getOpPtrVector();
648}
649
650template <>
651inline boost::ptr_vector<PipelineManager::UserDataOperator> &
653 switch (cOre.getInterface<Simple>()->getDim()) {
654 case 1:
655 return getOpDomainLhsPipeline<1>();
656 case 2:
657 return getOpDomainLhsPipeline<2>();
658 case 3:
659 break;
660 default:
661 THROW_MESSAGE("Not implemented");
662 }
663 return getOpDomainLhsPipeline<3>();
664}
665
666template <int DIM>
667boost::ptr_vector<PipelineManager::UserDataOperator> &
669 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
670 createDomainFEPipeline<DIM>(feDomainRhs))
671 ->getOpPtrVector();
672}
673
674template <>
675inline boost::ptr_vector<PipelineManager::UserDataOperator> &
677 switch (cOre.getInterface<Simple>()->getDim()) {
678 case 1:
679 return getOpDomainRhsPipeline<1>();
680 case 2:
681 return getOpDomainRhsPipeline<2>();
682 case 3:
683 break;
684 default:
685 THROW_MESSAGE("Not implemented");
686 }
687 return getOpDomainRhsPipeline<3>();
688}
689
690template <int DIM>
691boost::ptr_vector<PipelineManager::UserDataOperator> &
693 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
694 createBoundaryFEPipeline<DIM>(feBoundaryLhs))
695 ->getOpPtrVector();
696}
697
698template <>
699inline boost::ptr_vector<PipelineManager::UserDataOperator> &
701 switch (cOre.getInterface<Simple>()->getDim()) {
702 case 1:
703 return getOpBoundaryLhsPipeline<1>();
704 case 2:
705 return getOpBoundaryLhsPipeline<2>();
706 case 3:
707 break;
708 default:
709 THROW_MESSAGE("Not implemented");
710 }
711 return getOpBoundaryLhsPipeline<3>();
712}
713
714template <int DIM>
715boost::ptr_vector<PipelineManager::UserDataOperator> &
717 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
718 createBoundaryFEPipeline<DIM>(feBoundaryRhs))
719 ->getOpPtrVector();
720}
721
722template <>
723inline boost::ptr_vector<PipelineManager::UserDataOperator> &
725 switch (cOre.getInterface<Simple>()->getDim()) {
726 case 1:
727 return getOpBoundaryRhsPipeline<1>();
728 case 2:
729 return getOpBoundaryRhsPipeline<2>();
730 case 3:
731 break;
732 default:
733 THROW_MESSAGE("Not implemented");
734 }
735 return getOpBoundaryRhsPipeline<3>();
736}
737
738template <int DIM>
739boost::ptr_vector<PipelineManager::UserDataOperator> &
741 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
742 createBoundaryFEPipeline<DIM>(feSkeletonLhs))
743 ->getOpPtrVector();
744}
745
746template <>
747inline boost::ptr_vector<PipelineManager::UserDataOperator> &
749 switch (cOre.getInterface<Simple>()->getDim()) {
750 case 1:
751 return getOpSkeletonLhsPipeline<1>();
752 case 2:
753 return getOpSkeletonLhsPipeline<2>();
754 case 3:
755 break;
756 default:
757 THROW_MESSAGE("Not implemented");
758 }
759 return getOpSkeletonLhsPipeline<3>();
760}
761
762template <int DIM>
763boost::ptr_vector<PipelineManager::UserDataOperator> &
765 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
766 createBoundaryFEPipeline<DIM>(feSkeletonRhs))
767 ->getOpPtrVector();
768}
769
770template <>
771inline boost::ptr_vector<PipelineManager::UserDataOperator> &
773 switch (cOre.getInterface<Simple>()->getDim()) {
774 case 1:
775 return getOpSkeletonRhsPipeline<1>();
776 case 2:
777 return getOpSkeletonRhsPipeline<2>();
778 case 3:
779 break;
780 default:
781 THROW_MESSAGE("Not implemented");
782 }
783 return getOpSkeletonRhsPipeline<3>();
784}
785
786template <int DIM>
787boost::ptr_vector<PipelineManager::UserDataOperator> &
789 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
790 createDomainFEPipeline<DIM>(feDomainExplicitRhs))
791 ->getOpPtrVector();
792}
793
794template <>
795inline boost::ptr_vector<PipelineManager::UserDataOperator> &
797 switch (cOre.getInterface<Simple>()->getDim()) {
798 case 1:
799 return getOpDomainExplicitRhsPipeline<1>();
800 case 2:
801 return getOpDomainExplicitRhsPipeline<2>();
802 case 3:
803 break;
804 default:
805 THROW_MESSAGE("Not implemented");
806 }
807 return getOpDomainExplicitRhsPipeline<3>();
808}
809
810template <int DIM>
811boost::ptr_vector<PipelineManager::UserDataOperator> &
813 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
814 createBoundaryFEPipeline<DIM>(feSkeletonExplicitRhs))
815 ->getOpPtrVector();
816}
817
818template <>
819inline boost::ptr_vector<PipelineManager::UserDataOperator> &
821 switch (cOre.getInterface<Simple>()->getDim()) {
822 case 1:
823 return getOpBoundaryExplicitRhsPipeline<1>();
824 case 2:
825 return getOpBoundaryExplicitRhsPipeline<2>();
826 case 3:
827 break;
828 default:
829 THROW_MESSAGE("Not implemented");
830 }
831 return getOpBoundaryExplicitRhsPipeline<3>();
832}
833
834template <int DIM>
835boost::ptr_vector<PipelineManager::UserDataOperator> &
837 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
838 createBoundaryFEPipeline<DIM>(feSkeletonExplicitRhs))
839 ->getOpPtrVector();
840}
841
842template <>
843inline boost::ptr_vector<PipelineManager::UserDataOperator> &
845 switch (cOre.getInterface<Simple>()->getDim()) {
846 case 1:
847 return getOpSkeletonExplicitRhsPipeline<1>();
848 case 2:
849 return getOpSkeletonExplicitRhsPipeline<2>();
850 case 3:
851 break;
852 default:
853 THROW_MESSAGE("Not implemented");
854 }
855 return getOpSkeletonExplicitRhsPipeline<3>();
856}
857
864};
865
870 // !!! Not yet implemented
871 // using DomianParentEle = VolumeElementForcesAndSourcesCoreOnChildParent;
873};
874
875} // namespace MoFEM
876
877#endif // __BASIC_HPP__
878
879/**
880 * \defgroup mofem_basic_interface PipelineManager interface
881 * \brief Implementation of basic interface for rapid problem implementation.
882 *
883 * \ingroup mofem
884 **/
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: Common.hpp:10
Core (interface) class.
Definition: Core.hpp:82
Base face element used to integrate on skeleton.
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)
MoFEM::VolumeElementForcesAndSourcesCore VolEle
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.
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()
MoFEMErrorCode setSkeletonRhsIntegrationRule(RuleHookFun rule)
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.
Definition: Simple.hpp:27
int getDim() const
Get the problem dimension.
Definition: Simple.hpp:271
intrusive_ptr for managing petsc objects
base class for all interface classes
Base volume element used to integrate on skeleton.