v0.13.2
Loading...
Searching...
No Matches
Protected Member Functions | List of all members
MoFEM::OpBaseImpl< PETSC, EleOp > Struct Template Reference

#include <src/finite_elements/FormsIntegrators.hpp>

Inheritance diagram for MoFEM::OpBaseImpl< PETSC, EleOp >:
[legend]
Collaboration diagram for MoFEM::OpBaseImpl< PETSC, EleOp >:
[legend]

Protected Member Functions

MoFEMErrorCode aSsemble (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data, const bool transpose)
 
MoFEMErrorCode aSsemble (EntitiesFieldData::EntData &data)
 
- Protected Member Functions inherited from MoFEM::OpBaseImpl< LAST_ASSEMBLE, EleOp >
FTensor::Tensor1< FTensor::PackPtr< double *, DIM >, DIM > getNf ()
 
FTensor::Tensor2< FTensor::PackPtr< double *, DIM >, DIM, DIM > getLocMat (const int rr)
 
virtual MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 Integrate grad-grad operator. More...
 
virtual MoFEMErrorCode iNtegrate (EntData &data)
 Class dedicated to integrate operator. More...
 
virtual MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool trans)=0
 
virtual MoFEMErrorCode aSsemble (EntData &data)=0
 

Additional Inherited Members

- Public Types inherited from MoFEM::OpBaseImpl< LAST_ASSEMBLE, EleOp >
using OpType = typename EleOp::OpType
 
using EntData = EntitiesFieldData::EntData
 
- Public Member Functions inherited from MoFEM::OpBaseImpl< LAST_ASSEMBLE, EleOp >
 OpBaseImpl (const std::string row_field_name, const std::string col_field_name, const OpType type, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 Do calculations for the left hand side. More...
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntData &row_data)
 Do calculations for the right hand side. More...
 
- Public Attributes inherited from MoFEM::OpBaseImpl< LAST_ASSEMBLE, EleOp >
TimeFun timeScalingFun
 assumes that time variable is set More...
 
FEFun feScalingFun
 assumes that time variable is set More...
 
boost::shared_ptr< RangeentsPtr
 Entities on which element is run. More...
 
- Protected Attributes inherited from MoFEM::OpBaseImpl< LAST_ASSEMBLE, EleOp >
int nbRows
 number of dofs on rows More...
 
int nbCols
 number if dof on column More...
 
int nbIntegrationPts
 number of integration points More...
 
int nbRowBaseFunctions
 number or row base functions More...
 
int rowSide
 row side number More...
 
int colSide
 column side number More...
 
EntityType rowType
 row type More...
 
EntityType colType
 column type More...
 
bool assembleTranspose
 
bool onlyTranspose
 
MatrixDouble locMat
 local entity block matrix More...
 
MatrixDouble locMatTranspose
 local entity block matrix More...
 
VectorDouble locF
 local entity vector More...
 

Detailed Description

template<typename EleOp>
struct MoFEM::OpBaseImpl< PETSC, EleOp >

Definition at line 357 of file FormsIntegrators.hpp.

Member Function Documentation

◆ aSsemble() [1/2]

template<typename EleOp >
MoFEMErrorCode MoFEM::OpBaseImpl< PETSC, EleOp >::aSsemble ( EntitiesFieldData::EntData data)
inlineprotectedvirtual

Implements MoFEM::OpBaseImpl< LAST_ASSEMBLE, EleOp >.

Definition at line 391 of file FormsIntegrators.hpp.

391 {
392
393 if (!this->timeScalingFun.empty())
394 this->locF *= this->timeScalingFun(this->getFEMethod()->ts_t);
395 if (!this->feScalingFun.empty())
396 this->locF *= this->feScalingFun(this->getFEMethod());
397
399 this->getKSPf(), data, &*this->locF.data().begin(), ADD_VALUES);
400 }
MoFEMErrorCode VecSetValues< EssentialBcStorage >(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Set values to vector in operator.
VectorDouble locF
local entity vector
TimeFun timeScalingFun
assumes that time variable is set
FEFun feScalingFun
assumes that time variable is set

◆ aSsemble() [2/2]

template<typename EleOp >
MoFEMErrorCode MoFEM::OpBaseImpl< PETSC, EleOp >::aSsemble ( EntitiesFieldData::EntData row_data,
EntitiesFieldData::EntData col_data,
const bool  transpose 
)
inlineprotectedvirtual

Implements MoFEM::OpBaseImpl< LAST_ASSEMBLE, EleOp >.

Definition at line 361 of file FormsIntegrators.hpp.

363 {
365
366 if (!this->timeScalingFun.empty())
367 this->locMat *= this->timeScalingFun(this->getFEMethod()->ts_t);
368 if (!this->feScalingFun.empty())
369 this->locMat *= this->feScalingFun(this->getFEMethod());
370
371 // Assemble transpose
372 if (transpose) {
373 this->locMatTranspose.resize(this->locMat.size2(), this->locMat.size1(),
374 false);
375 noalias(this->locMatTranspose) = trans(this->locMat);
377 this->getKSPB(), col_data, row_data,
378 &*this->locMatTranspose.data().begin(), ADD_VALUES);
379 }
380
381 if (!this->onlyTranspose) {
382 // assemble local matrix
384 this->getKSPB(), row_data, col_data, &*this->locMat.data().begin(),
385 ADD_VALUES);
386 }
387
389 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEMErrorCode MatSetValues< EssentialBcStorage >(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Set values to matrix in operator.
MatrixDouble locMatTranspose
local entity block matrix
MatrixDouble locMat
local entity block matrix

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