v0.14.0
Public Member Functions | Private Attributes | List of all members
HenckyOps::OpCalculateLogCImpl< DIM, GAUSS, DomainEleOp > Struct Template Reference

#include <tutorials/vec-2/src/HenckyOps.hpp>

Inheritance diagram for HenckyOps::OpCalculateLogCImpl< DIM, GAUSS, DomainEleOp >:
[legend]
Collaboration diagram for HenckyOps::OpCalculateLogCImpl< DIM, GAUSS, DomainEleOp >:
[legend]

Public Member Functions

 OpCalculateLogCImpl (const std::string field_name, boost::shared_ptr< CommonData > common_data)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 

Detailed Description

template<int DIM, typename DomainEleOp>
struct HenckyOps::OpCalculateLogCImpl< DIM, GAUSS, DomainEleOp >

Definition at line 205 of file HenckyOps.hpp.

Constructor & Destructor Documentation

◆ OpCalculateLogCImpl()

template<int DIM, typename DomainEleOp >
HenckyOps::OpCalculateLogCImpl< DIM, GAUSS, DomainEleOp >::OpCalculateLogCImpl ( const std::string  field_name,
boost::shared_ptr< CommonData common_data 
)
inline

Definition at line 207 of file HenckyOps.hpp.

209  : DomainEleOp(field_name, DomainEleOp::OPROW),
210  commonDataPtr(common_data) {
211  std::fill(&DomainEleOp::doEntities[MBEDGE],
212  &DomainEleOp::doEntities[MBMAXTYPE], false);
213  }

Member Function Documentation

◆ doWork()

template<int DIM, typename DomainEleOp >
MoFEMErrorCode HenckyOps::OpCalculateLogCImpl< DIM, GAUSS, DomainEleOp >::doWork ( int  side,
EntityType  type,
EntData data 
)
inline

Definition at line 215 of file HenckyOps.hpp.

215  {
217 
220 
221  constexpr auto t_kd = FTensor::Kronecker_Delta<int>();
222  // const size_t nb_gauss_pts = matGradPtr->size2();
223  const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
224  constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
225  commonDataPtr->matLogC.resize(size_symm, nb_gauss_pts, false);
226 
227  auto t_eig_val = getFTensor1FromMat<DIM>(commonDataPtr->matEigVal);
228  auto t_eig_vec = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matEigVec);
229 
230  auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
231 
232  for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
233 
236  eig(i) = t_eig_val(i);
237  eigen_vec(i, j) = t_eig_vec(i, j);
238  auto logC = EigenMatrix::getMat(eig, eigen_vec, f);
239  t_logC(i, j) = logC(i, j);
240 
241  ++t_eig_val;
242  ++t_eig_vec;
243  ++t_logC;
244  }
245 
247  }

Member Data Documentation

◆ commonDataPtr

template<int DIM, typename DomainEleOp >
boost::shared_ptr<CommonData> HenckyOps::OpCalculateLogCImpl< DIM, GAUSS, DomainEleOp >::commonDataPtr
private

Definition at line 250 of file HenckyOps.hpp.


The documentation for this struct was generated from the following file:
EigenMatrix::getMat
FTensor::Tensor2_symmetric< double, 3 > getMat(Val< double, 3 > &t_val, Vec< double, 3 > &t_vec, Fun< double > f)
Get the Mat object.
Definition: MatrixFunction.cpp:53
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
FTensor::Kronecker_Delta
Kronecker Delta class.
Definition: Kronecker_Delta.hpp:15
FTensor::Tensor2
Definition: Tensor2_value.hpp:16
DomainEleOp
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
Definition: child_and_parent.cpp:36
size_symm
constexpr auto size_symm
Definition: plastic.cpp:42
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
t_kd
constexpr auto t_kd
Definition: free_surface.cpp:137
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', DIM >
HenckyOps::OpCalculateLogCImpl< DIM, GAUSS, DomainEleOp >::commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
Definition: HenckyOps.hpp:250
HenckyOps::f
auto f
Definition: HenckyOps.hpp:15
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
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