v0.16.0
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 887 of file BiLinearFormsIntegratorsImpl.hpp.

889 {
891
892 const auto vol = this->getMeasure();
893 const auto row_type = this->rowType;
894 const auto col_type = this->colType;
895 auto &loc_mat = this->locMat;
896
897 auto p = std::make_pair(row_type, col_type);
898
899 if (cacheLocMats[p]) {
900 if (cacheLocMats[p]->size1() != loc_mat.size1() &&
901 cacheLocMats[p]->size2() != loc_mat.size2()) {
902 cacheLocMats[p]->resize(loc_mat.size1(), loc_mat.size2());
903 CHKERR this->integrateImpl(row_data, col_data, 1);
904 *(cacheLocMats[p]) = loc_mat;
905 } else {
906 loc_mat = *(cacheLocMats[p]);
907 }
908 loc_mat *= scalarBeta * this->getMeasure();
909 } else {
910 CHKERR this->integrateImpl(row_data, col_data,
911 scalarBeta * this->getMeasure());
912 }
914}
#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: