v0.15.0
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 speed up problem setup and analysis.
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 /**
27 * @brief Query interface for type-safe casting
28 *
29 * @param type_index Type index of the requested interface
30 * @param iface Pointer to interface pointer to be set
31 * @return MoFEMErrorCode Error code (0 on success)
32 */
33 MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
34 UnknownInterface **iface) const;
35
36 /**
37 * @brief Construct PipelineManager
38 *
39 * @param core Reference to MoFEM core instance
40 */
41 PipelineManager(const MoFEM::Core &core);
42
45
49
50 /**
51 * @brief Template struct for dimension-specific finite element types
52 *
53 * @tparam DIM Problem dimension (1, 2, or 3)
54 */
55 template <int DIM> struct ElementsAndOpsByDim;
56
57 /**
58 * @brief Get domain left-hand side finite element
59 *
60 * @return boost::shared_ptr<FEMethod>& Reference to domain LHS finite element for matrix assembly
61 */
62 inline boost::shared_ptr<FEMethod> &getDomainLhsFE();
63
64 /**
65 * @brief Get domain right-hand side finite element
66 *
67 * @return boost::shared_ptr<FEMethod>& Reference to domain RHS finite element for vector assembly
68 */
69 inline boost::shared_ptr<FEMethod> &getDomainRhsFE();
70
71 /**
72 * @brief Get boundary left-hand side finite element
73 *
74 * @return boost::shared_ptr<FEMethod>& Reference to boundary LHS finite element for matrix assembly
75 */
76 inline boost::shared_ptr<FEMethod> &getBoundaryLhsFE();
77
78 /**
79 * @brief Get boundary right-hand side finite element
80 *
81 * @return boost::shared_ptr<FEMethod>& Reference to boundary RHS finite element for vector assembly
82 */
83 inline boost::shared_ptr<FEMethod> &getBoundaryRhsFE();
84
85 /**
86 * @brief Get skeleton left-hand side finite element
87 *
88 * @return boost::shared_ptr<FEMethod>& Reference to skeleton LHS finite element for matrix assembly
89 */
90 inline boost::shared_ptr<FEMethod> &getSkeletonLhsFE();
91
92 /**
93 * @brief Get skeleton right-hand side finite element
94 *
95 * @return boost::shared_ptr<FEMethod>& Reference to skeleton RHS finite element for vector assembly
96 */
97 inline boost::shared_ptr<FEMethod> &getSkeletonRhsFE();
98
99 /**
100 * @brief Get domain explicit right-hand side finite element
101 *
102 * @return boost::shared_ptr<FEMethod>& Reference to domain explicit RHS finite element for IMEX schemes
103 */
104 inline boost::shared_ptr<FEMethod> &getDomainExplicitRhsFE();
105
106 /**
107 * @brief Get boundary explicit right-hand side finite element
108 *
109 * @return boost::shared_ptr<FEMethod>& Reference to boundary explicit RHS finite element for IMEX schemes
110 */
111 inline boost::shared_ptr<FEMethod> &getBoundaryExplicitRhsFE();
112
113 /**
114 * @brief Get skeleton explicit right-hand side finite element
115 *
116 * @return boost::shared_ptr<FEMethod>& Reference to skeleton explicit RHS finite element for IMEX schemes
117 */
118 inline boost::shared_ptr<FEMethod> &getSkeletonExplicitRhsFE();
119
120 /**
121 * @brief Get meshset right-hand side finite element
122 *
123 * @return boost::shared_ptr<FEMethod>& Reference to meshset RHS finite element for vector assembly
124 */
125 inline boost::shared_ptr<FEMethod> &getMeshsetRhsFE();
126
127 /**
128 * @brief Get meshset left-hand side finite element
129 *
130 * @return boost::shared_ptr<FEMethod>& Reference to meshset LHS finite element for matrix assembly
131 */
132 inline boost::shared_ptr<FEMethod> &getMeshsetLhsFE();
133
134 /**
135 * @brief Get meshset explicit right-hand side finite element
136 *
137 * @return boost::shared_ptr<FEMethod>& Reference to meshset explicit RHS finite element for IMEX schemes
138 */
139 inline boost::shared_ptr<FEMethod> &getMeshsetExplicitRhsFE();
140
141 /**
142 * @brief Get typed domain left-hand side finite element
143 *
144 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
145 * @tparam DIM Dimension (-1 for automatic detection from problem)
146 * @return auto Shared pointer to typed domain LHS finite element
147 */
148 template <typename T = ForcesAndSourcesCore, int DIM = -1>
149 inline auto getCastDomainLhsFE();
150
151 /**
152 * @brief Get typed domain right-hand side finite element
153 *
154 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
155 * @tparam DIM Dimension (-1 for automatic detection from problem)
156 * @return auto Shared pointer to typed domain RHS finite element
157 */
158 template <typename T = ForcesAndSourcesCore, int DIM = -1>
159 inline auto getCastDomainRhsFE();
160
161 /**
162 * @brief Get typed boundary left-hand side finite element
163 *
164 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
165 * @tparam DIM Dimension (-1 for automatic detection from problem)
166 * @return auto Shared pointer to typed boundary LHS finite element
167 */
168 template <typename T = ForcesAndSourcesCore, int DIM = -1>
169 inline auto getCastBoundaryLhsFE();
170
171 /**
172 * @brief Get typed boundary right-hand side finite element
173 *
174 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
175 * @tparam DIM Dimension (-1 for automatic detection from problem)
176 * @return auto Shared pointer to typed boundary RHS finite element
177 */
178 template <typename T = ForcesAndSourcesCore, int DIM = -1>
179 inline auto getCastBoundaryRhsFE();
180
181 /**
182 * @brief Get typed skeleton left-hand side finite element
183 *
184 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
185 * @tparam DIM Dimension (-1 for automatic detection from problem)
186 * @return auto Shared pointer to typed skeleton LHS finite element
187 */
188 template <typename T = ForcesAndSourcesCore, int DIM = -1>
189 inline auto getCastSkeletonLhsFE();
190
191 /**
192 * @brief Get typed skeleton right-hand side finite element
193 *
194 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
195 * @tparam DIM Dimension (-1 for automatic detection from problem)
196 * @return auto Shared pointer to typed skeleton RHS finite element
197 */
198 template <typename T = ForcesAndSourcesCore, int DIM = -1>
199 inline auto getCastSkeletonRhsFE();
200
201 /**
202 * @brief Get typed domain explicit right-hand side finite element
203 *
204 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
205 * @tparam DIM Dimension (-1 for automatic detection from problem)
206 * @return auto Shared pointer to typed domain explicit RHS finite element
207 */
208 template <typename T = ForcesAndSourcesCore, int DIM = -1>
209 inline auto getCastDomainExplicitRhsFE();
210
211 /**
212 * @brief Get typed boundary explicit right-hand side finite element
213 *
214 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
215 * @tparam DIM Dimension (-1 for automatic detection from problem)
216 * @return auto Shared pointer to typed boundary explicit RHS finite element
217 */
218 template <typename T = ForcesAndSourcesCore, int DIM = -1>
219 inline auto getCastBoundaryExplicitRhsFE();
220
221 /**
222 * @brief Get typed skeleton explicit right-hand side finite element
223 *
224 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
225 * @tparam DIM Dimension (-1 for automatic detection from problem)
226 * @return auto Shared pointer to typed skeleton explicit RHS finite element
227 */
228 template <typename T = ForcesAndSourcesCore, int DIM = -1>
229 inline auto getCastSkeletonExplicitRhsFE();
230
231 /**
232 * @brief Get typed meshset right-hand side finite element
233 *
234 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
235 * @return auto Shared pointer to typed meshset RHS finite element
236 */
237 template <typename T = ForcesAndSourcesCore>
238 inline auto getCastMeshsetRhsFE();
239
240 /**
241 * @brief Get typed meshset left-hand side finite element
242 *
243 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
244 * @return auto Shared pointer to typed meshset LHS finite element
245 */
246 template <typename T = ForcesAndSourcesCore>
247 inline auto getCastMeshsetLhsFE();
248
249 /**
250 * @brief Get typed meshset explicit right-hand side finite element
251 *
252 * @tparam T Target finite element type (default: ForcesAndSourcesCore)
253 * @return auto Shared pointer to typed meshset explicit RHS finite element
254 */
255 template <typename T = ForcesAndSourcesCore>
256 inline auto getCastMeshsetExplicitRhsFE();
257
258 /**
259 * @brief Set integration rule for domain left-hand side finite element
260 *
261 * @tparam DIM Dimension (-1 for automatic detection from problem)
262 * @param rule Integration rule hook function
263 * @return MoFEMErrorCode Error code (0 on success)
264 */
265 template <int DIM = -1>
267
268 /**
269 * @brief Set integration rule for domain right-hand side finite element
270 *
271 * @tparam DIM Dimension (-1 for automatic detection from problem)
272 * @param rule Integration rule hook function
273 * @return MoFEMErrorCode Error code (0 on success)
274 */
275 template <int DIM = -1>
277
278 /**
279 * @brief Set integration rule for boundary left-hand side finite element
280 *
281 * @tparam DIM Dimension (-1 for automatic detection from problem)
282 * @param rule Integration rule hook function
283 * @return MoFEMErrorCode Error code (0 on success)
284 */
285 template <int DIM = -1>
287
288 /**
289 * @brief Set integration rule for boundary right-hand side finite element
290 *
291 * @tparam DIM Dimension (-1 for automatic detection from problem)
292 * @param rule Integration rule hook function
293 * @return MoFEMErrorCode Error code (0 on success)
294 */
295 template <int DIM = -1>
297
298 /**
299 * @brief Set integration rule for skeleton left-hand side finite element
300 *
301 * @tparam DIM Dimension (-1 for automatic detection from problem)
302 * @param rule Integration rule hook function
303 * @return MoFEMErrorCode Error code (0 on success)
304 */
305 template <int DIM = -1>
307
308 /**
309 * @brief Set integration rule for skeleton right-hand side finite element
310 *
311 * @tparam DIM Dimension (-1 for automatic detection from problem)
312 * @param rule Integration rule hook function
313 * @return MoFEMErrorCode Error code (0 on success)
314 */
315 template <int DIM = -1>
317
318 /**
319 * @brief Set integration rule for domain explicit right-hand side finite element
320 *
321 * @tparam DIM Dimension (-1 for automatic detection from problem)
322 * @param rule Integration rule hook function
323 * @return MoFEMErrorCode Error code (0 on success)
324 */
325 template <int DIM = -1>
327
328 /**
329 * @brief Set integration rule for boundary explicit right-hand side finite element
330 *
331 * @tparam DIM Dimension (-1 for automatic detection from problem)
332 * @param rule Integration rule hook function
333 * @return MoFEMErrorCode Error code (0 on success)
334 */
335 template <int DIM = -1>
337
338 /**
339 * @brief Set integration rule for skeleton explicit right-hand side finite element
340 *
341 * @tparam DIM Dimension (-1 for automatic detection from problem)
342 * @param rule Integration rule hook function
343 * @return MoFEMErrorCode Error code (0 on success)
344 */
345 template <int DIM = -1>
347
348 /**
349 * @brief Get the Op Domain Lhs Pipeline object
350 * @ingroup mofem_basic_interface
351 *
352 * @tparam -1
353 * @return boost::ptr_deque<UserDataOperator>&
354 */
355 template <int DIM = -1>
356 inline boost::ptr_deque<UserDataOperator> &getOpDomainLhsPipeline();
357
358 /**
359 * @brief Get the Op Domain Rhs Pipeline object
360 * @ingroup mofem_basic_interface
361 *
362 * @tparam -1
363 * @return boost::ptr_deque<UserDataOperator>&
364 */
365 template <int DIM = -1>
366 inline boost::ptr_deque<UserDataOperator> &getOpDomainRhsPipeline();
367
368 /**
369 * @brief Get the Op Boundary Lhs Pipeline object
370 * @ingroup mofem_basic_interface
371 *
372 * @tparam -1
373 * @return boost::ptr_deque<UserDataOperator>&
374 */
375 template <int DIM = -1>
376 inline boost::ptr_deque<UserDataOperator> &getOpBoundaryLhsPipeline();
377
378 /**
379 * @brief Get the Op Boundary Rhs Pipeline object
380 * @ingroup mofem_basic_interface
381 *
382 * @tparam -1
383 * @return boost::ptr_deque<UserDataOperator>&
384 */
385 template <int DIM = -1>
386 inline boost::ptr_deque<UserDataOperator> &getOpBoundaryRhsPipeline();
387
388 /**
389 * @brief Get the Op Skeleton Lhs Pipeline object
390 * @ingroup mofem_basic_interface
391 *
392 * @return boost::ptr_deque<UserDataOperator>&
393 */
394 template <int DIM = -1>
395 inline boost::ptr_deque<UserDataOperator> &getOpSkeletonLhsPipeline();
396
397 /**
398 * @brief Get the Op Skeleton Rhs Pipeline object
399 * @ingroup mofem_basic_interface
400 *
401 * @tparam -1
402 * @return boost::ptr_deque<UserDataOperator>&
403 */
404 template <int DIM = -1>
405 inline boost::ptr_deque<UserDataOperator> &getOpSkeletonRhsPipeline();
406
407 /**
408 * @brief Get the Op Domain Rhs Pipeline object for implicit-explicit G term
409 * @ingroup mofem_basic_interface
410 *
411 * @tparam -1
412 * @return boost::ptr_deque<UserDataOperator>&
413 */
414 template <int DIM = -1>
415 inline boost::ptr_deque<UserDataOperator> &getOpDomainExplicitRhsPipeline();
416
417 /**
418 * @brief Get the Op Boundary Rhs Pipeline object for implicit-explicit G term
419 * @ingroup mofem_basic_interface
420 *
421 * @tparam -1
422 * @return boost::ptr_deque<UserDataOperator>&
423 */
424 template <int DIM = -1>
425 inline boost::ptr_deque<UserDataOperator> &getOpBoundaryExplicitRhsPipeline();
426
427 /**
428 * @brief Get the Op Skeleton Rhs Pipeline object for implicit-explicit G term
429 * @ingroup mofem_basic_interface
430 *
431 * @tparam -1
432 * @return boost::ptr_deque<UserDataOperator>&
433 */
434 template <int DIM = -1>
435 inline boost::ptr_deque<UserDataOperator> &getOpSkeletonExplicitRhsPipeline();
436
437 /**
438 * @brief Get the Op Meshset Rhs Pipeline object
439 *
440 * @return boost::ptr_deque<UserDataOperator>&
441 */
442 boost::ptr_deque<UserDataOperator> &getOpMeshsetRhsPipeline();
443
444 /**
445 * @brief Get the Op Meshset Lhs Pipeline object
446 *
447 * @return boost::ptr_deque<UserDataOperator>&
448 */
449 boost::ptr_deque<UserDataOperator> &getOpMeshsetLhsPipeline();
450
451 /**
452 * @brief Get the Op Meshset Explicit Rhs Pipeline object
453 *
454 * @return boost::ptr_deque<UserDataOperator>&
455 */
456 boost::ptr_deque<UserDataOperator> &getOpMeshsetExplicitRhsPipeline();
457
458 /**
459 * @brief Iterate finite elements
460 * @ingroup mofem_basic_interface
461 *
462 * @param dm Optional DM object (default: nullptr)
463 * @return MoFEMErrorCode Error code (0 on success)
464 */
466
467 /**
468 * @brief Create KSP (linear) solver
469 * @ingroup mofem_basic_interface
470 *
471 * @param dm Optional DM object (default: nullptr)
472 * @return SmartPetscObj<KSP> Smart pointer to PETSc KSP linear solver
473 */
475
476 /**
477 * @brief Create SNES (nonlinear) solver
478 * @ingroup mofem_basic_interface
479 *
480 * @param dm Optional DM object (default: nullptr)
481 * @return SmartPetscObj<SNES> Smart pointer to PETSc SNES nonlinear solver
482 */
484
485 /**
486 * @brief Enumeration of time solver types
487 */
488 enum TSType {
489 EX, ///< Explicit time integration
490 IM, ///< Implicit time integration
491 IM2, ///< Second-order implicit time integration
492 IMEX ///< Implicit-explicit time integration
493 };
494
495 /**
496 * @brief Create TS (time) solver with specified type
497 *
498 * @param type Type of time solver (EX/IM/IM2/IMEX)
499 * @param dm Optional DM object (default: nullptr)
500 * @return SmartPetscObj<TS> Smart pointer to PETSc TS solver
501 */
502 SmartPetscObj<TS> createTS(const TSType type, SmartPetscObj<DM> dm = nullptr);
503
504 /**
505 * @brief Create TS (time) explicit solver
506 * @ingroup mofem_basic_interface
507 *
508 * @param dm Optional DM object (default: nullptr)
509 * @return SmartPetscObj<TS> Smart pointer to PETSc TS explicit time solver
510 */
512
513 /**
514 * @brief Create TS (time) implicit solver
515 * @ingroup mofem_basic_interface
516 *
517 * @param dm Optional DM object (default: nullptr)
518 * @return SmartPetscObj<TS> Smart pointer to PETSc TS implicit time solver
519 */
521
522 /**
523 * @deprecated Use version with explicit TS solver type
524 */
526 return createTSIM(dm);
527 }
528
529 /**
530 * @brief Create TS (time) solver for second order equation in time
531 * @ingroup mofem_basic_interface
532 *
533 * @param dm Optional DM object (default: nullptr)
534 * @return SmartPetscObj<TS> Smart pointer to PETSc TS second-order time solver
535 */
537
538 /**
539 * @deprecated Change name. Use createTSIM2 instead.
540 */
541 inline DEPRECATED auto createTS2(SmartPetscObj<DM> dm = nullptr) {
542 return createTSIM2(dm);
543 }
544
545 /**
546 * @brief Create TS (time) implicit-explicit solver
547 * @ingroup mofem_basic_interface
548 *
549 * @param dm Optional DM object (default: nullptr)
550 * @return SmartPetscObj<TS> Smart pointer to PETSc TS implicit-explicit time solver
551 */
553
554private:
555 MoFEM::Core &cOre; ///< Reference to MoFEM core instance
556
557 boost::shared_ptr<FEMethod>
558 feDomainRhs; ///< Element to assemble RHS side by integrating domain
559 boost::shared_ptr<FEMethod>
560 feDomainLhs; ///< Element to assemble LHS side by integrating domain
561 boost::shared_ptr<FEMethod>
562 feBoundaryRhs; ///< Element to assemble RHS side by integrating boundary
563 boost::shared_ptr<FEMethod>
564 feBoundaryLhs; ///< Element to assemble LHS side by integrating boundary
565 boost::shared_ptr<FEMethod>
566 feSkeletonRhs; ///< Element to assemble RHS side by integrating skeleton
567 boost::shared_ptr<FEMethod>
568 feSkeletonLhs; ///< Element to assemble LHS side by integrating skeleton
569
570 boost::shared_ptr<FEMethod>
571 feDomainExplicitRhs; ///< Element to assemble explicit Rhs for IMEX solver
572 boost::shared_ptr<FEMethod>
573 feBoundaryExplicitRhs; ///< Element to assemble explicit Rhs for IMEX
574 ///< solver
575 boost::shared_ptr<FEMethod>
576 feSkeletonExplicitRhs; ///< Element to assemble explicit Rhs for IMEX
577 ///< solver
578
579 boost::shared_ptr<FEMethod> feMeshsetRhs; ///< Element to assemble RHS side by
580 ///< integrating meshset
581 boost::shared_ptr<FEMethod> feMeshsetLhs; ///< Element to assemble LHS side by
582 ///< integrating meshset
583 boost::shared_ptr<FEMethod> feMeshsetExplicitRhs; ///< Element to assemble
584 ///< explicit RHS side by
585 ///< integrating meshset
586
587 /**
588 * @brief Create domain finite element pipeline based on dimension
589 *
590 * @tparam DIM Problem dimension (1, 2, 3, or -1 for automatic detection)
591 * @param fe Reference to finite element method shared pointer
592 * @return boost::shared_ptr<FEMethod>& Reference to created finite element
593 */
594 template <int DIM>
595 inline boost::shared_ptr<FEMethod> &
596 createDomainFEPipeline(boost::shared_ptr<FEMethod> &fe);
597
598 /**
599 * @brief Create boundary finite element pipeline based on dimension
600 *
601 * @tparam DIM Problem dimension (1, 2, 3, or -1 for automatic detection)
602 * @param fe Reference to finite element method shared pointer
603 * @return boost::shared_ptr<FEMethod>& Reference to created finite element
604 */
605 template <int DIM>
606 inline boost::shared_ptr<FEMethod> &
607 createBoundaryFEPipeline(boost::shared_ptr<FEMethod> &fe);
608
609 /**
610 * @brief Create meshset finite element pipeline
611 *
612 * @param fe Reference to finite element method shared pointer
613 * @return boost::shared_ptr<FEMethod>& Reference to created finite element
614 */
615 inline boost::shared_ptr<FEMethod> &
616 createMeshsetFEPipeline(boost::shared_ptr<FEMethod> &fe);
617
618private:
619 /**
620 * @brief Forward declaration for meshset finite element implementation
621 */
622 struct MeshsetFE;
623};
624
625template <int DIM>
626boost::shared_ptr<FEMethod> &
627PipelineManager::createDomainFEPipeline(boost::shared_ptr<FEMethod> &fe) {
628 static_assert(DIM == 1 || DIM == 2 || DIM == 3, "not implemented");
629 fe = boost::make_shared<FEMethod>();
630 return fe;
631}
632
633template <>
634inline boost::shared_ptr<FEMethod> &
635PipelineManager::createDomainFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
636 if (!fe)
637 fe = boost::make_shared<VolEle>(cOre);
638 return fe;
639}
640
641template <>
642inline boost::shared_ptr<FEMethod> &
643PipelineManager::createDomainFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
644 if (!fe)
645 fe = boost::make_shared<FaceEle>(cOre);
646 return fe;
647}
648
649template <>
650inline boost::shared_ptr<FEMethod> &
651PipelineManager::createDomainFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
652 if (!fe)
653 fe = boost::make_shared<EdgeEle>(cOre);
654 return fe;
655}
656
657template <>
658inline boost::shared_ptr<FEMethod> &
659PipelineManager::createDomainFEPipeline<-1>(boost::shared_ptr<FEMethod> &fe) {
660 switch (cOre.getInterface<Simple>()->getDim()) {
661 case 1:
662 return createDomainFEPipeline<1>(fe);
663 case 2:
664 return createDomainFEPipeline<2>(fe);
665 case 3:
666 return createDomainFEPipeline<3>(fe);
667 default:
668 THROW_MESSAGE("Not implemented");
669 }
670}
671
672template <int DIM>
673boost::shared_ptr<FEMethod> &
674PipelineManager::createBoundaryFEPipeline(boost::shared_ptr<FEMethod> &fe) {
675 static_assert(DIM == 1 || DIM == 2 || DIM == 3, "not implemented");
676 fe = boost::make_shared<FEMethod>();
677 return fe;
678}
679
680template <>
681inline boost::shared_ptr<FEMethod> &
682PipelineManager::createBoundaryFEPipeline<3>(boost::shared_ptr<FEMethod> &fe) {
683 if (!fe)
684 fe = boost::make_shared<FaceElementForcesAndSourcesCore>(cOre);
685 return fe;
686}
687
688template <>
689inline boost::shared_ptr<FEMethod> &
690PipelineManager::createBoundaryFEPipeline<2>(boost::shared_ptr<FEMethod> &fe) {
691 if (!fe)
692 fe = boost::make_shared<EdgeEle>(cOre);
693 return fe;
694}
695
696template <>
697inline boost::shared_ptr<FEMethod> &
698PipelineManager::createBoundaryFEPipeline<1>(boost::shared_ptr<FEMethod> &fe) {
699 if (!fe)
700 fe = boost::make_shared<VertexElementForcesAndSourcesCore>(cOre);
701 return fe;
702}
703
704boost::shared_ptr<FEMethod> &PipelineManager::getDomainLhsFE() {
705 return feDomainLhs;
706}
707
708boost::shared_ptr<FEMethod> &PipelineManager::getDomainRhsFE() {
709 return feDomainRhs;
710}
711
712boost::shared_ptr<FEMethod> &PipelineManager::getBoundaryLhsFE() {
713 return feBoundaryLhs;
714}
715
716boost::shared_ptr<FEMethod> &PipelineManager::getBoundaryRhsFE() {
717 return feBoundaryRhs;
718}
719
720boost::shared_ptr<FEMethod> &PipelineManager::getSkeletonLhsFE() {
721 return feSkeletonLhs;
722}
723
724boost::shared_ptr<FEMethod> &PipelineManager::getSkeletonRhsFE() {
725 return feSkeletonRhs;
726}
727
728boost::shared_ptr<FEMethod> &PipelineManager::getDomainExplicitRhsFE() {
729 return feDomainExplicitRhs;
730}
731
732boost::shared_ptr<FEMethod> &PipelineManager::getBoundaryExplicitRhsFE() {
734}
735
736boost::shared_ptr<FEMethod> &PipelineManager::getSkeletonExplicitRhsFE() {
738}
739
740boost::shared_ptr<FEMethod> &PipelineManager::getMeshsetRhsFE() {
741 return feMeshsetRhs;
742}
743
744boost::shared_ptr<FEMethod> &PipelineManager::getMeshsetLhsFE() {
745 return feMeshsetLhs;
746}
747
748boost::shared_ptr<FEMethod> &PipelineManager::getMeshsetExplicitRhsFE() {
750}
751
752template <>
753inline boost::shared_ptr<FEMethod> &
754PipelineManager::createBoundaryFEPipeline<-1>(boost::shared_ptr<FEMethod> &fe) {
755 switch (cOre.getInterface<Simple>()->getDim()) {
756 case 1:
757 return createBoundaryFEPipeline<1>(fe);
758 case 2:
759 return createBoundaryFEPipeline<2>(fe);
760 case 3:
761 return createBoundaryFEPipeline<3>(fe);
762 default:
763 THROW_MESSAGE("Not implemented");
764 }
765}
766
767template <typename T, int DIM> auto PipelineManager::getCastDomainLhsFE() {
768 return boost::dynamic_pointer_cast<T>(
769 createDomainFEPipeline<DIM>(feDomainLhs));
770}
771
772template <typename T, int DIM> auto PipelineManager::getCastDomainRhsFE() {
773 return boost::dynamic_pointer_cast<T>(
774 createDomainFEPipeline<DIM>(feDomainRhs));
775}
776
777template <typename T, int DIM> auto PipelineManager::getCastBoundaryLhsFE() {
778 return boost::dynamic_pointer_cast<T>(
779 createBoundaryFEPipeline<DIM>(feBoundaryLhs));
780}
781
782template <typename T, int DIM>
784 return boost::dynamic_pointer_cast<T>(
785 createBoundaryFEPipeline<DIM>(feBoundaryRhs));
786}
787
788template <typename T, int DIM>
790 return boost::dynamic_pointer_cast<T>(
791 createBoundaryFEPipeline<DIM>(feSkeletonLhs));
792}
793
794template <typename T, int DIM> auto PipelineManager::getCastSkeletonRhsFE() {
795 return boost::dynamic_pointer_cast<T>(
796 createBoundaryFEPipeline<DIM>(feSkeletonRhs));
797}
798
799template <typename T, int DIM>
801 return boost::dynamic_pointer_cast<T>(
802 createDomainFEPipeline<DIM>(feDomainExplicitRhs));
803}
804
805template <typename T, int DIM>
807 return boost::dynamic_pointer_cast<T>(
808 createBoundaryFEPipeline<DIM>(feBoundaryExplicitRhs));
809}
810
811template <typename T, int DIM>
813 return boost::dynamic_pointer_cast<T>(
814 createBoundaryFEPipeline<DIM>(feSkeletonExplicitRhs));
815}
816
817template <typename T> auto PipelineManager::getCastMeshsetRhsFE() {
818 return boost::dynamic_pointer_cast<T>(createMeshsetFEPipeline(feMeshsetRhs));
819}
820
821template <typename T> auto PipelineManager::getCastMeshsetLhsFE() {
822 return boost::dynamic_pointer_cast<T>(createMeshsetFEPipeline(feMeshsetLhs));
823}
824
826 return boost::dynamic_pointer_cast<T>(
828}
829
830template <int DIM>
834 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
835 createDomainFEPipeline<DIM>(feDomainLhs))
836 ->getRuleHook = rule;
838}
839
840template <>
844 switch (cOre.getInterface<Simple>()->getDim()) {
845 case 1:
846 MoFEMFunctionReturnHot(setDomainLhsIntegrationRule<1>(rule));
847 case 2:
848 MoFEMFunctionReturnHot(setDomainLhsIntegrationRule<2>(rule));
849 case 3:
850 MoFEMFunctionReturnHot(setDomainLhsIntegrationRule<3>(rule));
851 default:
852 THROW_MESSAGE("Not implemented");
853 }
855}
856
857template <int DIM>
861 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
862 createDomainFEPipeline<DIM>(feDomainRhs))
863 ->getRuleHook = rule;
865}
866
867template <>
871 switch (cOre.getInterface<Simple>()->getDim()) {
872 case 1:
873 MoFEMFunctionReturnHot(setDomainRhsIntegrationRule<1>(rule));
874 case 2:
875 MoFEMFunctionReturnHot(setDomainRhsIntegrationRule<2>(rule));
876 case 3:
877 MoFEMFunctionReturnHot(setDomainRhsIntegrationRule<3>(rule));
878 default:
879 THROW_MESSAGE("Not implemented");
880 }
882}
883
884template <int DIM>
888 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
889 createBoundaryFEPipeline<DIM>(feBoundaryLhs))
890 ->getRuleHook = rule;
892}
893
894template <>
898 switch (cOre.getInterface<Simple>()->getDim()) {
899 case 1:
900 MoFEMFunctionReturnHot(setBoundaryLhsIntegrationRule<1>(rule));
901 case 2:
902 MoFEMFunctionReturnHot(setBoundaryLhsIntegrationRule<2>(rule));
903 case 3:
904 MoFEMFunctionReturnHot(setBoundaryLhsIntegrationRule<3>(rule));
905 default:
906 THROW_MESSAGE("Not implemented");
907 }
909}
910
911template <int DIM>
915 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
916 createBoundaryFEPipeline<DIM>(feBoundaryRhs))
917 ->getRuleHook = rule;
919}
920
921template <>
925 switch (cOre.getInterface<Simple>()->getDim()) {
926 case 1:
927 MoFEMFunctionReturnHot(setBoundaryRhsIntegrationRule<1>(rule));
928 case 2:
929 MoFEMFunctionReturnHot(setBoundaryRhsIntegrationRule<2>(rule));
930 case 3:
931 MoFEMFunctionReturnHot(setBoundaryRhsIntegrationRule<3>(rule));
932 default:
933 THROW_MESSAGE("Not implemented");
934 }
936}
937
938template <int DIM>
942 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
943 createBoundaryFEPipeline<DIM>(feSkeletonLhs))
944 ->getRuleHook = rule;
946}
947
948template <>
952 switch (cOre.getInterface<Simple>()->getDim()) {
953 case 1:
954 MoFEMFunctionReturnHot(setSkeletonLhsIntegrationRule<1>(rule));
955 case 2:
956 MoFEMFunctionReturnHot(setSkeletonLhsIntegrationRule<2>(rule));
957 case 3:
958 MoFEMFunctionReturnHot(setSkeletonLhsIntegrationRule<3>(rule));
959 default:
960 THROW_MESSAGE("Not implemented");
961 }
963}
964
965template <int DIM>
969 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
970 createBoundaryFEPipeline<DIM>(feSkeletonRhs))
971 ->getRuleHook = rule;
973}
974
975template <>
979 switch (cOre.getInterface<Simple>()->getDim()) {
980 case 1:
981 MoFEMFunctionReturnHot(setSkeletonRhsIntegrationRule<1>(rule));
982 case 2:
983 MoFEMFunctionReturnHot(setSkeletonRhsIntegrationRule<2>(rule));
984 case 3:
985 MoFEMFunctionReturnHot(setSkeletonRhsIntegrationRule<3>(rule));
986 default:
987 THROW_MESSAGE("Not implemented");
988 }
990}
991
992template <int DIM>
996 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
997 createDomainFEPipeline<DIM>(feDomainExplicitRhs))
998 ->getRuleHook = rule;
1000}
1001
1002template <>
1006 switch (cOre.getInterface<Simple>()->getDim()) {
1007 case 1:
1008 MoFEMFunctionReturnHot(setDomainExplicitRhsIntegrationRule<1>(rule));
1009 case 2:
1010 MoFEMFunctionReturnHot(setDomainExplicitRhsIntegrationRule<2>(rule));
1011 case 3:
1012 MoFEMFunctionReturnHot(setDomainExplicitRhsIntegrationRule<3>(rule));
1013 default:
1014 THROW_MESSAGE("Not implemented");
1015 }
1017}
1018
1019template <int DIM>
1023 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1024 createBoundaryFEPipeline<DIM>(feBoundaryExplicitRhs))
1025 ->getRuleHook = rule;
1027}
1028
1029template <>
1034 switch (cOre.getInterface<Simple>()->getDim()) {
1035 case 1:
1036 MoFEMFunctionReturnHot(setBoundaryExplicitRhsIntegrationRule<1>(rule));
1037 case 2:
1038 MoFEMFunctionReturnHot(setBoundaryExplicitRhsIntegrationRule<2>(rule));
1039 case 3:
1040 MoFEMFunctionReturnHot(setBoundaryExplicitRhsIntegrationRule<3>(rule));
1041 default:
1042 THROW_MESSAGE("Not implemented");
1043 }
1045}
1046
1047template <int DIM>
1051 boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1052 createBoundaryFEPipeline<DIM>(feSkeletonExplicitRhs))
1053 ->getRuleHook = rule;
1055}
1056
1057template <>
1062 switch (cOre.getInterface<Simple>()->getDim()) {
1063 case 1:
1064 MoFEMFunctionReturnHot(setSkeletonExplicitRhsIntegrationRule<1>(rule));
1065 case 2:
1066 MoFEMFunctionReturnHot(setSkeletonExplicitRhsIntegrationRule<2>(rule));
1067 case 3:
1068 MoFEMFunctionReturnHot(setSkeletonExplicitRhsIntegrationRule<3>(rule));
1069 default:
1070 THROW_MESSAGE("Not implemented");
1071 }
1073}
1074
1075template <int DIM>
1076boost::ptr_deque<PipelineManager::UserDataOperator> &
1078 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1079 createDomainFEPipeline<DIM>(feDomainLhs))
1080 ->getOpPtrVector();
1081}
1082
1083template <>
1084inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1086 switch (cOre.getInterface<Simple>()->getDim()) {
1087 case 1:
1088 return getOpDomainLhsPipeline<1>();
1089 case 2:
1090 return getOpDomainLhsPipeline<2>();
1091 case 3:
1092 break;
1093 default:
1094 THROW_MESSAGE("Not implemented");
1095 }
1096 return getOpDomainLhsPipeline<3>();
1097}
1098
1099template <int DIM>
1100boost::ptr_deque<PipelineManager::UserDataOperator> &
1102 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1103 createDomainFEPipeline<DIM>(feDomainRhs))
1104 ->getOpPtrVector();
1105}
1106
1107template <>
1108inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1110 switch (cOre.getInterface<Simple>()->getDim()) {
1111 case 1:
1112 return getOpDomainRhsPipeline<1>();
1113 case 2:
1114 return getOpDomainRhsPipeline<2>();
1115 case 3:
1116 break;
1117 default:
1118 THROW_MESSAGE("Not implemented");
1119 }
1120 return getOpDomainRhsPipeline<3>();
1121}
1122
1123template <int DIM>
1124boost::ptr_deque<PipelineManager::UserDataOperator> &
1126 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1127 createBoundaryFEPipeline<DIM>(feBoundaryLhs))
1128 ->getOpPtrVector();
1129}
1130
1131template <>
1132inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1134 switch (cOre.getInterface<Simple>()->getDim()) {
1135 case 1:
1136 return getOpBoundaryLhsPipeline<1>();
1137 case 2:
1138 return getOpBoundaryLhsPipeline<2>();
1139 case 3:
1140 break;
1141 default:
1142 THROW_MESSAGE("Not implemented");
1143 }
1144 return getOpBoundaryLhsPipeline<3>();
1145}
1146
1147template <int DIM>
1148boost::ptr_deque<PipelineManager::UserDataOperator> &
1150 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1151 createBoundaryFEPipeline<DIM>(feBoundaryRhs))
1152 ->getOpPtrVector();
1153}
1154
1155template <>
1156inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1158 switch (cOre.getInterface<Simple>()->getDim()) {
1159 case 1:
1160 return getOpBoundaryRhsPipeline<1>();
1161 case 2:
1162 return getOpBoundaryRhsPipeline<2>();
1163 case 3:
1164 break;
1165 default:
1166 THROW_MESSAGE("Not implemented");
1167 }
1168 return getOpBoundaryRhsPipeline<3>();
1169}
1170
1171template <int DIM>
1172boost::ptr_deque<PipelineManager::UserDataOperator> &
1174 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1175 createBoundaryFEPipeline<DIM>(feSkeletonLhs))
1176 ->getOpPtrVector();
1177}
1178
1179template <>
1180inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1182 switch (cOre.getInterface<Simple>()->getDim()) {
1183 case 1:
1184 return getOpSkeletonLhsPipeline<1>();
1185 case 2:
1186 return getOpSkeletonLhsPipeline<2>();
1187 case 3:
1188 break;
1189 default:
1190 THROW_MESSAGE("Not implemented");
1191 }
1192 return getOpSkeletonLhsPipeline<3>();
1193}
1194
1195template <int DIM>
1196boost::ptr_deque<PipelineManager::UserDataOperator> &
1198 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1199 createBoundaryFEPipeline<DIM>(feSkeletonRhs))
1200 ->getOpPtrVector();
1201}
1202
1203template <>
1204inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1206 switch (cOre.getInterface<Simple>()->getDim()) {
1207 case 1:
1208 return getOpSkeletonRhsPipeline<1>();
1209 case 2:
1210 return getOpSkeletonRhsPipeline<2>();
1211 case 3:
1212 break;
1213 default:
1214 THROW_MESSAGE("Not implemented");
1215 }
1216 return getOpSkeletonRhsPipeline<3>();
1217}
1218
1219template <int DIM>
1220boost::ptr_deque<PipelineManager::UserDataOperator> &
1222 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1223 createDomainFEPipeline<DIM>(feDomainExplicitRhs))
1224 ->getOpPtrVector();
1225}
1226
1227template <>
1228inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1230 switch (cOre.getInterface<Simple>()->getDim()) {
1231 case 1:
1232 return getOpDomainExplicitRhsPipeline<1>();
1233 case 2:
1234 return getOpDomainExplicitRhsPipeline<2>();
1235 case 3:
1236 break;
1237 default:
1238 THROW_MESSAGE("Not implemented");
1239 }
1240 return getOpDomainExplicitRhsPipeline<3>();
1241}
1242
1243template <int DIM>
1244boost::ptr_deque<PipelineManager::UserDataOperator> &
1246 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1247 createBoundaryFEPipeline<DIM>(feBoundaryExplicitRhs))
1248 ->getOpPtrVector();
1249}
1250
1251template <>
1252inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1254 switch (cOre.getInterface<Simple>()->getDim()) {
1255 case 1:
1256 return getOpBoundaryExplicitRhsPipeline<1>();
1257 case 2:
1258 return getOpBoundaryExplicitRhsPipeline<2>();
1259 case 3:
1260 break;
1261 default:
1262 THROW_MESSAGE("Not implemented");
1263 }
1264 return getOpBoundaryExplicitRhsPipeline<3>();
1265}
1266
1267template <int DIM>
1268boost::ptr_deque<PipelineManager::UserDataOperator> &
1270 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
1271 createBoundaryFEPipeline<DIM>(feSkeletonExplicitRhs))
1272 ->getOpPtrVector();
1273}
1274
1275template <>
1276inline boost::ptr_deque<PipelineManager::UserDataOperator> &
1278 switch (cOre.getInterface<Simple>()->getDim()) {
1279 case 1:
1280 return getOpSkeletonExplicitRhsPipeline<1>();
1281 case 2:
1282 return getOpSkeletonExplicitRhsPipeline<2>();
1283 case 3:
1284 break;
1285 default:
1286 THROW_MESSAGE("Not implemented");
1287 }
1288 return getOpSkeletonExplicitRhsPipeline<3>();
1289}
1290
1291/**
1292 * @brief Specialization for 2D problems
1293 */
1295 using DomainEle = PipelineManager::FaceEle; ///< 2D domain elements (faces)
1296 using BoundaryEle = PipelineManager::EdgeEle; ///< 2D boundary elements (edges)
1298 using DomainParentEle = FaceElementForcesAndSourcesCoreOnChildParent; ///< Domain parent-child elements
1299 using BoundaryParentEle = EdgeElementForcesAndSourcesCoreOnChildParent; ///< Boundary parent-child elements
1300
1301 using DomianParentEle = DomainParentEle; //< @deprecated Use DomainParentEle instead
1302};
1303
1304/**
1305 * @brief Specialization for 3D problems
1306 */
1308 using DomainEle = PipelineManager::VolEle; ///< 3D domain elements (volumes)
1309 using BoundaryEle = PipelineManager::FaceEle; ///< 3D boundary elements (faces)
1310 using FaceSideEle = VolumeElementForcesAndSourcesCoreOnSide; ///< Volume side elements
1311 // !!! Not yet implemented
1312 // using DomainParentEle = VolumeElementForcesAndSourcesCoreOnChildParent;
1313 using BoundaryParentEle = FaceElementForcesAndSourcesCoreOnChildParent; ///< Boundary parent-child elements
1314};
1315
1316} // namespace MoFEM
1317
1318#endif // __BASIC_HPP__
1319
1320/**
1321 * \defgroup mofem_basic_interface PipelineManager interface
1322 * \brief Implementation of basic interface for rapid problem implementation.
1323 *
1324 * \ingroup mofem
1325 **/
MoFEM interface.
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 DEPRECATED
Definition definitions.h:17
#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
Definition Common.hpp:10
Core (interface) class.
Definition Core.hpp:82
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.
Definition Simple.hpp:27
int getDim() const
Get the problem dimension.
Definition Simple.hpp:373
intrusive_ptr for managing petsc objects
base class for all interface classes