|
| v0.14.0
|
Implementation of basic interface for rapid problem implementation.
More...
Implementation of basic interface for rapid problem implementation.
◆ createKSP()
◆ createSNES()
Create SNES (nonlinear) solver.
- Parameters
-
- Returns
- SmartPetscObj<SNES>
Definition at line 109 of file PipelineManager.cpp.
111 Simple *
simple = m_field.getInterface<Simple>();
113 auto copy_dm_struture = [&](
auto simple_dm) {
124 dm = copy_dm_struture(
simple->getDM());
129 auto set_dm_section = [&](
auto dm) {
132 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->
getName());
133 CHKERR DMSetSection(dm, section);
136 CHKERR set_dm_section(dm);
140 boost::shared_ptr<FEMethod>
null;
165 CHKERR SNESSetDM(snes, dm);
◆ createTSEX()
Create TS (time) explit solver.
- Parameters
-
- Returns
- SmartPetscObj<TS>
Definition at line 192 of file PipelineManager.cpp.
194 Simple *
simple = m_field.getInterface<Simple>();
196 auto copy_dm_struture = [&](
auto simple_dm) {
207 dm = copy_dm_struture(
simple->getDM());
212 auto set_dm_section = [&](
auto dm) {
215 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->
getName());
216 CHKERR DMSetSection(dm, section);
219 CHKERR set_dm_section(dm);
221 boost::shared_ptr<FEMethod>
null;
◆ createTSIM()
Create TS (time) implicit solver.
- Parameters
-
- Returns
- SmartPetscObj<TS>
Definition at line 244 of file PipelineManager.cpp.
246 Simple *
simple = m_field.getInterface<Simple>();
248 auto copy_dm_struture = [&](
auto simple_dm) {
259 dm = copy_dm_struture(
simple->getDM());
264 auto set_dm_section = [&](
auto dm) {
267 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->
getName());
268 CHKERR DMSetSection(dm, section);
271 CHKERR set_dm_section(dm);
273 boost::shared_ptr<FEMethod>
null;
◆ createTSIM2()
Create TS (time) solver for second order equation in time.
- Parameters
-
- Returns
- SmartPetscObj<TS>
Definition at line 305 of file PipelineManager.cpp.
307 Simple *
simple = m_field.getInterface<Simple>();
309 auto copy_dm_struture = [&](
auto simple_dm) {
320 dm = copy_dm_struture(
simple->getDM());
325 auto set_dm_section = [&](
auto dm) {
328 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->
getName());
329 CHKERR DMSetSection(dm, section);
332 CHKERR set_dm_section(dm);
334 boost::shared_ptr<FEMethod>
null;
◆ createTSIMEX()
Create TS (time) implicit-explicit solver.
- Parameters
-
- Returns
- SmartPetscObj<TS>
Definition at line 366 of file PipelineManager.cpp.
368 Simple *
simple = m_field.getInterface<Simple>();
370 auto copy_dm_struture = [&](
auto simple_dm) {
381 dm = copy_dm_struture(
simple->getDM());
386 auto set_dm_section = [&](
auto dm) {
389 m_field.getInterface<ISManager>()->sectionCreate(prb_ptr->
getName());
390 CHKERR DMSetSection(dm, section);
393 CHKERR set_dm_section(dm);
395 boost::shared_ptr<FEMethod>
null;
◆ getOpBoundaryExplicitRhsPipeline()
Get the Op Bondary Rhs Pipeline object for implicit-explicit G term.
- Template Parameters
-
- Returns
- boost::ptr_deque<UserDataOperator>&
Definition at line 917 of file PipelineManager.hpp.
918 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
◆ getOpBoundaryLhsPipeline()
Get the Op Boundary Lhs Pipeline object.
- Template Parameters
-
- Returns
- boost::ptr_deque<UserDataOperator>&
- Examples
- helmholtz.cpp.
Definition at line 797 of file PipelineManager.hpp.
798 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
◆ getOpBoundaryRhsPipeline()
◆ getOpDomainExplicitRhsPipeline()
Get the Op Domain Rhs Pipeline object for implicit-explicit G term.
- Template Parameters
-
- Returns
- boost::ptr_deque<UserDataOperator>&
Definition at line 893 of file PipelineManager.hpp.
894 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
◆ getOpDomainLhsPipeline()
◆ getOpDomainRhsPipeline()
◆ getOpSkeletonExplicitRhsPipeline()
Get the Op Skeleton Rhs Pipeline object for implicit-explicit G term.
- Template Parameters
-
- Returns
- boost::ptr_deque<UserDataOperator>&
Definition at line 941 of file PipelineManager.hpp.
942 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
◆ getOpSkeletonLhsPipeline()
Get the Op Skeleton Lhs Pipeline object.
- Returns
- boost::ptr_deque<UserDataOperator>&
- Examples
- level_set.cpp.
Definition at line 845 of file PipelineManager.hpp.
846 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
◆ getOpSkeletonRhsPipeline()
Get the Op Skeleton Rhs Pipeline object.
- Template Parameters
-
- Returns
- boost::ptr_deque<UserDataOperator>&
- Examples
- simple_l2_only.cpp.
Definition at line 869 of file PipelineManager.hpp.
870 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
◆ loopFiniteElements()
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
auto createTS(MPI_Comm comm)
auto createSNES(MPI_Comm comm)
auto getDMKspCtx(DM dm)
Get KSP context data structure used by DM.
PetscObject getPetscObject(T obj)
boost::shared_ptr< FEMethod > feBoundaryRhs
Element to assemble RHS side by integrating boundary.
boost::shared_ptr< FEMethod > feDomainLhs
Element to assemble LHS side by integrating domain.
auto createKSP(MPI_Comm comm)
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.
DeprecatedCoreInterface Interface
boost::shared_ptr< FEMethod > feBoundaryLhs
Element to assemble LHS side by integrating boundary.
#define CHKERR
Inline error check.
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
auto createDM(MPI_Comm comm, const std::string dm_type_name)
Creates smart DM object.
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
boost::shared_ptr< FEMethod > feDomainRhs
Element to assemble RHS side by integrating domain.
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
void simple(double P1[], double P2[], double P3[], double c[], const int N)
boost::shared_ptr< FEMethod > feBoundaryExplicitRhs
PetscErrorCode DMMoFEMSNESSetJacobian(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set SNES Jacobian evaluation function
boost::shared_ptr< FEMethod > feSkeletonLhs
Element to assemble LHS side by integrating skeleton.
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
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
PetscErrorCode DMMoFEMGetProblemPtr(DM dm, const MoFEM::Problem **problem_ptr)
Get pointer to problem data structure.
boost::shared_ptr< FEMethod > feDomainExplicitRhs
Element to assemble explict Rhs for IMEX solver.
auto getDMSnesCtx(DM dm)
Get SNES context data structure used by DM.
keeps basic data about problem
PetscErrorCode DMMoFEMDuplicateDMCtx(DM dm, DM dm_duplicate)
Duplicate internal data struture.
boost::shared_ptr< FEMethod > feSkeletonRhs
Element to assemble RHS side by integrating skeleton.
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
auto getDMTsCtx(DM dm)
Get TS context data structure used by DM.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
boost::shared_ptr< FEMethod > feSkeletonExplicitRhs
PetscErrorCode DMMoFEMSNESSetFunction(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set SNES residual evaluation function