Finite element for approximating analytical filed on the mesh.
More...
#include <users_modules/basic_finite_elements/src/FieldApproximation.hpp>
|
| FieldApproximationH1 (MoFEM::Interface &m_field) |
|
template<typename FUNEVAL > |
MoFEMErrorCode | setOperatorsVolume (const std::string &field_name, Mat A, std::vector< Vec > &vec_F, FUNEVAL &function_evaluator) |
| Set operators. More...
|
|
template<typename FUNEVAL > |
MoFEMErrorCode | setOperatorsFace (const std::string &field_name, Mat A, std::vector< Vec > &vec_F, FUNEVAL &function_evaluator) |
| Set operators. More...
|
|
template<typename FUNEVAL > |
MoFEMErrorCode | loopMatrixAndVectorVolume (const std::string &problem_name, const std::string &fe_name, const std::string &field_name, Mat A, std::vector< Vec > &vec_F, FUNEVAL &function_evaluator) |
| assemble matrix and vector More...
|
|
Finite element for approximating analytical filed on the mesh.
Definition at line 17 of file FieldApproximation.hpp.
◆ FieldApproximationH1()
Definition at line 24 of file FieldApproximation.hpp.
MoFEM::Interface & mField
VolumeElementForcesAndSourcesCore feVolume
MoFEM::FaceElementForcesAndSourcesCore feFace
◆ loopMatrixAndVectorVolume()
template<typename FUNEVAL >
MoFEMErrorCode FieldApproximationH1::loopMatrixAndVectorVolume |
( |
const std::string & |
problem_name, |
|
|
const std::string & |
fe_name, |
|
|
const std::string & |
field_name, |
|
|
Mat |
A, |
|
|
std::vector< Vec > & |
vec_F, |
|
|
FUNEVAL & |
function_evaluator |
|
) |
| |
|
inline |
assemble matrix and vector
Definition at line 481 of file FieldApproximation.hpp.
485 {
487
489 if (A) {
491 }
492
494 if (A) {
495 CHKERR MatAssemblyBegin(A, MAT_FLUSH_ASSEMBLY);
496 CHKERR MatAssemblyEnd(A, MAT_FLUSH_ASSEMBLY);
497 }
498 for (unsigned int lhs = 0; lhs < vec_F.size(); lhs++) {
499 CHKERR VecAssemblyBegin(vec_F[lhs]);
500 CHKERR VecAssemblyEnd(vec_F[lhs]);
501 }
503 }
#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.
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.
constexpr auto field_name
MoFEMErrorCode setOperatorsVolume(const std::string &field_name, Mat A, std::vector< Vec > &vec_F, FUNEVAL &function_evaluator)
Set operators.
◆ setOperatorsFace()
template<typename FUNEVAL >
MoFEMErrorCode FieldApproximationH1::setOperatorsFace |
( |
const std::string & |
field_name, |
|
|
Mat |
A, |
|
|
std::vector< Vec > & |
vec_F, |
|
|
FUNEVAL & |
function_evaluator |
|
) |
| |
|
inline |
Set operators.
Definition at line 463 of file FieldApproximation.hpp.
465 {
467
469 new OpApproxFace<FUNEVAL>(
field_name, A, vec_F, function_evaluator));
470
471
472
473
474
476 }
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
◆ setOperatorsVolume()
template<typename FUNEVAL >
MoFEMErrorCode FieldApproximationH1::setOperatorsVolume |
( |
const std::string & |
field_name, |
|
|
Mat |
A, |
|
|
std::vector< Vec > & |
vec_F, |
|
|
FUNEVAL & |
function_evaluator |
|
) |
| |
|
inline |
Set operators.
Definition at line 445 of file FieldApproximation.hpp.
447 {
449
450 feVolume.getOpPtrVector().push_back(
451 new OpApproxVolume<FUNEVAL>(
field_name, A, vec_F, function_evaluator));
452
453
454
455
456
458 }
◆ feFace
◆ feVolume
VolumeElementForcesAndSourcesCore FieldApproximationH1::feVolume |
◆ mField
◆ problemName
const std::string FieldApproximationH1::problemName |
The documentation for this struct was generated from the following file: