v0.8.23
Public Member Functions | List of all members
EshelbianPlasticity::OpSpatialPrj Struct Reference

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

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

Public Member Functions

 OpSpatialPrj (const std::string &row_field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr)
 
MoFEMErrorCode integrate (EntData &row_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 (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode integrate (EntData &row_data, EntData &col_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 1153 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpSpatialPrj()

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

Definition at line 1154 of file EshelbianPlasticity.hpp.

1156  : OpAssembleVolume(row_field, data_ptr, OPROW) {}
OpAssembleVolume(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)

Member Function Documentation

◆ integrate()

MoFEMErrorCode EshelbianPlasticity::OpSpatialPrj::integrate ( EntData row_data)
virtual

Reimplemented from EshelbianPlasticity::OpAssembleBasic< VolUserDataOperator >.

Definition at line 1853 of file EshelbianOperators.cpp.

1853  {
1855 
1856  int nb_integration_pts = row_data.getN().size1();
1857  int row_nb_dofs = row_data.getIndices().size();
1858 
1859  auto get_ftensor1 = [](VectorDouble &v, const int r) {
1861  &v[r + 0], &v[r + 1], &v[r + 2]);
1862  };
1863 
1867 
1868  int row_nb_base_functions = row_data.getN().size2();
1869  auto t_row_base_fun = row_data.getFTensor0N();
1870 
1871  auto v = getVolume();
1872  auto t_w = getFTensor0IntegrationWeight();
1873 
1874  auto t_x_det = getFTensor0FromVec(*(dataAtPts->xDetAtPts));
1875  auto t_spatial_disp = getFTensor1FromMat<3>(*(dataAtPts->wAtPts));
1876 
1877  for (int gg = 0; gg != nb_integration_pts; ++gg) {
1878 
1879  auto t_rhs = get_ftensor1(nF, 0);
1880 
1881  double a = v * t_w * t_x_det;
1882 
1883  int rr = 0;
1884  for (; rr != row_nb_dofs / 3; ++rr) {
1885  t_rhs(i) += a * t_row_base_fun * (-t_spatial_disp(i));
1886  ++t_row_base_fun;
1887  ++t_rhs;
1888  }
1889 
1890  for (; rr < row_nb_base_functions; ++rr)
1891  ++t_row_base_fun;
1892 
1893  ++t_spatial_disp;
1894  ++t_w;
1895  ++t_x_det;
1896  }
1897 
1899 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
static FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vectorExample how to use it.
Definition: Templates.hpp:143
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406
ublas::vector< double, DoubleAllocator > VectorDouble
Definition: Types.hpp:76

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