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

#include <src/finite_elements/LinearFormsIntegratorsImpl.hpp>

Inheritance diagram for MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >:
[legend]
Collaboration diagram for MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >:
[legend]

Public Member Functions

 OpMixDivTimesUImpl (const std::string field_name, boost::shared_ptr< VectorDouble > vec_vals, ScalarFun beta=[](double, double, double) constexpr { return 1;}, boost::shared_ptr< Range > ents_ptr=nullptr)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
 

Protected Attributes

ScalarFun betaConst
 
boost::shared_ptr< VectorDoublevecVals
 
FTensor::Index< 'j', SPACE_DIMj
 

Detailed Description

template<int SPACE_DIM, typename OpBase, CoordinateTypes CoordSys>
struct MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >

Definition at line 265 of file LinearFormsIntegratorsImpl.hpp.

Constructor & Destructor Documentation

◆ OpMixDivTimesUImpl()

template<int SPACE_DIM, typename OpBase , CoordinateTypes CoordSys>
MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >::OpMixDivTimesUImpl ( const std::string  field_name,
boost::shared_ptr< VectorDouble vec_vals,
ScalarFun  beta = [](doubledoubledouble) constexpr { return 1; },
boost::shared_ptr< Range ents_ptr = nullptr 
)
inline

Definition at line 267 of file LinearFormsIntegratorsImpl.hpp.

269  { return 1; },
270  boost::shared_ptr<Range> ents_ptr = nullptr)
271  : OpBase(field_name, field_name, OpBase::OPROW, ents_ptr),
272  vecVals(vec_vals), betaConst(beta) {}

Member Function Documentation

◆ iNtegrate()

template<int SPACE_DIM, typename OpBase , CoordinateTypes CoordSys>
MoFEMErrorCode MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >::iNtegrate ( EntitiesFieldData::EntData data)
protected

Definition at line 882 of file LinearFormsIntegratorsImpl.hpp.

883  {
885 
886  const size_t nb_base_functions = row_data.getN().size2() / 3;
887  auto t_w = this->getFTensor0IntegrationWeight();
888  // get coordinate at integration points
889  auto t_coords = OpBase::getFTensor1CoordsAtGaussPts();
890  auto t_diff_base = row_data.getFTensor2DiffN<3, SPACE_DIM>();
891  auto t_u = getFTensor0FromVec(*(vecVals));
892 
893  for (size_t gg = 0; gg != OpBase::nbIntegrationPts; ++gg) {
894 
895  const double alpha = this->getMeasure() * t_w *
896  betaConst(t_coords(0), t_coords(1), t_coords(2));
897  ;
898 
899  size_t bb = 0;
900  for (; bb != this->nbRows; ++bb) {
901  const double t_div_base = t_diff_base(j, j);
902  OpBase::locF[bb] += alpha * t_div_base * t_u;
903  ++t_diff_base;
904  }
905  for (; bb < nb_base_functions; ++bb)
906  ++t_diff_base;
907 
908  ++t_u;
909  ++t_w;
910  ++t_coords;
911  }
912 
914 }

Member Data Documentation

◆ betaConst

template<int SPACE_DIM, typename OpBase , CoordinateTypes CoordSys>
ScalarFun MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >::betaConst
protected

Definition at line 275 of file LinearFormsIntegratorsImpl.hpp.

◆ j

template<int SPACE_DIM, typename OpBase , CoordinateTypes CoordSys>
FTensor::Index<'j', SPACE_DIM> MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >::j
protected

Definition at line 277 of file LinearFormsIntegratorsImpl.hpp.

◆ vecVals

template<int SPACE_DIM, typename OpBase , CoordinateTypes CoordSys>
boost::shared_ptr<VectorDouble> MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >::vecVals
protected

Definition at line 276 of file LinearFormsIntegratorsImpl.hpp.


The documentation for this struct was generated from the following file:
MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >::vecVals
boost::shared_ptr< VectorDouble > vecVals
Definition: LinearFormsIntegratorsImpl.hpp:276
MoFEM::OpBaseImpl::nbIntegrationPts
int nbIntegrationPts
number of integration points
Definition: FormsIntegrators.hpp:238
OpBase
OpBaseImpl< PETSC, EdgeEleOp > OpBase
Definition: radiation.cpp:29
MoFEM::OpBaseImpl::locF
VectorDouble locF
local entity vector
Definition: FormsIntegrators.hpp:251
MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >::betaConst
ScalarFun betaConst
Definition: LinearFormsIntegratorsImpl.hpp:275
MoFEM::OpMixDivTimesUImpl< 3, 1, SPACE_DIM, GAUSS, OpBase, CoordSys >::j
FTensor::Index< 'j', SPACE_DIM > j
Definition: LinearFormsIntegratorsImpl.hpp:277
SPACE_DIM
constexpr int SPACE_DIM
Definition: child_and_parent.cpp:16
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
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