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

#include "tutorials/vec-2_nonlinear_elasticity/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< CommonData > commonDataPtr
 

Detailed Description

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

Definition at line 211 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 213 of file HenckyOps.hpp.

215 : DomainEleOp(field_name, DomainEleOp::OPROW),
216 commonDataPtr(common_data) {
217 std::fill(&DomainEleOp::doEntities[MBEDGE],
218 &DomainEleOp::doEntities[MBMAXTYPE], false);
219 }
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 221 of file HenckyOps.hpp.

221 {
223
224 FTensor::Index<'i', DIM> i;
225 FTensor::Index<'j', DIM> j;
226 FTensor::Index<'k', DIM> k;
227 FTensor::Index<'l', DIM> l;
228
229 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
230 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
231 commonDataPtr->matLogCdC.resize(nb_gauss_pts, size_symm * size_symm, false);
232 auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->matLogCdC);
233 auto t_eig_val = getFTensor1FromMat<DIM>(commonDataPtr->matEigVal);
234 auto t_eig_vec = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matEigVec);
235
236 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
237 // rare case when two eigen values are equal
238 auto nb_uniq = getUniqNb<DIM>(getVectorAdaptor(&t_eig_val(0), DIM),
240 t_logC_dC(i, j, k, l) =
241 2 * EigenMatrix::getDiffMat(t_eig_val, t_eig_vec, f, d_f,
242 nb_uniq)(i, j, k, l);
243
244 ++t_logC_dC;
245 ++t_eig_val;
246 ++t_eig_vec;
247 }
248
250 }
#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 getVectorAdaptor(T1 ptr, const size_t n)
Get Vector adaptor.
Definition Templates.hpp:49
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 253 of file HenckyOps.hpp.


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