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

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

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

Public Member Functions

 OpCalculateLogC_dCImpl (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::OpCalculateLogC_dCImpl< DIM, GAUSS, DomainEleOp >

Definition at line 254 of file HenckyOps.hpp.

Constructor & Destructor Documentation

◆ OpCalculateLogC_dCImpl()

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

Definition at line 256 of file HenckyOps.hpp.

258  : DomainEleOp(field_name, DomainEleOp::OPROW),
259  commonDataPtr(common_data) {
260  std::fill(&DomainEleOp::doEntities[MBEDGE],
261  &DomainEleOp::doEntities[MBMAXTYPE], false);
262  }

Member Function Documentation

◆ doWork()

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

Definition at line 264 of file HenckyOps.hpp.

264  {
266 
271 
272  const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
273  constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
274  commonDataPtr->matLogCdC.resize(size_symm * size_symm, nb_gauss_pts, false);
275  auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->matLogCdC);
276  auto t_eig_val = getFTensor1FromMat<DIM>(commonDataPtr->matEigVal);
277  auto t_eig_vec = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matEigVec);
278 
279  for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
280 
283  eig(i) = t_eig_val(i);
284  eigen_vec(i, j) = t_eig_vec(i, j);
285 
286  // rare case when two eigen values are equal
287  auto nb_uniq = get_uniq_nb<DIM>(&eig(0));
288  auto dlogC_dC = EigenMatrix::getDiffMat(eig, eigen_vec, f, d_f, nb_uniq);
289  dlogC_dC(i, j, k, l) *= 2;
290 
291  t_logC_dC(i, j, k, l) = dlogC_dC(i, j, k, l);
292 
293  ++t_logC_dC;
294  ++t_eig_val;
295  ++t_eig_vec;
296  }
297 
299  }

Member Data Documentation

◆ commonDataPtr

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

Definition at line 302 of file HenckyOps.hpp.


The documentation for this struct was generated from the following file:
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
HenckyOps::d_f
auto d_f
Definition: HenckyOps.hpp:16
FTensor::Tensor2
Definition: Tensor2_value.hpp:16
HenckyOps::OpCalculateLogC_dCImpl< DIM, GAUSS, DomainEleOp >::commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
Definition: HenckyOps.hpp:302
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
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', DIM >
HenckyOps::f
auto f
Definition: HenckyOps.hpp:15
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
EigenMatrix::getDiffMat
FTensor::Ddg< double, 3, 3 > getDiffMat(Val< double, 3 > &t_val, Vec< double, 3 > &t_vec, Fun< double > f, Fun< double > d_f, const int nb)
Get the Diff Mat object.
Definition: MatrixFunction.cpp:64
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
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21