v0.14.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase > Struct Template Reference

#include <src/finite_elements/LinearFormsIntegratorsImpl.hpp>

Inheritance diagram for MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >:
[legend]
Collaboration diagram for MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >:
[legend]

Public Member Functions

 OpMixTensorTimesGradUImpl (const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals)
 
 OpMixTensorTimesGradUImpl (const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals, ScalarFun beta_fun)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
 

Protected Attributes

boost::shared_ptr< MatrixDoublematVals
 
ScalarFun betaCoeff = [](double, double, double) constexpr { return 1; }
 
FTensor::Index< 'i', SPACE_DIMi
 
FTensor::Index< 'j', SPACE_DIMj
 

Detailed Description

template<int SPACE_DIM, typename OpBase>
struct MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >

Definition at line 347 of file LinearFormsIntegratorsImpl.hpp.

Constructor & Destructor Documentation

◆ OpMixTensorTimesGradUImpl() [1/2]

template<int SPACE_DIM, typename OpBase >
MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::OpMixTensorTimesGradUImpl ( const std::string  field_name,
boost::shared_ptr< MatrixDouble mat_vals 
)
inline

Definition at line 348 of file LinearFormsIntegratorsImpl.hpp.

350  : OpBase(field_name, field_name, OpBase::OPROW), matVals(mat_vals) {}

◆ OpMixTensorTimesGradUImpl() [2/2]

template<int SPACE_DIM, typename OpBase >
MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::OpMixTensorTimesGradUImpl ( const std::string  field_name,
boost::shared_ptr< MatrixDouble mat_vals,
ScalarFun  beta_fun 
)
inline

Definition at line 352 of file LinearFormsIntegratorsImpl.hpp.

355  : OpBase(field_name, field_name, OpBase::OPROW), matVals(mat_vals),
356  betaCoeff(beta_fun) {}

Member Function Documentation

◆ iNtegrate()

template<int SPACE_DIM, typename OpBase >
MoFEMErrorCode MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::iNtegrate ( EntitiesFieldData::EntData data)
protected

Definition at line 976 of file LinearFormsIntegratorsImpl.hpp.

977  {
979 
980  const size_t nb_base_functions = row_data.getN().size2() / 3;
981  auto t_w = this->getFTensor0IntegrationWeight();
982  auto t_coords = this->getFTensor1CoordsAtGaussPts();
983  auto t_base = row_data.getFTensor1N<3>();
984  auto t_grad = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*(matVals));
985 
986  for (size_t gg = 0; gg != OpBase::nbIntegrationPts; ++gg) {
987 
988  const double alpha = this->getMeasure() * t_w;
989  auto t_nf = OpBase::template getNf<SPACE_DIM>();
990 
991  size_t bb = 0;
992  for (; bb != this->nbRows / SPACE_DIM; ++bb) {
993  t_nf(i) += alpha * betaCoeff(t_coords(0), t_coords(1), t_coords(2)) *
994  t_base(j) * t_grad(i, j);
995  ++t_nf;
996  ++t_base;
997  }
998  for (; bb < nb_base_functions; ++bb)
999  ++t_base;
1000 
1001  ++t_grad;
1002  ++t_coords;
1003  ++t_w;
1004  }
1005 
1007 }

Member Data Documentation

◆ betaCoeff

template<int SPACE_DIM, typename OpBase >
ScalarFun MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::betaCoeff = [](double, double, double) constexpr { return 1; }
protected

Definition at line 360 of file LinearFormsIntegratorsImpl.hpp.

◆ i

template<int SPACE_DIM, typename OpBase >
FTensor::Index<'i', SPACE_DIM> MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::i
protected

Definition at line 362 of file LinearFormsIntegratorsImpl.hpp.

◆ j

template<int SPACE_DIM, typename OpBase >
FTensor::Index<'j', SPACE_DIM> MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::j
protected

Definition at line 363 of file LinearFormsIntegratorsImpl.hpp.

◆ matVals

template<int SPACE_DIM, typename OpBase >
boost::shared_ptr<MatrixDouble> MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::matVals
protected

Definition at line 359 of file LinearFormsIntegratorsImpl.hpp.


The documentation for this struct was generated from the following file:
MoFEM::OpBaseImpl::nbIntegrationPts
int nbIntegrationPts
number of integration points
Definition: FormsIntegrators.hpp:238
MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::matVals
boost::shared_ptr< MatrixDouble > matVals
Definition: LinearFormsIntegratorsImpl.hpp:359
OpBase
OpBaseImpl< PETSC, EdgeEleOp > OpBase
Definition: radiation.cpp:29
MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::j
FTensor::Index< 'j', SPACE_DIM > j
Definition: LinearFormsIntegratorsImpl.hpp:363
SPACE_DIM
constexpr int SPACE_DIM
Definition: child_and_parent.cpp:16
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::i
FTensor::Index< 'i', SPACE_DIM > i
Definition: LinearFormsIntegratorsImpl.hpp:362
MoFEM::OpMixTensorTimesGradUImpl< SPACE_DIM, GAUSS, OpBase >::betaCoeff
ScalarFun betaCoeff
Definition: LinearFormsIntegratorsImpl.hpp:360
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359