v0.15.0
Loading...
Searching...
No Matches
PipelineManager.cpp
Go to the documentation of this file.
1/** \file PipelineManager.cpp
2 * \brief Implementation of basic interface
3 * \ingroup mofem_basic_interface
4 */
5
6
7namespace MoFEM {
8
13 const auto type = numeredEntFiniteElementPtr->getEntType();
14 if (type != MBENTITYSET) {
15 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
16 "Expected entity set as a finite element");
17 }
20 }
21 MoFEMErrorCode preProcess() { return 0; }
23};
24
25boost::shared_ptr<FEMethod> &
26PipelineManager::createMeshsetFEPipeline(boost::shared_ptr<FEMethod> &fe) {
27 if (!fe)
28 fe = boost::make_shared<MeshsetFE>(cOre);
29 return fe;
30}
31
32boost::ptr_deque<PipelineManager::UserDataOperator> &
34 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
36 ->getOpPtrVector();
37}
38
39boost::ptr_deque<PipelineManager::UserDataOperator> &
41 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
43 ->getOpPtrVector();
44}
45
46boost::ptr_deque<PipelineManager::UserDataOperator> &
48 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
50 ->getOpPtrVector();
51}
52
54PipelineManager::query_interface(boost::typeindex::type_index type_index,
55 UnknownInterface **iface) const {
56 *iface = const_cast<PipelineManager *>(this);
57 return 0;
58}
59
61 : cOre(const_cast<Core &>(core)) {}
62
65 Interface &m_field = cOre;
66 Simple *simple = m_field.getInterface<Simple>();
67 if (!dm)
68 dm = simple->getDM();
69
70 // Add element to calculate lhs of stiff part
71 if (feDomainLhs)
72 CHKERR DMoFEMLoopFiniteElements(dm, simple->getDomainFEName(), feDomainLhs);
73 if (feBoundaryLhs)
74 CHKERR DMoFEMLoopFiniteElements(dm, simple->getBoundaryFEName(),
76 if (feSkeletonLhs)
77 CHKERR DMoFEMLoopFiniteElements(dm, simple->getSkeletonFEName(),
79 if (feMeshsetLhs)
80 CHKERR DMoFEMLoopFiniteElements(dm, simple->getMeshsetFEName(),
82
83 // Add element to calculate rhs of stiff part
84 if (feDomainRhs)
85 CHKERR DMoFEMLoopFiniteElements(dm, simple->getDomainFEName(), feDomainRhs);
86 if (feBoundaryRhs)
87 CHKERR DMoFEMLoopFiniteElements(dm, simple->getBoundaryFEName(),
89 if (feSkeletonRhs)
90 CHKERR DMoFEMLoopFiniteElements(dm, simple->getSkeletonFEName(),
92 if (feMeshsetRhs)
93 CHKERR DMoFEMLoopFiniteElements(dm, simple->getMeshsetFEName(),
95
97}
98
100 Interface &m_field = cOre;
101 Simple *simple = m_field.getInterface<Simple>();
102
103 auto copy_dm_struture = [&](auto simple_dm) {
104 MPI_Comm comm;
105 CHKERR PetscObjectGetComm(getPetscObject(simple_dm.get()), &comm);
106 DMType type;
107 CHKERR DMGetType(simple_dm, &type);
108 dm = createDM(comm, type);
109 CHKERR DMMoFEMDuplicateDMCtx(simple_dm, dm);
110 return dm;
111 };
112
113 if (!dm)
114 dm = copy_dm_struture(simple->getDM());
115
116 const MoFEM::Problem *prb_ptr;
117 CHKERR DMMoFEMGetProblemPtr(dm, &prb_ptr);
118
119 auto set_dm_section = [&](auto dm) {
121 auto section =
122 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->getName());
123 CHKERR DMSetSection(dm, section);
125 };
126 CHKERR set_dm_section(dm);
127
128 boost::shared_ptr<FEMethod> null;
129
130 getDMKspCtx(dm)->clearLoops();
131
132 // Add element to calculate lhs of stiff part
133 if (feDomainLhs)
134 CHKERR DMMoFEMKSPSetComputeOperators(dm, simple->getDomainFEName(),
135 feDomainLhs, null, null);
136 if (feBoundaryLhs)
137 CHKERR DMMoFEMKSPSetComputeOperators(dm, simple->getBoundaryFEName(),
138 feBoundaryLhs, null, null);
139 if (feSkeletonLhs)
140 CHKERR DMMoFEMKSPSetComputeOperators(dm, simple->getSkeletonFEName(),
141 feSkeletonLhs, null, null);
142 if (feMeshsetLhs)
143 CHKERR DMMoFEMKSPSetComputeOperators(dm, simple->getMeshsetFEName(),
144 feMeshsetLhs, null, null);
145
146 // Add element to calculate rhs of stiff part
147 if (feDomainRhs)
148 CHKERR DMMoFEMKSPSetComputeRHS(dm, simple->getDomainFEName(), feDomainRhs,
149 null, null);
150 if (feBoundaryRhs)
151 CHKERR DMMoFEMKSPSetComputeRHS(dm, simple->getBoundaryFEName(),
152 feBoundaryRhs, null, null);
153 if (feSkeletonRhs)
154 CHKERR DMMoFEMKSPSetComputeRHS(dm, simple->getSkeletonFEName(),
155 feSkeletonRhs, null, null);
156 if (feMeshsetRhs)
157 CHKERR DMMoFEMKSPSetComputeRHS(dm, simple->getMeshsetFEName(), feMeshsetRhs,
158 null, null);
159
160 auto ksp = MoFEM::createKSP(m_field.get_comm());
161 CHKERR KSPSetDM(ksp, dm);
162 return ksp;
163}
164
166 Interface &m_field = cOre;
167 Simple *simple = m_field.getInterface<Simple>();
168
169 auto copy_dm_struture = [&](auto simple_dm) {
170 MPI_Comm comm;
171 CHKERR PetscObjectGetComm(getPetscObject(simple_dm.get()), &comm);
172 DMType type;
173 CHKERR DMGetType(simple_dm, &type);
174 dm = createDM(comm, type);
175 CHKERR DMMoFEMDuplicateDMCtx(simple_dm, dm);
176 return dm;
177 };
178
179 if (!dm)
180 dm = copy_dm_struture(simple->getDM());
181
182 const MoFEM::Problem *prb_ptr;
183 CHKERR DMMoFEMGetProblemPtr(dm, &prb_ptr);
184
185 auto set_dm_section = [&](auto dm) {
187 auto section =
188 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->getName());
189 CHKERR DMSetSection(dm, section);
191 };
192 CHKERR set_dm_section(dm);
193
194 getDMSnesCtx(dm)->clearLoops();
195
196 boost::shared_ptr<FEMethod> null;
197
198 // Add element to calculate lhs of stiff part
199 if (feDomainLhs)
200 CHKERR DMMoFEMSNESSetJacobian(dm, simple->getDomainFEName(), feDomainLhs,
201 null, null);
202 if (feBoundaryLhs)
203 CHKERR DMMoFEMSNESSetJacobian(dm, simple->getBoundaryFEName(),
204 feBoundaryLhs, null, null);
205 if (feSkeletonLhs)
206 CHKERR DMMoFEMSNESSetJacobian(dm, simple->getSkeletonFEName(),
207 feSkeletonLhs, null, null);
208 if (feMeshsetLhs)
209 CHKERR DMMoFEMSNESSetJacobian(dm, simple->getMeshsetFEName(), feMeshsetLhs,
210 null, null);
211
212 // Add element to calculate rhs of stiff part
213 if (feDomainRhs)
214 CHKERR DMMoFEMSNESSetFunction(dm, simple->getDomainFEName(), feDomainRhs,
215 null, null);
216 if (feBoundaryRhs)
217 CHKERR DMMoFEMSNESSetFunction(dm, simple->getBoundaryFEName(),
218 feBoundaryRhs, null, null);
219 if (feSkeletonRhs)
220 CHKERR DMMoFEMSNESSetFunction(dm, simple->getSkeletonFEName(),
221 feSkeletonRhs, null, null);
222 if (feMeshsetRhs)
223 CHKERR DMMoFEMSNESSetFunction(dm, simple->getMeshsetFEName(), feMeshsetRhs,
224 null, null);
225
226 auto snes = MoFEM::createSNES(m_field.get_comm());
227 CHKERR SNESSetDM(snes, dm);
228 return snes;
229}
230
233 switch (type) {
234 case EX:
235 return createTSEX(dm);
236 break;
237 case IM:
238 return createTSIM(dm);
239 break;
240 case IM2:
241 return createTSIM2(dm);
242 break;
243 case IMEX:
244 return createTSIMEX(dm);
245 break;
246 default:
248 "TS solver handling not implemented");
249 break;
250 }
251 return SmartPetscObj<TS>();
252}
253
255 Interface &m_field = cOre;
256 Simple *simple = m_field.getInterface<Simple>();
257
258 auto copy_dm_struture = [&](auto simple_dm) {
259 MPI_Comm comm;
260 CHKERR PetscObjectGetComm(getPetscObject(simple_dm.get()), &comm);
261 DMType type;
262 CHKERR DMGetType(simple_dm, &type);
263 dm = createDM(comm, type);
264 CHKERR DMMoFEMDuplicateDMCtx(simple_dm, dm);
265 return dm;
266 };
267
268 if (!dm)
269 dm = copy_dm_struture(simple->getDM());
270
271 const MoFEM::Problem *prb_ptr;
272 CHKERR DMMoFEMGetProblemPtr(dm, &prb_ptr);
273
274 auto set_dm_section = [&](auto dm) {
276 auto section =
277 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->getName());
278 CHKERR DMSetSection(dm, section);
280 };
281 CHKERR set_dm_section(dm);
282
283 boost::shared_ptr<FEMethod> null;
284
285 getDMTsCtx(dm)->clearLoops();
286
287 // Add element to calculate rhs of slow part
289 CHKERR DMMoFEMTSSetRHSFunction(dm, simple->getDomainFEName(),
290 feDomainExplicitRhs, null, null);
292 CHKERR DMMoFEMTSSetRHSFunction(dm, simple->getBoundaryFEName(),
293 feBoundaryExplicitRhs, null, null);
295 CHKERR DMMoFEMTSSetRHSFunction(dm, simple->getSkeletonFEName(),
296 feSkeletonExplicitRhs, null, null);
297 if (feMeshsetRhs)
298 CHKERR DMMoFEMTSSetRHSFunction(dm, simple->getMeshsetFEName(),
299 feMeshsetExplicitRhs, null, null);
300
301 // Note: More cases for explict, and implicit time interation cases can be
302 // implemented here.
303
304 auto ts = MoFEM::createTS(m_field.get_comm());
305 CHKERR TSSetDM(ts, dm);
306 return ts;
307}
308
310 Interface &m_field = cOre;
311 Simple *simple = m_field.getInterface<Simple>();
312
313 auto copy_dm_struture = [&](auto simple_dm) {
314 MPI_Comm comm;
315 CHKERR PetscObjectGetComm(getPetscObject(simple_dm.get()), &comm);
316 DMType type;
317 CHKERR DMGetType(simple_dm, &type);
318 dm = createDM(comm, type);
319 CHKERR DMMoFEMDuplicateDMCtx(simple_dm, dm);
320 return dm;
321 };
322
323 if (!dm)
324 dm = copy_dm_struture(simple->getDM());
325
326 const MoFEM::Problem *prb_ptr;
327 CHKERR DMMoFEMGetProblemPtr(dm, &prb_ptr);
328
329 auto set_dm_section = [&](auto dm) {
331 auto section =
332 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->getName());
333 CHKERR DMSetSection(dm, section);
335 };
336 CHKERR set_dm_section(dm);
337
338 boost::shared_ptr<FEMethod> null;
339
340 // Add element to calculate lhs of stiff part
341 if (feDomainLhs)
342 CHKERR DMMoFEMTSSetIJacobian(dm, simple->getDomainFEName(), feDomainLhs,
343 null, null);
344 if (feBoundaryLhs)
345 CHKERR DMMoFEMTSSetIJacobian(dm, simple->getBoundaryFEName(), feBoundaryLhs,
346 null, null);
347 if (feSkeletonLhs)
348 CHKERR DMMoFEMTSSetIJacobian(dm, simple->getSkeletonFEName(), feSkeletonLhs,
349 null, null);
350 if (feMeshsetLhs)
351 CHKERR DMMoFEMTSSetIJacobian(dm, simple->getMeshsetFEName(), feMeshsetLhs,
352 null, null);
353
354 // Add element to calculate rhs of stiff part
355 if (feDomainRhs)
356 CHKERR DMMoFEMTSSetIFunction(dm, simple->getDomainFEName(), feDomainRhs,
357 null, null);
358 if (feBoundaryRhs)
359 CHKERR DMMoFEMTSSetIFunction(dm, simple->getBoundaryFEName(), feBoundaryRhs,
360 null, null);
361 if (feSkeletonRhs)
362 CHKERR DMMoFEMTSSetIFunction(dm, simple->getSkeletonFEName(), feSkeletonRhs,
363 null, null);
364 if (feMeshsetRhs)
365 CHKERR DMMoFEMTSSetIFunction(dm, simple->getMeshsetFEName(), feMeshsetRhs,
366 null, null);
367
368 // Note: More cases for explict, and implicit time interation cases can be
369 // implemented here.
370
371 auto ts = MoFEM::createTS(m_field.get_comm());
372 CHKERR TSSetDM(ts, dm);
373 return ts;
374}
375
377 Interface &m_field = cOre;
378 Simple *simple = m_field.getInterface<Simple>();
379
380 auto copy_dm_struture = [&](auto simple_dm) {
381 MPI_Comm comm;
382 CHKERR PetscObjectGetComm(getPetscObject(simple_dm.get()), &comm);
383 DMType type;
384 CHKERR DMGetType(simple_dm, &type);
385 dm = createDM(comm, type);
386 CHKERR DMMoFEMDuplicateDMCtx(simple_dm, dm);
387 return dm;
388 };
389
390 if (!dm)
391 dm = copy_dm_struture(simple->getDM());
392
393 const MoFEM::Problem *prb_ptr;
394 CHKERR DMMoFEMGetProblemPtr(dm, &prb_ptr);
395
396 auto set_dm_section = [&](auto dm) {
398 auto section =
399 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->getName());
400 CHKERR DMSetSection(dm, section);
402 };
403 CHKERR set_dm_section(dm);
404
405 boost::shared_ptr<FEMethod> null;
406
407 // Add element to calculate lhs of stiff part
408 if (feDomainLhs)
409 CHKERR DMMoFEMTSSetI2Jacobian(dm, simple->getDomainFEName(), feDomainLhs,
410 null, null);
411 if (feBoundaryLhs)
412 CHKERR DMMoFEMTSSetI2Jacobian(dm, simple->getBoundaryFEName(),
413 feBoundaryLhs, null, null);
414 if (feSkeletonLhs)
415 CHKERR DMMoFEMTSSetI2Jacobian(dm, simple->getSkeletonFEName(),
416 feSkeletonLhs, null, null);
417 if (feMeshsetLhs)
418 CHKERR DMMoFEMTSSetI2Jacobian(dm, simple->getMeshsetFEName(), feMeshsetLhs,
419 null, null);
420
421 // Add element to calculate rhs of stiff part
422 if (feDomainRhs)
423 CHKERR DMMoFEMTSSetI2Function(dm, simple->getDomainFEName(), feDomainRhs,
424 null, null);
425 if (feBoundaryRhs)
426 CHKERR DMMoFEMTSSetI2Function(dm, simple->getBoundaryFEName(),
427 feBoundaryRhs, null, null);
428 if (feSkeletonRhs)
429 CHKERR DMMoFEMTSSetI2Function(dm, simple->getSkeletonFEName(),
430 feSkeletonRhs, null, null);
431 if (feMeshsetRhs)
432 CHKERR DMMoFEMTSSetI2Function(dm, simple->getMeshsetFEName(), feMeshsetRhs,
433 null, null);
434
435 // Note: More cases for explict, and implicit time interation cases can be
436 // implemented here.
437
438 auto ts = MoFEM::createTS(m_field.get_comm());
439 CHKERR TSSetDM(ts, dm);
440 return ts;
441}
442
444 Interface &m_field = cOre;
445 Simple *simple = m_field.getInterface<Simple>();
446
447 auto copy_dm_struture = [&](auto simple_dm) {
448 MPI_Comm comm;
449 CHKERR PetscObjectGetComm(getPetscObject(simple_dm.get()), &comm);
450 DMType type;
451 CHKERR DMGetType(simple_dm, &type);
452 dm = createDM(comm, type);
453 CHKERR DMMoFEMDuplicateDMCtx(simple_dm, dm);
454 return dm;
455 };
456
457 if (!dm)
458 dm = copy_dm_struture(simple->getDM());
459
460 const MoFEM::Problem *prb_ptr;
461 CHKERR DMMoFEMGetProblemPtr(dm, &prb_ptr);
462
463 auto set_dm_section = [&](auto dm) {
465 auto section =
466 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->getName());
467 CHKERR DMSetSection(dm, section);
469 };
470 CHKERR set_dm_section(dm);
471
472 boost::shared_ptr<FEMethod> null;
473
474 // Add element to calculate lhs of stiff part
475 if (feDomainLhs)
476 CHKERR DMMoFEMTSSetIJacobian(dm, simple->getDomainFEName(), feDomainLhs,
477 null, null);
478 if (feBoundaryLhs)
479 CHKERR DMMoFEMTSSetIJacobian(dm, simple->getBoundaryFEName(), feBoundaryLhs,
480 null, null);
481 if (feSkeletonLhs)
482 CHKERR DMMoFEMTSSetIJacobian(dm, simple->getSkeletonFEName(), feSkeletonLhs,
483 null, null);
484 if (feMeshsetLhs)
485 CHKERR DMMoFEMTSSetIJacobian(dm, simple->getMeshsetFEName(), feMeshsetLhs,
486 null, null);
487
488 // Add element to calculate rhs of stiff part
489 if (feDomainRhs)
490 CHKERR DMMoFEMTSSetIFunction(dm, simple->getDomainFEName(), feDomainRhs,
491 null, null);
492 if (feBoundaryRhs)
493 CHKERR DMMoFEMTSSetIFunction(dm, simple->getBoundaryFEName(), feBoundaryRhs,
494 null, null);
495 if (feSkeletonRhs)
496 CHKERR DMMoFEMTSSetIFunction(dm, simple->getSkeletonFEName(), feSkeletonRhs,
497 null, null);
498 if (feMeshsetRhs)
499 CHKERR DMMoFEMTSSetIFunction(dm, simple->getMeshsetFEName(), feMeshsetRhs,
500 null, null);
501
502 // Add element to calculate rhs of stiff part
504 CHKERR DMMoFEMTSSetRHSFunction(dm, simple->getDomainFEName(),
505 feDomainExplicitRhs, null, null);
507 CHKERR DMMoFEMTSSetRHSFunction(dm, simple->getBoundaryFEName(),
508 feBoundaryExplicitRhs, null, null);
510 CHKERR DMMoFEMTSSetRHSFunction(dm, simple->getSkeletonFEName(),
511 feSkeletonExplicitRhs, null, null);
513 CHKERR DMMoFEMTSSetRHSFunction(dm, simple->getMeshsetFEName(),
514 feMeshsetExplicitRhs, null, null);
515
516 // Note: More cases for explict, and implicit time interation cases can be
517 // implemented here.
518
519 auto ts = MoFEM::createTS(m_field.get_comm());
520 CHKERR TSSetDM(ts, dm);
521 return ts;
522}
523
524} // namespace MoFEM
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition acoustic.cpp:69
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
PetscErrorCode DMMoFEMSNESSetFunction(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set SNES residual evaluation function
Definition DMMoFEM.cpp:708
PetscErrorCode DMMoFEMTSSetIFunction(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set TS implicit function evaluation function
Definition DMMoFEM.cpp:790
PetscErrorCode DMMoFEMGetProblemPtr(DM dm, const MoFEM::Problem **problem_ptr)
Get pointer to problem data structure.
Definition DMMoFEM.cpp:422
PetscErrorCode DMMoFEMSNESSetJacobian(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set SNES Jacobian evaluation function
Definition DMMoFEM.cpp:749
PetscErrorCode DMMoFEMKSPSetComputeRHS(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set KSP right hand side evaluation function
Definition DMMoFEM.cpp:627
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
Definition DMMoFEM.cpp:576
PetscErrorCode DMMoFEMTSSetIJacobian(DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
set TS Jacobian evaluation function
Definition DMMoFEM.cpp:843
PetscErrorCode DMMoFEMTSSetI2Jacobian(DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
set TS Jacobian evaluation function
Definition DMMoFEM.cpp:1007
PetscErrorCode DMMoFEMTSSetI2Function(DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
set TS implicit function evaluation function
Definition DMMoFEM.cpp:965
PetscErrorCode DMMoFEMKSPSetComputeOperators(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
Set KSP operators and push mofem finite element methods.
Definition DMMoFEM.cpp:668
MoFEMErrorCode loopFiniteElements(SmartPetscObj< DM > dm=nullptr)
Iterate finite elements.
SmartPetscObj< SNES > createSNES(SmartPetscObj< DM > dm=nullptr)
Create SNES (nonlinear) solver.
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.
SmartPetscObj< KSP > createKSP(SmartPetscObj< DM > dm=nullptr)
Create KSP (linear) solver.
SmartPetscObj< TS > createTSIMEX(SmartPetscObj< DM > dm=nullptr)
Create TS (time) implicit-explicit solver.
SmartPetscObj< TS > createTSEX(SmartPetscObj< DM > dm=nullptr)
Create TS (time) explicit solver.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
auto createKSP(MPI_Comm comm)
auto getDMTsCtx(DM dm)
Get TS context data structure used by DM.
Definition DMMoFEM.hpp:1276
auto createSNES(MPI_Comm comm)
PetscErrorCode DMMoFEMTSSetRHSFunction(DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
set TS the right hand side function
Definition DMMoFEM.cpp:872
auto getDMKspCtx(DM dm)
Get KSP context data structure used by DM.
Definition DMMoFEM.hpp:1248
auto createTS(MPI_Comm comm)
PetscObject getPetscObject(T obj)
auto getDMSnesCtx(DM dm)
Get SNES context data structure used by DM.
Definition DMMoFEM.hpp:1262
auto createDM(MPI_Comm comm, const std::string dm_type_name)
Creates smart DM object.
PetscErrorCode DMMoFEMDuplicateDMCtx(DM dm, DM dm_duplicate)
Duplicate internal data structure.
Definition DMMoFEM.cpp:180
virtual MPI_Comm & get_comm() const =0
Core (interface) class.
Definition Core.hpp:82
Deprecated interface functions.
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
Shared pointer to finite element database structure.
structure to get information from mofem into EntitiesFieldData
MoFEMErrorCode loopOverOperators()
Iterate user data operators.
ForcesAndSourcesCore(Interface &m_field)
Section manager is used to create indexes and sections.
Definition ISManager.hpp:23
MoFEMErrorCode postProcess()
Post-processing function executed at loop completion.
MoFEMErrorCode operator()()
Main operator function executed for each loop iteration.
MoFEMErrorCode preProcess()
Pre-processing function executed at loop initialization.
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::ptr_deque< UserDataOperator > & getOpMeshsetRhsPipeline()
Get the Op Meshset Rhs Pipeline object.
boost::shared_ptr< FEMethod > feDomainExplicitRhs
Element to assemble explicit Rhs for IMEX solver.
boost::shared_ptr< FEMethod > feMeshsetLhs
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 > feSkeletonExplicitRhs
boost::shared_ptr< FEMethod > feMeshsetExplicitRhs
SmartPetscObj< TS > createTS(const TSType type, SmartPetscObj< DM > dm=nullptr)
Create TS (time) solver with specified type.
boost::shared_ptr< FEMethod > feSkeletonLhs
Element to assemble LHS side by integrating skeleton.
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 > feMeshsetRhs
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.
MoFEM::Core & cOre
Reference to MoFEM core instance.
boost::shared_ptr< FEMethod > feBoundaryExplicitRhs
PipelineManager(const MoFEM::Core &core)
Construct PipelineManager.
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Query interface for type-safe casting.
keeps basic data about problem
Simple interface for fast problem set-up.
Definition Simple.hpp:27
intrusive_ptr for managing petsc objects
base class for all interface classes
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.