v0.15.5
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 168 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 170 of file BiLinearFormsIntegratorsImpl.hpp.

173 : OpMassImpl<1, FIELD_DIM, I, OpBase>(
174 row_field_name, col_field_name,
175 [](double, double, double) constexpr { return 1; }, ents_ptr),
176 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 828 of file BiLinearFormsIntegratorsImpl.hpp.

830 {
832
833 const auto vol = this->getMeasure();
834 const auto row_type = this->rowType;
835 const auto col_type = this->colType;
836 auto &loc_mat = this->locMat;
837
838 auto p = std::make_pair(row_type, col_type);
839
840 if (cacheLocMats[p]) {
841 if (cacheLocMats[p]->size1() != loc_mat.size1() &&
842 cacheLocMats[p]->size2() != loc_mat.size2()) {
843 cacheLocMats[p]->resize(loc_mat.size1(), loc_mat.size2());
844 CHKERR this->integrateImpl(row_data, col_data, 1);
845 *(cacheLocMats[p]) = loc_mat;
846 } else {
847 loc_mat = *(cacheLocMats[p]);
848 }
849 loc_mat *= scalarBeta * this->getMeasure();
850 } else {
851 CHKERR this->integrateImpl(row_data, col_data,
852 scalarBeta * this->getMeasure());
853 }
855}
#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 183 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 182 of file BiLinearFormsIntegratorsImpl.hpp.


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