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

#include "src/materials/MatHuHu.hpp"

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

Public Types

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

Public Member Functions

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

Protected Member Functions

MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Protected Attributes

boost::shared_ptr< MatrixDoublematK
 

Detailed Description

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

Definition at line 190 of file MatHuHu.hpp.

Member Typedef Documentation

◆ OP

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

Definition at line 193 of file MatHuHu.hpp.

Constructor & Destructor Documentation

◆ OpLhsHuHu()

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

Definition at line 194 of file MatHuHu.hpp.

196 : OP(field_name, field_name, OP::OPROWCOL), matK(mat_K) {}
constexpr auto field_name
typename FormsIntegrators< OpBase >::template Assembly< A >::OpBase OP
Definition MatHuHu.hpp:193

Member Function Documentation

◆ iNtegrate()

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

Definition at line 279 of file MatHuHu.hpp.

281 {
283
288
289 auto get_K_at_pts =
290 MatrixSizeHelper<GetFTensor1FromMatType<1, -1, DL>, DL>::get(
291 *matK, OP::nbIntegrationPts);
292
293 constexpr auto t_kd = FTensor::Kronecker_Delta<int>();
294
295 // get element volume
296 const double vol = OP::getMeasure();
297 // get integration weights
298 auto t_w = OP::getFTensor0IntegrationWeight();
299 // get base function gradient on rows
300 auto t_row_grad = row_data.getFTensor2DiffN2<SPACE_DIM>();
301 // get k values
302 auto t_K_at_pts = get_K_at_pts(); // tensor of second derivatives
303 // get coordinate at integration points
304 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
305 // loop over integration points
306 for (int gg = 0; gg != OP::nbIntegrationPts; gg++) {
307 // take into account Jacobian
308 const double alpha = t_w * vol * t_K_at_pts(0);
309 // loop over rows base functions
310 int rr = 0;
311 for (; rr != OP::nbRows / FIELD_DIM; rr++) {
312
313 auto t_mat = getFTensor2FromArray<FIELD_DIM, FIELD_DIM, FIELD_DIM>(
314 OP::locMat, rr * FIELD_DIM, 0);
315 auto t_col_grad = col_data.getFTensor2DiffN2<SPACE_DIM>(gg, 0);
316
317 // calculate element of local matrix
318 for (int cc = 0; cc != OP::nbCols / FIELD_DIM; cc++) {
319 t_mat(i, j) +=
320 alpha * (t_row_grad(J, K) * t_col_grad(J, K)) * t_kd(i, j);
321 ++t_col_grad; // move to another element of gradient of base
322 // function on column
323 ++t_mat; // move to another element of local matrix
324 }
325 ++t_row_grad; // move to another element of gradient of base
326 // function on row
327 }
328 for (; rr < OP::nbRowBaseFunctions; ++rr)
329 ++t_row_grad;
330
331 ++t_coords;
332 ++t_K_at_pts;
333 ++t_w; // move to another integration weight
334 }
336}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
constexpr int FIELD_DIM
Kronecker Delta class.
#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()
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
FTensor::Index< 'j', 3 > j
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
Definition MatHuHu.hpp:33
decltype(GetFTensor1FromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor1FromMatType

Member Data Documentation

◆ matK

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

Definition at line 199 of file MatHuHu.hpp.


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