v0.15.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 169 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 171 of file BiLinearFormsIntegratorsImpl.hpp.

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

809 {
811
812 const auto vol = this->getMeasure();
813 const auto row_type = this->rowType;
814 const auto col_type = this->colType;
815 auto &loc_mat = this->locMat;
816
817 auto p = std::make_pair(row_type, col_type);
818
819 if (cacheLocMats[p]) {
820 if (cacheLocMats[p]->size1() != loc_mat.size1() &&
821 cacheLocMats[p]->size2() != loc_mat.size2()) {
822 cacheLocMats[p]->resize(loc_mat.size1(), loc_mat.size2());
823 CHKERR this->integrateImpl(row_data, col_data, 1);
824 *(cacheLocMats[p]) = loc_mat;
825 } else {
826 loc_mat = *(cacheLocMats[p]);
827 }
828 loc_mat *= scalarBeta * this->getMeasure();
829 } else {
830 CHKERR this->integrateImpl(row_data, col_data,
831 scalarBeta * this->getMeasure());
832 }
834}
#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 184 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 183 of file BiLinearFormsIntegratorsImpl.hpp.


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