 |
| v0.14.0
|
Go to the documentation of this file.
14 if (
type != MBENTITYSET) {
16 "Expected entity set as a finite element");
25 boost::shared_ptr<FEMethod> &
28 fe = boost::make_shared<MeshsetFE>(
cOre);
32 boost::ptr_deque<PipelineManager::UserDataOperator> &
34 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
39 boost::ptr_deque<PipelineManager::UserDataOperator> &
41 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
46 boost::ptr_deque<PipelineManager::UserDataOperator> &
48 return boost::dynamic_pointer_cast<ForcesAndSourcesCore>(
61 : cOre(const_cast<
Core &>(core)) {}
103 auto copy_dm_struture = [&](
auto simple_dm) {
114 dm = copy_dm_struture(
simple->getDM());
119 auto set_dm_section = [&](
auto dm) {
123 CHKERR DMSetSection(dm, section);
126 CHKERR set_dm_section(dm);
128 boost::shared_ptr<FEMethod>
null;
169 auto copy_dm_struture = [&](
auto simple_dm) {
180 dm = copy_dm_struture(
simple->getDM());
185 auto set_dm_section = [&](
auto dm) {
189 CHKERR DMSetSection(dm, section);
192 CHKERR set_dm_section(dm);
196 boost::shared_ptr<FEMethod>
null;
227 CHKERR SNESSetDM(snes, dm);
248 "TS solver handling not implemented");
258 auto copy_dm_struture = [&](
auto simple_dm) {
269 dm = copy_dm_struture(
simple->getDM());
274 auto set_dm_section = [&](
auto dm) {
278 CHKERR DMSetSection(dm, section);
281 CHKERR set_dm_section(dm);
283 boost::shared_ptr<FEMethod>
null;
313 auto copy_dm_struture = [&](
auto simple_dm) {
324 dm = copy_dm_struture(
simple->getDM());
329 auto set_dm_section = [&](
auto dm) {
333 CHKERR DMSetSection(dm, section);
336 CHKERR set_dm_section(dm);
338 boost::shared_ptr<FEMethod>
null;
380 auto copy_dm_struture = [&](
auto simple_dm) {
391 dm = copy_dm_struture(
simple->getDM());
396 auto set_dm_section = [&](
auto dm) {
400 CHKERR DMSetSection(dm, section);
403 CHKERR set_dm_section(dm);
405 boost::shared_ptr<FEMethod>
null;
447 auto copy_dm_struture = [&](
auto simple_dm) {
458 dm = copy_dm_struture(
simple->getDM());
463 auto set_dm_section = [&](
auto dm) {
467 CHKERR DMSetSection(dm, section);
470 CHKERR set_dm_section(dm);
472 boost::shared_ptr<FEMethod>
null;
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
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
SmartPetscObj< SNES > createSNES(SmartPetscObj< DM > dm=nullptr)
Create SNES (nonlinear) solver.
boost::ptr_deque< UserDataOperator > & getOpMeshsetExplicitRhsPipeline()
Get the Op Meshset Explicit Rhs Pipeline object.
auto createTS(MPI_Comm comm)
virtual MPI_Comm & get_comm() const =0
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
auto createSNES(MPI_Comm comm)
auto getDMKspCtx(DM dm)
Get KSP context data structure used by DM.
MoFEMErrorCode loopFiniteElements(SmartPetscObj< DM > dm=nullptr)
Iterate finite elements.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
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.
PipelineManager interface.
boost::ptr_deque< UserDataOperator > & getOpMeshsetLhsPipeline()
Get the Op Meshset Lhs Pipeline object.
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.
SmartPetscObj< TS > createTSIM(SmartPetscObj< DM > dm=nullptr)
Create TS (time) implicit solver.
Simple interface for fast problem set-up.
MoFEMErrorCode operator()()
function is run for every finite element
Deprecated interface functions.
boost::shared_ptr< FEMethod > feBoundaryLhs
Element to assemble LHS side by integrating boundary.
#define CHKERR
Inline error check.
boost::shared_ptr< FEMethod > feMeshsetLhs
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
implementation of Data Operators for Forces and Sources
Section manager is used to create indexes and sections.
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)
SmartPetscObj< KSP > createKSP(SmartPetscObj< DM > dm=nullptr)
Create KSP (linear) solver.
ForcesAndSourcesCore(Interface &m_field)
boost::shared_ptr< FEMethod > feBoundaryExplicitRhs
PipelineManager(const MoFEM::Core &core)
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 > feMeshsetExplicitRhs
boost::shared_ptr< FEMethod > feSkeletonLhs
Element to assemble LHS side by integrating skeleton.
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
MoFEMErrorCode postProcess()
function is run at the end of loop
base class for all interface classes
boost::ptr_deque< UserDataOperator > & getOpMeshsetRhsPipeline()
Get the Op Meshset Rhs Pipeline object.
SmartPetscObj< TS > createTSEX(SmartPetscObj< DM > dm=nullptr)
Create TS (time) explit solver.
structure to get information form mofem into EntitiesFieldData
boost::shared_ptr< FEMethod > feMeshsetRhs
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
SmartPetscObj< TS > createTSIMEX(SmartPetscObj< DM > dm=nullptr)
Create TS (time) implicit-explicit solver.
@ MOFEM_DATA_INCONSISTENCY
boost::shared_ptr< FEMethod > & createMeshsetFEPipeline(boost::shared_ptr< FEMethod > &fe)
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.
MoFEMErrorCode loopOverOperators()
Iterate user data operators.
auto getDMSnesCtx(DM dm)
Get SNES context data structure used by DM.
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
keeps basic data about problem
SmartPetscObj< TS > createTS(const TSType type, SmartPetscObj< DM > dm=nullptr)
create TS (time) solver
PetscErrorCode DMMoFEMDuplicateDMCtx(DM dm, DM dm_duplicate)
Duplicate internal data struture.
boost::shared_ptr< FEMethod > feSkeletonRhs
Element to assemble RHS side by integrating skeleton.
SmartPetscObj< TS > createTSIM2(SmartPetscObj< DM > dm=nullptr)
Create TS (time) solver for second order equation in time.
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
MoFEMErrorCode preProcess()
function is run at the beginning of loop
PetscErrorCode DMMoFEMSNESSetFunction(DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
set SNES residual evaluation function