v0.16.3
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
MoFEM::OpMassCacheImpl< 1, FIELD_DIM, I, OpBase > Struct Template Reference

#include "src/finite_elements/BiLinearFormsIntegratorsImpl.hpp"

Inheritance diagram for MoFEM::OpMassCacheImpl< 1, FIELD_DIM, I, OpBase >:
[legend]
Collaboration diagram for MoFEM::OpMassCacheImpl< 1, FIELD_DIM, I, OpBase >:
[legend]

Public Member Functions

 OpMassCacheImpl (CacheMatsTypeType cache, const std::string row_field_name, const std::string col_field_name, const double beta, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Protected Attributes

double scalarBeta
 
CacheMatsTypeType cacheLocMats
 

Detailed Description

template<int FIELD_DIM, IntegrationType I, typename OpBase>
struct MoFEM::OpMassCacheImpl< 1, FIELD_DIM, I, OpBase >

Definition at line 185 of file BiLinearFormsIntegratorsImpl.hpp.

Constructor & Destructor Documentation

◆ OpMassCacheImpl()

template<int FIELD_DIM, IntegrationType I, typename OpBase >
MoFEM::OpMassCacheImpl< 1, FIELD_DIM, I, OpBase >::OpMassCacheImpl ( CacheMatsTypeType  cache,
const std::string  row_field_name,
const std::string  col_field_name,
const double  beta,
boost::shared_ptr< Range >  ents_ptr = nullptr 
)
inline

Definition at line 187 of file BiLinearFormsIntegratorsImpl.hpp.

190 : OpMassImpl<1, FIELD_DIM, I, OpBase>(
191 row_field_name, col_field_name,
192 [](double, double, double) constexpr { return 1; }, ents_ptr),
193 cacheLocMats(cache), scalarBeta(beta) {}

Member Function Documentation

◆ iNtegrate()

template<int FIELD_DIM, IntegrationType I, typename OpBase >
MoFEMErrorCode MoFEM::OpMassCacheImpl< 1, FIELD_DIM, I, OpBase >::iNtegrate ( EntitiesFieldData::EntData &  row_data,
EntitiesFieldData::EntData &  col_data 
)

Definition at line 918 of file BiLinearFormsIntegratorsImpl.hpp.

920 {
922
923 const auto vol = this->getMeasure();
924 const auto row_type = this->rowType;
925 const auto col_type = this->colType;
926 auto &loc_mat = this->locMat;
927
928 auto p = std::make_pair(row_type, col_type);
929
930 if (cacheLocMats[p]) {
931 if (cacheLocMats[p]->size1() != loc_mat.size1() &&
932 cacheLocMats[p]->size2() != loc_mat.size2()) {
933 cacheLocMats[p]->resize(loc_mat.size1(), loc_mat.size2());
934 CHKERR this->integrateImpl(row_data, col_data, 1);
935 *(cacheLocMats[p]) = loc_mat;
936 } else {
937 loc_mat = *(cacheLocMats[p]);
938 }
939 loc_mat *= scalarBeta * this->getMeasure();
940 } else {
941 CHKERR this->integrateImpl(row_data, col_data,
942 scalarBeta * this->getMeasure());
943 }
945}
#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.

Member Data Documentation

◆ cacheLocMats

template<int FIELD_DIM, IntegrationType I, typename OpBase >
CacheMatsTypeType MoFEM::OpMassCacheImpl< 1, FIELD_DIM, I, OpBase >::cacheLocMats
protected

Definition at line 200 of file BiLinearFormsIntegratorsImpl.hpp.

◆ scalarBeta

template<int FIELD_DIM, IntegrationType I, typename OpBase >
double MoFEM::OpMassCacheImpl< 1, FIELD_DIM, I, OpBase >::scalarBeta
protected

Definition at line 199 of file BiLinearFormsIntegratorsImpl.hpp.


The documentation for this struct was generated from the following file: