v0.9.1
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 735 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 738 of file EshelbianPlasticity.hpp.

741  : 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 426 of file EshelbianOperators.cpp.

428  {
430  if (type != MBTET)
432  int nb_integration_pts = data.getN().size1();
437 
438  dataAtPts->hAtPts->resize(9, nb_integration_pts, false);
439  dataAtPts->rotMatAtPts->resize(9, nb_integration_pts, false);
440  dataAtPts->diffRotMatAtPts->resize(27, nb_integration_pts, false);
441  dataAtPts->streachTensorAtPts->resize(6, nb_integration_pts, false);
442  dataAtPts->diffStreachTensorAtPts->resize(81, nb_integration_pts, false);
443 
444  auto t_h = getFTensor2FromMat<3, 3>(*(dataAtPts->hAtPts));
445  auto t_omega = getFTensor1FromMat<3>(*(dataAtPts->rotAxisAtPts));
446  auto t_R = getFTensor2FromMat<3, 3>(*(dataAtPts->rotMatAtPts));
447  auto t_diff_R = getFTensor3FromMat(*(dataAtPts->diffRotMatAtPts));
448  auto t_log_u =
449  getFTensor2SymmetricFromMat<3>(*(dataAtPts->logStreachTensorAtPts));
450  auto t_u = getFTensor2SymmetricFromMat<3>(*(dataAtPts->streachTensorAtPts));
451  auto t_diff_u = FTensor::Tensor4<FTensor::PackPtr<double *, 1>, 3, 3, 3, 3>(
452  &(*dataAtPts->diffStreachTensorAtPts)(0, 0), nb_integration_pts);
453 
454  for (int gg = 0; gg != nb_integration_pts; ++gg) {
455 
456  auto t0_diff = get_diff_rotation_form_vector(t_omega);
457  auto t0 = get_rotation_form_vector(t_omega);
458 
459  t_diff_R(i, j, k) = t0_diff(i, j, k);
460  t_R(i, j) = t0(i, j);
461 
462  CHKERR tensor_exponent(t_log_u, t_u, t_diff_u);
463 
464  t_h(i, j) = t_R(i, k) * t_u(k, j);
465 
466  ++t_h;
467  ++t_R;
468  ++t_diff_R;
469  ++t_log_u;
470  ++t_u;
471  ++t_diff_u;
472  ++t_omega;
473  }
474 
475  CHKERR matrix_exponent_derivative(*(dataAtPts->logStreachTensorAtPts),
476  *(dataAtPts->diffStreachTensorAtPts),
477  dataAtPts->expLogUHessian);
478 
479  // CHKERR matrix_rotation_derivative(*(dataAtPts->rotAxisAtPts),
480  // dataAtPts->rotationHessian);
481 
483 }
static MoFEMErrorCode matrix_exponent_derivative(MatrixDouble &log_u, MatrixDouble &diff_u, std::array< MatrixDouble, 6 > &diff2_u)
static FTensor::Tensor3< typename TensorTypeExtractor< T >::Type, 3, 3, 3 > get_diff_rotation_form_vector(FTensor::Tensor1< T, 3 > &t_omega)
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:482
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:513
static FTensor::Tensor2< typename TensorTypeExtractor< T >::Type, 3, 3 > get_rotation_form_vector(FTensor::Tensor1< T, 3 > &t_omega)
static MoFEMErrorCode tensor_exponent(FTensor::Tensor2_symmetric< T, 3 > &t_log_s_u, FTensor::Tensor2_symmetric< T, 3 > &t_s_u, FTensor::Tensor4< T, 3, 3, 3, 3 > &t_diff_s_u)
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:601
FTensor::Index< 'k', 2 > k
Definition: ContactOps.hpp:28
FTensor::Index< 'j', 2 > j
Definition: ContactOps.hpp:27
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:412
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FTensor::Index< 'l', 2 > l
Definition: ContactOps.hpp:29
FTensor::Index< 'i', 2 > i
[Common data]
Definition: ContactOps.hpp:26

Member Data Documentation

◆ dataAtPts

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

data at integration pts

Definition at line 737 of file EshelbianPlasticity.hpp.


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