30 : cOre(const_cast<
Core &>(core)) {}
66 auto copy_dm_struture = [&](
auto simple_dm) {
77 dm = copy_dm_struture(
simple->getDM());
79 dm = copy_dm_struture(dm);
84 auto set_dm_section = [&](
auto dm) {
88 CHKERR DMSetSection(dm, section);
93 boost::shared_ptr<FEMethod>
null;
128 auto copy_dm_struture = [&](
auto simple_dm) {
139 dm = copy_dm_struture(
simple->getDM());
141 dm = copy_dm_struture(dm);
146 auto set_dm_section = [&](
auto dm) {
150 CHKERR DMSetSection(dm, section);
153 CHKERR set_dm_section(dm);
157 boost::shared_ptr<FEMethod>
null;
182 CHKERR SNESSetDM(snes, dm);
203 "TS solver handling not implemented");
213 auto copy_dm_struture = [&](
auto simple_dm) {
224 dm = copy_dm_struture(
simple->getDM());
226 dm = copy_dm_struture(dm);
231 auto set_dm_section = [&](
auto dm) {
235 CHKERR DMSetSection(dm, section);
238 CHKERR set_dm_section(dm);
240 boost::shared_ptr<FEMethod>
null;
267 auto copy_dm_struture = [&](
auto simple_dm) {
278 dm = copy_dm_struture(
simple->getDM());
280 dm = copy_dm_struture(dm);
285 auto set_dm_section = [&](
auto dm) {
289 CHKERR DMSetSection(dm, section);
292 CHKERR set_dm_section(dm);
294 boost::shared_ptr<FEMethod>
null;
330 auto copy_dm_struture = [&](
auto simple_dm) {
341 dm = copy_dm_struture(
simple->getDM());
343 dm = copy_dm_struture(dm);
348 auto set_dm_section = [&](
auto dm) {
352 CHKERR DMSetSection(dm, section);
355 CHKERR set_dm_section(dm);
357 boost::shared_ptr<FEMethod>
null;
393 auto copy_dm_struture = [&](
auto simple_dm) {
404 dm = copy_dm_struture(
simple->getDM());
406 dm = copy_dm_struture(dm);
411 auto set_dm_section = [&](
auto dm) {
415 CHKERR DMSetSection(dm, section);
418 CHKERR set_dm_section(dm);
420 boost::shared_ptr<FEMethod>
null;
void simple(double P1[], double P2[], double P3[], double c[], const int N)
#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 ...
#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
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.
PetscErrorCode DMMoFEMSNESSetJacobian(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set SNES Jacobian evaluation function
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
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
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
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
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
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.
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) explit solver.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
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
auto createSmartDM
Creates smart DM object.
auto smartGetDMSnesCtx
Get SNES context data structure used by DM.
auto smartGetDMKspCtx
Get KSP context data structure used by DM.
auto smartGetDMTsCtx
Get TS context data structure used by DM.
PetscObject getPetscObject(T obj)
PetscErrorCode DMMoFEMDuplicateDMCtx(DM dm, DM dm_duplicate)
Duplicate internal data struture.
virtual MPI_Comm & get_comm() const =0
Deprecated interface functions.
Section manager is used to create indexes and sections.
PipelineManager interface.
boost::shared_ptr< FEMethod > feBoundaryRhs
Element to assemble RHS side by integrating boundary.
boost::shared_ptr< FEMethod > feDomainExplicitRhs
Element to assemble explict Rhs for IMEX solver.
boost::shared_ptr< FEMethod > feBoundaryLhs
Element to assemble LHS side by integrating boundary.
boost::shared_ptr< FEMethod > feSkeletonExplicitRhs
SmartPetscObj< TS > createTS(const TSType type, SmartPetscObj< DM > dm=nullptr)
create TS (time) solver
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 > feDomainRhs
Element to assemble RHS side by integrating domain.
boost::shared_ptr< FEMethod > feBoundaryExplicitRhs
PipelineManager(const MoFEM::Core &core)
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
keeps basic data about problem
Simple interface for fast problem set-up.
base class for all interface classes
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.