v0.14.0
Public Member Functions | Public Attributes | List of all members
EshelbianPlasticity::OpRotationBc Struct Reference

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

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

Public Member Functions

 OpRotationBc (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, boost::shared_ptr< BcRotVec > &bc_rot_ptr)
 
MoFEMErrorCode integrate (EntData &data)
 
- Public Member Functions inherited from EshelbianPlasticity::OpAssembleFace
 OpAssembleFace (const std::string &field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, const char type)
 
 OpAssembleFace (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< FaceUserDataOperator >
 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, ScaleOff scale_off=[]() { return 1;})
 
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)
 

Public Attributes

boost::shared_ptr< BcRotVecbcRotPtr
 
- Public Attributes inherited from EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >
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
 
ScaleOff scaleOff
 

Additional Inherited Members

- Public Types inherited from EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >
using ScaleOff = boost::function< double()>
 

Detailed Description

Definition at line 589 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpRotationBc()

EshelbianPlasticity::OpRotationBc::OpRotationBc ( const std::string &  field_name,
boost::shared_ptr< DataAtIntegrationPts > &  data_ptr,
boost::shared_ptr< BcRotVec > &  bc_rot_ptr 
)
inline

Definition at line 591 of file EshelbianPlasticity.hpp.

594  : OpAssembleFace(field_name, data_ptr, OPROW), bcRotPtr(bc_rot_ptr) {}

Member Function Documentation

◆ integrate()

MoFEMErrorCode EshelbianPlasticity::OpRotationBc::integrate ( EntData data)
virtual

Reimplemented from EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >.

Definition at line 997 of file EshelbianOperators.cpp.

997  {
999  // get entity of face
1000  EntityHandle fe_ent = getFEEntityHandle();
1001  // interate over all boundary data
1002  for (auto &bc : (*bcRotPtr)) {
1003  // check if finite element entity is part of boundary condition
1004  if (bc.faces.find(fe_ent) != bc.faces.end()) {
1005  int nb_dofs = data.getIndices().size();
1006  int nb_integration_pts = data.getN().size1();
1007  auto t_normal = getFTensor1Normal();
1008  auto t_w = getFTensor0IntegrationWeight();
1009 
1010  int nb_base_functions = data.getN().size2() / 3;
1011  auto t_row_base_fun = data.getFTensor1N<3>();
1015  auto get_ftensor1 = [](auto &v) {
1017  &v[2]);
1018  };
1019 
1020  // get bc data
1021  FTensor::Tensor1<double, 3> t_center(bc.vals[0], bc.vals[1], bc.vals[2]);
1022 
1023  double theta = bc.theta;
1024  theta *= getFEMethod()->ts_t;
1025 
1027  const double a = sqrt(t_normal(i) * t_normal(i));
1028  t_omega(i) = t_normal(i) * (theta / a);
1029  auto t_R = get_rotation_form_vector(t_omega, LARGE_ROT);
1030  auto t_coords = getFTensor1CoordsAtGaussPts();
1031 
1032  for (int gg = 0; gg != nb_integration_pts; ++gg) {
1034  t_delta(i) = t_center(i) - t_coords(i);
1036  t_disp(i) = t_delta(i) - t_R(i, j) * t_delta(j);
1037 
1038  auto t_nf = get_ftensor1(nF);
1039  int bb = 0;
1040  for (; bb != nb_dofs / 3; ++bb) {
1041  t_nf(i) -= t_w * (t_row_base_fun(j) * t_normal(j)) * t_disp(i) * 0.5;
1042  ++t_nf;
1043  ++t_row_base_fun;
1044  }
1045  for (; bb != nb_base_functions; ++bb)
1046  ++t_row_base_fun;
1047 
1048  ++t_w;
1049  ++t_coords;
1050  }
1051  }
1052  }
1054 }

Member Data Documentation

◆ bcRotPtr

boost::shared_ptr<BcRotVec> EshelbianPlasticity::OpRotationBc::bcRotPtr

Definition at line 590 of file EshelbianPlasticity.hpp.


The documentation for this struct was generated from the following files:
EshelbianPlasticity::get_rotation_form_vector
auto get_rotation_form_vector(FTensor::Tensor1< T, 3 > &t_omega, RotSelector rotSelector=LARGE_ROT)
Definition: EshelbianOperators.cpp:83
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
EntityHandle
EshelbianPlasticity::OpAssembleBasic< FaceUserDataOperator >::nF
VectorDouble nF
local right hand side vector
Definition: EshelbianPlasticity.hpp:371
a
constexpr double a
Definition: approx_sphere.cpp:30
EshelbianPlasticity::OpRotationBc::bcRotPtr
boost::shared_ptr< BcRotVec > bcRotPtr
Definition: EshelbianPlasticity.hpp:590
MoFEM::EntitiesFieldData::EntData::getIndices
const VectorInt & getIndices() const
Get global indices of dofs on entity.
Definition: EntitiesFieldData.hpp:1201
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', 3 >
v
const double v
phase velocity of light in medium (cm/ns)
Definition: initial_diffusion.cpp:40
EshelbianPlasticity::LARGE_ROT
@ LARGE_ROT
Definition: EshelbianPlasticity.hpp:20
MoFEM::EntitiesFieldData::EntData::getN
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
Definition: EntitiesFieldData.hpp:1305
EshelbianPlasticity::OpAssembleFace::OpAssembleFace
OpAssembleFace(const std::string &field, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, const char type)
Definition: EshelbianPlasticity.hpp:476
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
MoFEM::EntitiesFieldData::EntData::getFTensor1N
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
Definition: EntitiesFieldData.cpp:640
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346