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

250  : DomainEleOp(field_name, DomainEleOp::OPROW),
251  commonDataPtr(common_data) {
252  std::fill(&DomainEleOp::doEntities[MBEDGE],
253  &DomainEleOp::doEntities[MBMAXTYPE], false);
254  }

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

256  {
258 
263 
264  const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
265  constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
266  commonDataPtr->matLogCdC.resize(size_symm * size_symm, nb_gauss_pts, false);
267  auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->matLogCdC);
268  auto t_eig_val = getFTensor1FromMat<DIM>(commonDataPtr->matEigVal);
269  auto t_eig_vec = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matEigVec);
270 
271  for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
272  // rare case when two eigen values are equal
273  auto nb_uniq = get_uniq_nb<DIM>(&t_eig_val(0));
274  t_logC_dC(i, j, k, l) =
275  2 * EigenMatrix::getDiffMat(t_eig_val, t_eig_vec, f, d_f,
276  nb_uniq)(i, j, k, l);
277 
278  ++t_logC_dC;
279  ++t_eig_val;
280  ++t_eig_vec;
281  }
282 
284  }

Member Data Documentation

◆ commonDataPtr

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

Definition at line 287 of file HenckyOps.hpp.


The documentation for this struct was generated from the following file:
HenckyOps::d_f
auto d_f
Definition: HenckyOps.hpp:16
HenckyOps::OpCalculateLogC_dCImpl< DIM, GAUSS, DomainEleOp >::commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
Definition: HenckyOps.hpp:287
EigenMatrix::getDiffMat
auto getDiffMat(A &&t_val, B &&t_vec, Fun< double > f, Fun< double > d_f, const int nb)
Get the Diff Mat object.
Definition: MatrixFunction.hpp:166
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
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