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 257 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 259 of file HenckyOps.hpp.

261  : DomainEleOp(field_name, DomainEleOp::OPROW),
262  commonDataPtr(common_data) {
263  std::fill(&DomainEleOp::doEntities[MBEDGE],
264  &DomainEleOp::doEntities[MBMAXTYPE], false);
265  }

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 267 of file HenckyOps.hpp.

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

Member Data Documentation

◆ commonDataPtr

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

Definition at line 305 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:305
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