v0.16.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MatOps::OpRhsHu< FIELD_DIM, SPACE_DIM, A, GAUSS, OpBase > Struct Template Reference

#include "src/materials/MatHuHu.hpp"

Inheritance diagram for MatOps::OpRhsHu< FIELD_DIM, SPACE_DIM, A, GAUSS, OpBase >:
[legend]
Collaboration diagram for MatOps::OpRhsHu< FIELD_DIM, SPACE_DIM, A, GAUSS, OpBase >:
[legend]

Public Types

using OP = typename FormsIntegrators< OpBase >::template Assembly< A >::OpBase
 

Public Member Functions

 OpRhsHu (const std::string field_name, boost::shared_ptr< MatrixDouble > mat_vals, boost::shared_ptr< MatrixDouble > mat_K, boost::shared_ptr< Range > ents_ptr=nullptr)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
 

Protected Attributes

boost::shared_ptr< MatrixDoublematVals
 
boost::shared_ptr< MatrixDoublematK
 

Detailed Description

template<int FIELD_DIM, int SPACE_DIM, AssemblyType A, typename OpBase>
struct MatOps::OpRhsHu< FIELD_DIM, SPACE_DIM, A, GAUSS, OpBase >

Definition at line 172 of file MatHuHu.hpp.

Member Typedef Documentation

◆ OP

template<int FIELD_DIM, int SPACE_DIM, AssemblyType A, typename OpBase >
using MatOps::OpRhsHu< FIELD_DIM, SPACE_DIM, A, GAUSS, OpBase >::OP = typename FormsIntegrators<OpBase>::template Assembly<A>::OpBase

Definition at line 175 of file MatHuHu.hpp.

Constructor & Destructor Documentation

◆ OpRhsHu()

template<int FIELD_DIM, int SPACE_DIM, AssemblyType A, typename OpBase >
MatOps::OpRhsHu< FIELD_DIM, SPACE_DIM, A, GAUSS, OpBase >::OpRhsHu ( const std::string  field_name,
boost::shared_ptr< MatrixDouble mat_vals,
boost::shared_ptr< MatrixDouble mat_K,
boost::shared_ptr< Range ents_ptr = nullptr 
)
inline

Definition at line 177 of file MatHuHu.hpp.

181 : OP(field_name, field_name, OP::OPROW), matVals(mat_vals), matK(mat_K) {}
constexpr auto field_name
typename FormsIntegrators< OpBase >::template Assembly< A >::OpBase OP
Definition MatHuHu.hpp:175

Member Function Documentation

◆ iNtegrate()

template<int FIELD_DIM, int SPACE_DIM, AssemblyType A, typename OpBase >
MoFEMErrorCode MatOps::OpRhsHu< FIELD_DIM, SPACE_DIM, A, GAUSS, OpBase >::iNtegrate ( EntitiesFieldData::EntData data)
protected

Definition at line 225 of file MatHuHu.hpp.

226 {
228
232
233 auto get_val_grad_at_pts = MatrixSizeHelper<
235 DL>::get(*matVals, OP::nbIntegrationPts);
236 auto get_K_at_pts =
237 MatrixSizeHelper<GetFTensor1FromMatType<1, -1, DL>, DL>::get(
238 *matK, OP::nbIntegrationPts);
239
240 // get element volume
241 const double vol = OP::getMeasure();
242 // get integration weights
243 auto t_w = OP::getFTensor0IntegrationWeight();
244 // get base function gradient on rows
245 auto t_row_grad = row_data.getFTensor2DiffN2<SPACE_DIM>();
246 // get field gradient values
247 auto t_val_grad_at_pts =
248 get_val_grad_at_pts(); // tensor of second derivatives
249 // get K values
250 auto t_K_at_pts = get_K_at_pts(); // tensor of second derivatives
251 // get coordinate at integration points
252 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
253 // loop over integration points
254 for (int gg = 0; gg != OP::nbIntegrationPts; gg++) {
255 // take into account Jacobian
256 const double alpha = t_w * vol * t_K_at_pts(0);
257 // calculate rhs
258 auto t_nf = getFTensor1FromArray<FIELD_DIM, FIELD_DIM>(OP::locF);
259 // loop over rows base functions
260 int rr = 0;
261 for (; rr != OP::nbRows / FIELD_DIM; rr++) {
262 // calculate element of local rhs vector
263 t_nf(i) += alpha * (t_row_grad(J, K) * t_val_grad_at_pts(i, J, K));
264 ++t_row_grad; // move to another element of gradient of base
265 // function on row
266 }
267 for (; rr < OP::nbRowBaseFunctions; ++rr)
268 ++t_row_grad;
269
270 ++t_coords;
271 ++t_val_grad_at_pts;
272 ++t_K_at_pts;
273 ++t_w; // move to another integration weight
274 }
276}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
constexpr int FIELD_DIM
#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()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
Definition MatHuHu.hpp:33
decltype(GetFTensor1FromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor1FromMatType
decltype(GetFTensor3FromMatImpl< Tensor_Dim0, Tensor_Dim1, Tensor_Dim2, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor3FromMatType

Member Data Documentation

◆ matK

template<int FIELD_DIM, int SPACE_DIM, AssemblyType A, typename OpBase >
boost::shared_ptr<MatrixDouble> MatOps::OpRhsHu< FIELD_DIM, SPACE_DIM, A, GAUSS, OpBase >::matK
protected

Definition at line 185 of file MatHuHu.hpp.

◆ matVals

template<int FIELD_DIM, int SPACE_DIM, AssemblyType A, typename OpBase >
boost::shared_ptr<MatrixDouble> MatOps::OpRhsHu< FIELD_DIM, SPACE_DIM, A, GAUSS, OpBase >::matVals
protected

Definition at line 184 of file MatHuHu.hpp.


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