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

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

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

Public Member Functions

 OpSpatialPrj_dx_dx (const std::string &row_field, const std::string &col_field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr)
 
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)
 

Additional Inherited Members

- 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 1160 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpSpatialPrj_dx_dx()

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

Definition at line 1161 of file EshelbianPlasticity.hpp.

1163  : OpAssembleVolume(row_field, col_field, data_ptr, OPROWCOL, false) {
1164  // FIXME: That is symmetric
1165  sYmm = false;
1166  }
OpAssembleVolume(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)

Member Function Documentation

◆ integrate()

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

Reimplemented from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >.

Definition at line 1901 of file EshelbianOperators.cpp.

1902  {
1904 
1905  int nb_integration_pts = row_data.getN().size1();
1906  int row_nb_dofs = row_data.getIndices().size();
1907  int col_nb_dofs = col_data.getIndices().size();
1908 
1909  auto get_ftensor2 = [](MatrixDouble &m, const int r, const int c) {
1911 
1912  &m(r + 0, c + 0), &m(r + 0, c + 1), &m(r + 0, c + 2),
1913 
1914  &m(r + 1, c + 0), &m(r + 1, c + 1), &m(r + 1, c + 2),
1915 
1916  &m(r + 2, c + 0), &m(r + 2, c + 1), &m(r + 2, c + 2)
1917 
1918  );
1919  };
1920 
1927 
1928  auto t_x_det = getFTensor0FromVec(*(dataAtPts->xDetAtPts));
1929  auto t_x_inv_grad = getFTensor2FromMat<3, 3>(*(dataAtPts->xInvGradAtPts));
1930  auto t_spatial_disp = getFTensor1FromMat<3>(*(dataAtPts->wAtPts));
1931 
1932  int row_nb_base_functions = row_data.getN().size2();
1933  auto t_row_base_fun = row_data.getFTensor0N();
1934 
1935  auto v = getVolume();
1936  auto t_w = getFTensor0IntegrationWeight();
1937 
1938  const double ts_a = getFEMethod()->ts_a;
1939 
1940  for (int gg = 0; gg != nb_integration_pts; ++gg) {
1941 
1942  double a = v * t_w * t_x_det;
1943 
1944  int rr = 0;
1945  for (; rr != row_nb_dofs / 3; ++rr) {
1946 
1947  auto t_m = get_ftensor2(K, 3 * rr, 0);
1948  auto t_col_base_fun = col_data.getFTensor0N(gg, 0);
1949  auto t_col_diff_base_fun = col_data.getFTensor1DiffN<3>(gg, 0);
1950 
1952  t_val(i) = a * t_row_base_fun * (-t_spatial_disp(i));
1953 
1954  for (int cc = 0; cc != col_nb_dofs / 3; ++cc) {
1955 
1956  t_m(i, j) += t_val(i) * t_x_inv_grad(k, j) * t_col_diff_base_fun(k);
1957 
1958  ++t_m;
1959  ++t_col_base_fun;
1960  ++t_col_diff_base_fun;
1961  }
1962 
1963  ++t_row_base_fun;
1964  }
1965  for (; rr < row_nb_base_functions; ++rr)
1966  ++t_row_base_fun;
1967 
1968  ++t_spatial_disp;
1969  ++t_w;
1970  ++t_x_det;
1971  ++t_x_inv_grad;
1972  }
1973 
1975 }
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
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
FTensor::Tensor1< double *, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
const VectorInt & getIndices() const
Get global indices of dofs on entity.
#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.

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