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

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

Inheritance diagram for EshelbianPlasticity::OpSpatialPhysical_du_du:
[legend]
Collaboration diagram for EshelbianPlasticity::OpSpatialPhysical_du_du:
[legend]

Public Member Functions

 OpSpatialPhysical_du_du (const std::string &row_field, const std::string &col_field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, const double alpha)
 
MoFEMErrorCode integrate (EntData &row_data, EntData &col_data)
 
- Public Member Functions inherited from EshelbianPlasticity::OpAssembleVolume
 OpAssembleVolume (const std::string &field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
 
 OpAssembleVolume (const std::string &row_field, const std::string &col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry)
 
- Public Member Functions inherited from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >
 OpAssembleBasic (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
 
 OpAssembleBasic (const std::string &row_field, const std::string &col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry)
 
virtual MoFEMErrorCode integrate (EntData &data)
 
virtual MoFEMErrorCode integrate (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode assemble (EntData &data)
 
virtual MoFEMErrorCode assemble (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode assemble (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 

Public Attributes

const double alpha_u
 
- Public Attributes inherited from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >
const bool assembleSymmetry
 
boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 data at integration pts More...
 
VectorDouble nF
 local right hand side vector More...
 
MatrixDouble K
 local tangent matrix More...
 
MatrixDouble transposeK
 

Detailed Description

Definition at line 961 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpSpatialPhysical_du_du()

EshelbianPlasticity::OpSpatialPhysical_du_du::OpSpatialPhysical_du_du ( const std::string &  row_field,
const std::string &  col_field,
boost::shared_ptr< DataAtIntegrationPts > &  data_ptr,
const double  alpha 
)

Definition at line 963 of file EshelbianPlasticity.hpp.

967  : OpAssembleVolume(row_field, col_field, data_ptr, OPROWCOL, false),
968  alpha_u(alpha) {
969  sYmm = false;
970  }
OpAssembleVolume(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)

Member Function Documentation

◆ integrate()

MoFEMErrorCode EshelbianPlasticity::OpSpatialPhysical_du_du::integrate ( EntData row_data,
EntData col_data 
)
virtual

Reimplemented from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >.

Definition at line 930 of file EshelbianOperators.cpp.

931  {
933 
934  int nb_integration_pts = row_data.getN().size1();
935  int row_nb_dofs = row_data.getIndices().size();
936  int col_nb_dofs = col_data.getIndices().size();
937  auto get_ftensor4 = [](MatrixDouble &m, const int r, const int c) {
939 
940  &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2), &m(r + 0, c + 3),
941  &m(r + 0, c + 4), &m(r + 0, c + 5),
942 
943  &m(r + 1, c + 0), &m(r + 1, c + 1), &m(r + 1, c + 2), &m(r + 1, c + 3),
944  &m(r + 1, c + 4), &m(r + 1, c + 5),
945 
946  &m(r + 2, c + 0), &m(r + 2, c + 1), &m(r + 2, c + 2), &m(r + 2, c + 3),
947  &m(r + 2, c + 4), &m(r + 2, c + 5),
948 
949  &m(r + 3, c + 0), &m(r + 3, c + 1), &m(r + 3, c + 2), &m(r + 3, c + 3),
950  &m(r + 3, c + 4), &m(r + 3, c + 5),
951 
952  &m(r + 4, c + 0), &m(r + 4, c + 1), &m(r + 4, c + 2), &m(r + 4, c + 3),
953  &m(r + 4, c + 4), &m(r + 4, c + 5),
954 
955  &m(r + 5, c + 0), &m(r + 5, c + 1), &m(r + 5, c + 2), &m(r + 5, c + 3),
956  &m(r + 5, c + 4), &m(r + 5, c + 5)
957 
958  );
959  };
966 
970 
971  auto v = getVolume();
972  auto t_w = getFTensor0IntegrationWeight();
973  auto t_P_dh0 = getFTensor3FromMat(*(dataAtPts->P_dh0));
974  auto t_P_dh1 = getFTensor3FromMat(*(dataAtPts->P_dh1));
975  auto t_P_dh2 = getFTensor3FromMat(*(dataAtPts->P_dh2));
976  auto t_x_grad = getFTensor2FromMat<3, 3>(*(dataAtPts->xGradAtPts));
977  int row_nb_base_functions = row_data.getN().size2();
978  auto t_row_base_fun = row_data.getFTensor0N();
979 
980  const double ts_a = getFEMethod()->ts_a;
981  for (int gg = 0; gg != nb_integration_pts; ++gg) {
982  double a = v * t_w;
983 
985  t_P_dh(i, j, N0, k) = t_x_grad(j, m) * t_P_dh0(i, m, k);
986  t_P_dh(i, j, N1, k) = t_x_grad(j, m) * t_P_dh1(i, m, k);
987  t_P_dh(i, j, N2, k) = t_x_grad(j, m) * t_P_dh2(i, m, k);
988 
990  t_pushed_P_du(i, j, k, l) = t_P_dh(i, j, k, n) * t_x_grad(l, n);
991 
992  int rr = 0;
993  for (; rr != row_nb_dofs / 6; ++rr) {
994 
995  auto t_col_base_fun = col_data.getFTensor0N(gg, 0);
996  auto t_m = get_ftensor4(K, 6 * rr, 0);
997 
998  for (int cc = 0; cc != col_nb_dofs / 6; ++cc) {
999 
1000  const double b = a * t_row_base_fun * t_col_base_fun;
1001 
1002  for (int ii : {0, 1, 2})
1003  for (int jj : {0, 1, 2})
1004  for (int kk : {0, 1, 2})
1005  for (int ll : {0, 1, 2})
1006  t_m(ii, jj, kk, ll) -= b * t_pushed_P_du(ii, jj, kk, ll);
1007 
1008  for (int ii : {0, 1, 2})
1009  for (int jj : {0, 1, 2})
1010  t_m(ii, jj, ii, jj) -= b * alpha_u * ts_a;
1011 
1012  ++t_m;
1013  ++t_col_base_fun;
1014  }
1015 
1016  ++t_row_base_fun;
1017  }
1018  for (; rr != row_nb_base_functions; ++rr)
1019  ++t_row_base_fun;
1020 
1021  ++t_w;
1022  ++t_P_dh0;
1023  ++t_P_dh1;
1024  ++t_P_dh2;
1025  ++t_x_grad;
1026  }
1028 }
ublas::matrix< double, ublas::row_major, DoubleAllocator > MatrixDouble
Definition: Types.hpp:74
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
const VectorInt & getIndices() const
Get global indices of dofs on entity.
FTensor::Tensor3< FTensor::PackPtr< double *, 1 >, 3, 3, 3 > getFTensor3FromMat(MatrixDouble &m)
#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::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.

Member Data Documentation

◆ alpha_u

const double EshelbianPlasticity::OpSpatialPhysical_du_du::alpha_u

Definition at line 962 of file EshelbianPlasticity.hpp.


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