v0.14.0
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 
7 namespace 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; }
22  MoFEMErrorCode postProcess() { return 0; }
23 };
24 
25 boost::shared_ptr<FEMethod> &
26 PipelineManager::createMeshsetFEPipeline(boost::shared_ptr<FEMethod> &fe) {
27  if (!fe)
28  fe = boost::make_shared<MeshsetFE>(cOre);
29  return fe;
30 }
31 
32 boost::ptr_deque<PipelineManager::UserDataOperator> &
34  return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
36  ->getOpPtrVector();
37 }
38 
39 boost::ptr_deque<PipelineManager::UserDataOperator> &
41  return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
43  ->getOpPtrVector();
44 }
45 
46 boost::ptr_deque<PipelineManager::UserDataOperator> &
48  return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
50  ->getOpPtrVector();
51 }
52 
54 PipelineManager::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(),
81  feMeshsetLhs);
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(),
94  feMeshsetRhs);
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 
232  SmartPetscObj<DM> dm) {
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
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Definition: UnknownInterface.hpp:93
MoFEM::PipelineManager::EX
@ EX
Definition: PipelineManager.hpp:263
MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
MoFEM::DMMoFEMKSPSetComputeRHS
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:637
MoFEM::PipelineManager::createSNES
SmartPetscObj< SNES > createSNES(SmartPetscObj< DM > dm=nullptr)
Create SNES (nonlinear) solver.
Definition: PipelineManager.cpp:165
MoFEM::PipelineManager::getOpMeshsetExplicitRhsPipeline
boost::ptr_deque< UserDataOperator > & getOpMeshsetExplicitRhsPipeline()
Get the Op Meshset Explicit Rhs Pipeline object.
Definition: PipelineManager.cpp:47
MoFEM::createTS
auto createTS(MPI_Comm comm)
Definition: PetscSmartObj.hpp:249
MoFEM::CoreInterface::get_comm
virtual MPI_Comm & get_comm() const =0
CHK_THROW_MESSAGE
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
Definition: definitions.h:609
MoFEM::createSNES
auto createSNES(MPI_Comm comm)
Definition: PetscSmartObj.hpp:255
MoFEM::getDMKspCtx
auto getDMKspCtx(DM dm)
Get KSP context data structure used by DM.
Definition: DMMoFEM.hpp:1113
MoFEM::PipelineManager::loopFiniteElements
MoFEMErrorCode loopFiniteElements(SmartPetscObj< DM > dm=nullptr)
Iterate finite elements.
Definition: PipelineManager.cpp:63
MoFEM::PipelineManager::MeshsetFE
Definition: PipelineManager.cpp:9
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::getPetscObject
PetscObject getPetscObject(T obj)
Definition: PetscSmartObj.hpp:9
MoFEM::PipelineManager::feBoundaryRhs
boost::shared_ptr< FEMethod > feBoundaryRhs
Element to assemble RHS side by integrating boundary.
Definition: PipelineManager.hpp:332
MoFEM::PipelineManager::feDomainLhs
boost::shared_ptr< FEMethod > feDomainLhs
Element to assemble LHS side by integrating domain.
Definition: PipelineManager.hpp:330
MoFEM::PipelineManager
PipelineManager interface.
Definition: PipelineManager.hpp:24
MoFEM::PipelineManager::getOpMeshsetLhsPipeline
boost::ptr_deque< UserDataOperator > & getOpMeshsetLhsPipeline()
Get the Op Meshset Lhs Pipeline object.
Definition: PipelineManager.cpp:40
MoFEM::createKSP
auto createKSP(MPI_Comm comm)
Definition: PetscSmartObj.hpp:261
MoFEM::DMMoFEMKSPSetComputeOperators
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:678
MoFEM::PipelineManager::createTSIM
SmartPetscObj< TS > createTSIM(SmartPetscObj< DM > dm=nullptr)
Create TS (time) implicit solver.
Definition: PipelineManager.cpp:309
MoFEM::Simple
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
MoFEM::PipelineManager::MeshsetFE::operator()
MoFEMErrorCode operator()()
function is run for every finite element
Definition: PipelineManager.cpp:11
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::PipelineManager::TSType
TSType
Definition: PipelineManager.hpp:263
MoFEM::PipelineManager::feBoundaryLhs
boost::shared_ptr< FEMethod > feBoundaryLhs
Element to assemble LHS side by integrating boundary.
Definition: PipelineManager.hpp:334
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::PipelineManager::feMeshsetLhs
boost::shared_ptr< FEMethod > feMeshsetLhs
Definition: PipelineManager.hpp:351
MoFEM::DMMoFEMTSSetIJacobian
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:853
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::ISManager
Section manager is used to create indexes and sections.
Definition: ISManager.hpp:23
MoFEM::createDM
auto createDM(MPI_Comm comm, const std::string dm_type_name)
Creates smart DM object.
Definition: PetscSmartObj.hpp:141
MoFEM::DMMoFEMTSSetI2Jacobian
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:1017
MoFEM::PipelineManager::feDomainRhs
boost::shared_ptr< FEMethod > feDomainRhs
Element to assemble RHS side by integrating domain.
Definition: PipelineManager.hpp:328
MoFEM::PipelineManager::cOre
MoFEM::Core & cOre
Definition: PipelineManager.hpp:325
MoFEM::DMMoFEMTSSetI2Function
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:975
MoFEM::PipelineManager::IM
@ IM
Definition: PipelineManager.hpp:263
simple
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
convert.type
type
Definition: convert.py:64
MoFEM::PipelineManager::createKSP
SmartPetscObj< KSP > createKSP(SmartPetscObj< DM > dm=nullptr)
Create KSP (linear) solver.
Definition: PipelineManager.cpp:99
MoFEM::ForcesAndSourcesCore::ForcesAndSourcesCore
ForcesAndSourcesCore(Interface &m_field)
Definition: ForcesAndSourcesCore.cpp:40
MoFEM::PipelineManager::feBoundaryExplicitRhs
boost::shared_ptr< FEMethod > feBoundaryExplicitRhs
Definition: PipelineManager.hpp:343
MoFEM::PipelineManager::PipelineManager
PipelineManager(const MoFEM::Core &core)
Definition: PipelineManager.cpp:60
MoFEM::DMMoFEMSNESSetJacobian
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:759
MoFEM::PipelineManager::feMeshsetExplicitRhs
boost::shared_ptr< FEMethod > feMeshsetExplicitRhs
Definition: PipelineManager.hpp:353
MoFEM::PipelineManager::feSkeletonLhs
boost::shared_ptr< FEMethod > feSkeletonLhs
Element to assemble LHS side by integrating skeleton.
Definition: PipelineManager.hpp:338
MoFEM::PipelineManager::query_interface
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Definition: PipelineManager.cpp:54
MoFEM::PipelineManager::MeshsetFE::postProcess
MoFEMErrorCode postProcess()
function is run at the end of loop
Definition: PipelineManager.cpp:22
MoFEM::UnknownInterface
base class for all interface classes
Definition: UnknownInterface.hpp:34
MoFEM::PipelineManager::getOpMeshsetRhsPipeline
boost::ptr_deque< UserDataOperator > & getOpMeshsetRhsPipeline()
Get the Op Meshset Rhs Pipeline object.
Definition: PipelineManager.cpp:33
MoFEM::PipelineManager::createTSEX
SmartPetscObj< TS > createTSEX(SmartPetscObj< DM > dm=nullptr)
Create TS (time) explit solver.
Definition: PipelineManager.cpp:254
MoFEM::ForcesAndSourcesCore
structure to get information form mofem into EntitiesFieldData
Definition: ForcesAndSourcesCore.hpp:22
MoFEM::PipelineManager::feMeshsetRhs
boost::shared_ptr< FEMethod > feMeshsetRhs
Definition: PipelineManager.hpp:349
MoFEM::DMMoFEMTSSetRHSFunction
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:882
MoFEM::DMMoFEMTSSetIFunction
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:800
MoFEM::PipelineManager::createTSIMEX
SmartPetscObj< TS > createTSIMEX(SmartPetscObj< DM > dm=nullptr)
Create TS (time) implicit-explicit solver.
Definition: PipelineManager.cpp:443
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MoFEM::PipelineManager::createMeshsetFEPipeline
boost::shared_ptr< FEMethod > & createMeshsetFEPipeline(boost::shared_ptr< FEMethod > &fe)
Definition: PipelineManager.cpp:26
MoFEM::DMMoFEMGetProblemPtr
PetscErrorCode DMMoFEMGetProblemPtr(DM dm, const MoFEM::Problem **problem_ptr)
Get pointer to problem data structure.
Definition: DMMoFEM.cpp:426
MoFEM::PipelineManager::feDomainExplicitRhs
boost::shared_ptr< FEMethod > feDomainExplicitRhs
Element to assemble explict Rhs for IMEX solver.
Definition: PipelineManager.hpp:341
MoFEM::ForcesAndSourcesCore::loopOverOperators
MoFEMErrorCode loopOverOperators()
Iterate user data operators.
Definition: ForcesAndSourcesCore.cpp:1379
MoFEM::PipelineManager::IM2
@ IM2
Definition: PipelineManager.hpp:263
MoFEM::getDMSnesCtx
auto getDMSnesCtx(DM dm)
Get SNES context data structure used by DM.
Definition: DMMoFEM.hpp:1127
MoFEM::FEMethod::numeredEntFiniteElementPtr
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
Definition: LoopMethods.hpp:383
MoFEM::Problem
keeps basic data about problem
Definition: ProblemsMultiIndices.hpp:54
MoFEM::PipelineManager::createTS
SmartPetscObj< TS > createTS(const TSType type, SmartPetscObj< DM > dm=nullptr)
create TS (time) solver
Definition: PipelineManager.cpp:231
MoFEM::SmartPetscObj< DM >
MoFEM::DMMoFEMDuplicateDMCtx
PetscErrorCode DMMoFEMDuplicateDMCtx(DM dm, DM dm_duplicate)
Duplicate internal data struture.
Definition: DMMoFEM.cpp:180
MoFEM::Problem::getName
auto getName() const
Definition: ProblemsMultiIndices.hpp:372
MoFEM::PipelineManager::feSkeletonRhs
boost::shared_ptr< FEMethod > feSkeletonRhs
Element to assemble RHS side by integrating skeleton.
Definition: PipelineManager.hpp:336
MoFEM::PipelineManager::createTSIM2
SmartPetscObj< TS > createTSIM2(SmartPetscObj< DM > dm=nullptr)
Create TS (time) solver for second order equation in time.
Definition: PipelineManager.cpp:376
MoFEM::DMoFEMLoopFiniteElements
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:586
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MOFEM_NOT_IMPLEMENTED
@ MOFEM_NOT_IMPLEMENTED
Definition: definitions.h:32
MoFEM::getDMTsCtx
auto getDMTsCtx(DM dm)
Get TS context data structure used by DM.
Definition: DMMoFEM.hpp:1141
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
MoFEM::PipelineManager::IMEX
@ IMEX
Definition: PipelineManager.hpp:263
MoFEM::PipelineManager::feSkeletonExplicitRhs
boost::shared_ptr< FEMethod > feSkeletonExplicitRhs
Definition: PipelineManager.hpp:346
MoFEM::PipelineManager::MeshsetFE::preProcess
MoFEMErrorCode preProcess()
function is run at the beginning of loop
Definition: PipelineManager.cpp:21
MoFEM::DMMoFEMSNESSetFunction
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:718