v0.15.0
Loading...
Searching...
No Matches
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 255 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 257 of file HenckyOps.hpp.

259 : DomainEleOp(field_name, DomainEleOp::OPROW),
260 commonDataPtr(common_data) {
261 std::fill(&DomainEleOp::doEntities[MBEDGE],
262 &DomainEleOp::doEntities[MBMAXTYPE], false);
263 }
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
constexpr auto field_name

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

265 {
267
268 FTensor::Index<'i', DIM> i;
269 FTensor::Index<'j', DIM> j;
270 FTensor::Index<'k', DIM> k;
271 FTensor::Index<'l', DIM> l;
272
273 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
274 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
275 commonDataPtr->matLogCdC.resize(size_symm * size_symm, nb_gauss_pts, false);
276 auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->matLogCdC);
277 auto t_eig_val = getFTensor1FromMat<DIM>(commonDataPtr->matEigVal);
278 auto t_eig_vec = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matEigVec);
279
280 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
281 // rare case when two eigen values are equal
282 auto nb_uniq = get_uniq_nb<DIM>(&t_eig_val(0));
283 t_logC_dC(i, j, k, l) =
284 2 * EigenMatrix::getDiffMat(t_eig_val, t_eig_vec, f, d_f,
285 nb_uniq)(i, j, k, l);
286
287 ++t_logC_dC;
288 ++t_eig_val;
289 ++t_eig_vec;
290 }
291
293 }
#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()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
auto getDiffMat(A &&t_val, B &&t_vec, Fun< double > f, Fun< double > d_f, const int nb)
Get the Diff Mat object.
auto get_uniq_nb(double *ptr)
Definition HenckyOps.hpp:32
constexpr auto size_symm
Definition plastic.cpp:42

Member Data Documentation

◆ commonDataPtr

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

Definition at line 296 of file HenckyOps.hpp.


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