|
| v0.14.0
|
Go to the documentation of this file.
29 auto cache_ptr = boost::make_shared<CacheTuple>();
33 auto set = [&](
auto &fe) {
38 fe.cacheWeakPtr = cache_ptr;
41 auto unset = [&](
auto &fe) {
61 *(lit.second),
nullptr,
62 ksp_ctx->
bH, cache_ptr);
78 CHKERR VecGhostUpdateBegin(
f, ADD_VALUES, SCATTER_REVERSE);
79 CHKERR VecGhostUpdateEnd(
f, ADD_VALUES, SCATTER_REVERSE);
86 PetscErrorCode
KspMat(KSP ksp, Mat
A, Mat B,
void *ctx) {
93 auto cache_ptr = boost::make_shared<CacheTuple>();
97 auto set = [&](
auto &fe) {
103 fe.cacheWeakPtr = cache_ptr;
106 auto unset = [&](
auto &fe) {
111 auto ent_data_cache = boost::make_shared<std::vector<EntityCacheDofs>>();
113 boost::make_shared<std::vector<EntityCacheNumeredDofs>>();
115 boost::make_shared<std::vector<EntityCacheNumeredDofs>>();
132 *(lit.second),
nullptr,
133 ksp_ctx->
bH, cache_ptr);
149 CHKERR MatAssemblyBegin(B, MAT_FINAL_ASSEMBLY);
150 CHKERR MatAssemblyEnd(B, MAT_FINAL_ASSEMBLY);
PetscErrorCode KspRhs(KSP ksp, Vec f, void *ctx)
Run over elements in the lists.
virtual MoFEMErrorCode problem_basic_method_postProcess(const Problem *problem_ptr, BasicMethod &method, int verb=DEFAULT_VERBOSITY)=0
Set data for BasicMethod.
virtual MoFEMErrorCode loop_finite_elements(const std::string problem_name, const std::string &fe_name, FEMethod &method, boost::shared_ptr< NumeredEntFiniteElement_multiIndex > fe_ptr=nullptr, MoFEMTypes bh=MF_EXIST, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr(), int verb=DEFAULT_VERBOSITY)=0
Make a loop over finite elements.
FEMethodsSequence loops_to_do_Rhs
static constexpr Switches CtxSetB
static constexpr Switches CtxSetA
std::string problemName
Problem name.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
MoFEMTypes bH
If set to MF_EXIST check if element exist.
MoFEM::Interface & mField
BasicMethodsSequence postProcess_Rhs
virtual MoFEMErrorCode problem_basic_method_preProcess(const Problem *problem_ptr, BasicMethod &method, int verb=DEFAULT_VERBOSITY)=0
Set data for BasicMethod.
#define CHKERR
Inline error check.
FEMethodsSequence loops_to_do_Mat
MoFEMErrorCode clearLoops()
Clear loops.
implementation of Data Operators for Forces and Sources
BasicMethodsSequence preProcess_Mat
boost::movelib::unique_ptr< bool > matAssembleSwitch
BasicMethodsSequence postProcess_Mat
virtual MoFEMErrorCode cache_problem_entities(const std::string prb_name, CacheTupleWeakPtr cache_ptr)=0
Cache variables.
static constexpr Switches CtxSetNone
PetscLogEvent MOFEM_EVENT_KspRhs
PetscLogEvent MOFEM_EVENT_KspMat
PetscErrorCode KspMat(KSP ksp, Mat A, Mat B, void *ctx)
Run over elements in the list.
const FTensor::Tensor2< T, Dim, Dim > Vec
Interface for linear (KSP) solver.
static constexpr Switches CtxSetF
boost::movelib::unique_ptr< bool > vecAssembleSwitch
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
BasicMethodsSequence preProcess_Rhs
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...