v0.10.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 793 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 796 of file EshelbianPlasticity.hpp.

799  : 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 420 of file EshelbianOperators.cpp.

422  {
424  if (type != MBTET)
426  int nb_integration_pts = data.getN().size1();
431 
432  dataAtPts->hAtPts.resize(9, nb_integration_pts, false);
433  dataAtPts->rotMatAtPts.resize(9, nb_integration_pts, false);
434  dataAtPts->diffRotMatAtPts.resize(27, nb_integration_pts, false);
435  dataAtPts->streachTensorAtPts.resize(6, nb_integration_pts, false);
436  dataAtPts->diffStreachTensorAtPts.resize(81, nb_integration_pts, false);
437 
438  auto t_h = getFTensor2FromMat<3, 3>(dataAtPts->hAtPts);
439  auto t_omega = getFTensor1FromMat<3>(dataAtPts->rotAxisAtPts);
440  auto t_R = getFTensor2FromMat<3, 3>(dataAtPts->rotMatAtPts);
441  auto t_diff_R = getFTensor3FromMat(dataAtPts->diffRotMatAtPts);
442  auto t_log_u =
443  getFTensor2SymmetricFromMat<3>(dataAtPts->logStreachTensorAtPts);
444  auto t_u = getFTensor2SymmetricFromMat<3>(dataAtPts->streachTensorAtPts);
445  auto t_diff_u = FTensor::Tensor4<FTensor::PackPtr<double *, 1>, 3, 3, 3, 3>(
446  &dataAtPts->diffStreachTensorAtPts(0, 0), nb_integration_pts);
447 
448  for (int gg = 0; gg != nb_integration_pts; ++gg) {
449 
450  auto t0_diff = get_diff_rotation_form_vector(t_omega);
451  auto t0 = get_rotation_form_vector(t_omega);
452 
453  t_diff_R(i, j, k) = t0_diff(i, j, k);
454  t_R(i, j) = t0(i, j);
455 
456  CHKERR tensor_exponent(t_log_u, t_u, t_diff_u);
457 
458  t_h(i, j) = t_R(i, k) * t_u(k, j);
459 
460  ++t_h;
461  ++t_R;
462  ++t_diff_R;
463  ++t_log_u;
464  ++t_u;
465  ++t_diff_u;
466  ++t_omega;
467  }
468 
469  CHKERR matrix_exponent_derivative(dataAtPts->logStreachTensorAtPts,
470  dataAtPts->diffStreachTensorAtPts,
471  dataAtPts->expLogUHessian);
472 
474 }
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:485
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516
static Index< 'l', 3 > l
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)
static Index< 'i', 3 > i
static Index< 'j', 3 > j
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
#define CHKERR
Inline error check.
Definition: definitions.h:604
static Index< 'k', 3 > k
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....

Member Data Documentation

◆ dataAtPts

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

data at integration pts

Definition at line 795 of file EshelbianPlasticity.hpp.


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