v0.9.0
Public Member Functions | Public Attributes | List of all members
EshelbianPlasticity::OpCalculateRotationAndSpatialGradient Struct Reference

#include <users_modules/eshelbian_plasticty/src/EshelbianPlasticity.hpp>

Inherits VolUserDataOperator.

Public Member Functions

 OpCalculateRotationAndSpatialGradient (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > &data_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Public Attributes

boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 data at integration pts More...
 

Detailed Description

Definition at line 809 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpCalculateRotationAndSpatialGradient()

EshelbianPlasticity::OpCalculateRotationAndSpatialGradient::OpCalculateRotationAndSpatialGradient ( const std::string &  field_name,
boost::shared_ptr< DataAtIntegrationPts > &  data_ptr 
)

Definition at line 812 of file EshelbianPlasticity.hpp.

815  : VolUserDataOperator(field_name, OPROW), dataAtPts(data_ptr) {}
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
VolumeElementForcesAndSourcesCore::UserDataOperator VolUserDataOperator

Member Function Documentation

◆ doWork()

MoFEMErrorCode EshelbianPlasticity::OpCalculateRotationAndSpatialGradient::doWork ( int  side,
EntityType  type,
EntData data 
)

Definition at line 20 of file EshelbianOperators.cpp.

22  {
24  if (type != MBTET)
26  int nb_integration_pts = data.getN().size1();
31 
32  dataAtPts->hAtPts->resize(9, nb_integration_pts, false);
33  dataAtPts->hDeltaAtPts->resize(9, nb_integration_pts, false);
34  dataAtPts->xDetAtPts->resize(nb_integration_pts, false);
35  dataAtPts->xInvGradAtPts->resize(9, nb_integration_pts, false);
36  dataAtPts->rotMatAtPts->resize(9, nb_integration_pts, false);
37  dataAtPts->diffRotMatAtPts->resize(27, nb_integration_pts, false);
38 
39  auto t_h = getFTensor2FromMat<3, 3>(*(dataAtPts->hAtPts));
40  auto t_delta_h = getFTensor2FromMat<3, 3>(*(dataAtPts->hDeltaAtPts));
41  auto t_x_grad = getFTensor2FromMat<3, 3>(*(dataAtPts->xGradAtPts));
42  auto t_x_det = getFTensor0FromVec(*(dataAtPts->xDetAtPts));
43  auto t_x_inv_grad = getFTensor2FromMat<3, 3>(*(dataAtPts->xInvGradAtPts));
44  auto t_u = getFTensor2SymmetricFromMat<3>(*(dataAtPts->streachTensorAtPts));
45  auto t_omega = getFTensor1FromMat<3>(*(dataAtPts->rotAxisAtPts));
46  auto t_R = getFTensor2FromMat<3, 3>(*(dataAtPts->rotMatAtPts));
47  auto t_diff_R = getFTensor3FromMat(*(dataAtPts->diffRotMatAtPts));
48 
49  for (int gg = 0; gg != nb_integration_pts; ++gg) {
50 
51  CHKERR determinantTensor3by3(t_x_grad, t_x_det);
52  CHKERR invertTensor3by3(t_x_grad, t_x_det, t_x_inv_grad);
53 
54  auto t0_diff = getDiffRotationFormVector(t_omega);
55  auto t0 = getRotationFormVector(t_omega);
56 
57  t_diff_R(i, j, k) = t0_diff(i, j, k);
58  t_R(i, j) = t0(i, j);
59  t_delta_h(i, j) = t_R(i, k) * t_u(k, j) + t_R(i, j);
60  t_h(i, j) = t_delta_h(i, k) * t_x_grad(k, j);
61 
62  ++t_h;
63  ++t_delta_h;
64  ++t_x_grad;
65  ++t_x_det;
66  ++t_x_inv_grad;
67  ++t_R;
68  ++t_diff_R;
69  ++t_u;
70  ++t_omega;
71  }
72 
74 }
static FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:142
MoFEMErrorCode determinantTensor3by3(T1 &t, T2 &det)
Calculate determinant 3 by 3.
Definition: Templates.hpp:415
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
FTensor::Tensor3< double, 3, 3, 3 > getDiffRotationFormVector(FTensor::Tensor1< T, 3 > &t_omega)
MoFEMErrorCode invertTensor3by3(ublas::matrix< T, L, A > &jac_data, ublas::vector< T, A > &det_data, ublas::matrix< T, L, A > &inv_jac_data)
Calculate inverse of tensor rank 2 at integration points.
Definition: Templates.hpp:396
FTensor::Tensor3< FTensor::PackPtr< double *, 1 >, 3, 3, 3 > getFTensor3FromMat(MatrixDouble &m)
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FTensor::Tensor2< double, 3, 3 > getRotationFormVector(FTensor::Tensor1< T, 3 > &t_omega)

Member Data Documentation

◆ dataAtPts

boost::shared_ptr<DataAtIntegrationPts> EshelbianPlasticity::OpCalculateRotationAndSpatialGradient::dataAtPts

data at integration pts

Definition at line 811 of file EshelbianPlasticity.hpp.


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