v0.14.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EshelbianPlasticity::OpRotationBcImpl< A, GAUSS > Struct Template Reference

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

Inheritance diagram for EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >:
[legend]
Collaboration diagram for EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >:
[legend]

Public Types

using OP = typename FormsIntegrators< FaceUserDataOperator >::Assembly< A >::OpBrokenBase
 

Public Member Functions

 OpRotationBcImpl (boost::shared_ptr< std::vector< BrokenBaseSideData >> broken_base_side_data, boost::shared_ptr< BcRotVec > &bc_rot_ptr, std::vector< boost::shared_ptr< ScalingMethod >> smv, boost::shared_ptr< Range > ents_ptr=nullptr)
 

Protected Member Functions

MoFEMErrorCode iNtegrate (EntData &data)
 

Protected Attributes

boost::shared_ptr< BcRotVecbcRotPtr
 
std::vector< boost::shared_ptr< ScalingMethod > > scalingMethodsVec
 

Detailed Description

template<AssemblyType A>
struct EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >

Definition at line 646 of file EshelbianPlasticity.hpp.

Member Typedef Documentation

◆ OP

template<AssemblyType A>
using EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >::OP = typename FormsIntegrators<FaceUserDataOperator>::Assembly< A>::OpBrokenBase

Definition at line 650 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpRotationBcImpl()

template<AssemblyType A>
EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >::OpRotationBcImpl ( boost::shared_ptr< std::vector< BrokenBaseSideData >>  broken_base_side_data,
boost::shared_ptr< BcRotVec > &  bc_rot_ptr,
std::vector< boost::shared_ptr< ScalingMethod >>  smv,
boost::shared_ptr< Range ents_ptr = nullptr 
)
inline

Definition at line 652 of file EshelbianPlasticity.hpp.

657  : OP(broken_base_side_data, ents_ptr), bcRotPtr(bc_rot_ptr),
658  scalingMethodsVec(smv) {}

Member Function Documentation

◆ iNtegrate()

template<AssemblyType A>
MoFEMErrorCode EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >::iNtegrate ( EntData data)
protected

Definition at line 794 of file EshelbianOperators.cpp.

794  {
796 
797  FTENSOR_INDEX(3, i);
798  FTENSOR_INDEX(3, j);
799  FTENSOR_INDEX(3, k);
800 
801  // get entity of face
802  EntityHandle fe_ent = OP::getFEEntityHandle();
803  // interate over all boundary data
804  for (auto &bc : (*bcRotPtr)) {
805  // check if finite element entity is part of boundary condition
806  if (bc.faces.find(fe_ent) != bc.faces.end()) {
807  int nb_dofs = data.getIndices().size();
808  int nb_integration_pts = OP::getGaussPts().size2();
809  auto t_normal = OP::getFTensor1NormalsAtGaussPts();
810  auto t_w = OP::getFTensor0IntegrationWeight();
811 
812  int nb_base_functions = data.getN().size2() / 3;
813  auto t_row_base_fun = data.getFTensor1N<3>();
814 
815  auto get_ftensor1 = [](auto &v) {
817  &v[2]);
818  };
819 
820  // get bc data
821  FTensor::Tensor1<double, 3> t_center(bc.vals[0], bc.vals[1], bc.vals[2]);
822 
823  double theta = bc.theta;
824  theta *= OP::getFEMethod()->ts_t;
825 
827  const double a = sqrt(t_normal(i) * t_normal(i));
828  t_omega(i) = t_normal(i) * (theta / a);
829  auto t_R = get_rotation_form_vector(t_omega, LARGE_ROT);
830  auto t_coords = OP::getFTensor1CoordsAtGaussPts();
831 
832  for (int gg = 0; gg != nb_integration_pts; ++gg) {
834  t_delta(i) = t_center(i) - t_coords(i);
836  t_disp(i) = t_delta(i) - t_R(i, j) * t_delta(j);
837 
838  auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
839  int bb = 0;
840  for (; bb != nb_dofs / 3; ++bb) {
841  t_nf(i) -= t_w * (t_row_base_fun(j) * t_normal(j)) * t_disp(i) * 0.5;
842  ++t_nf;
843  ++t_row_base_fun;
844  }
845  for (; bb != nb_base_functions; ++bb)
846  ++t_row_base_fun;
847 
848  ++t_w;
849  ++t_normal;
850  ++t_coords;
851  }
852  }
853  }
855 }

Member Data Documentation

◆ bcRotPtr

template<AssemblyType A>
boost::shared_ptr<BcRotVec> EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >::bcRotPtr
protected

Definition at line 662 of file EshelbianPlasticity.hpp.

◆ scalingMethodsVec

template<AssemblyType A>
std::vector<boost::shared_ptr<ScalingMethod> > EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >::scalingMethodsVec
protected

Definition at line 663 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:24
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
EntityHandle
FTENSOR_INDEX
#define FTENSOR_INDEX(DIM, I)
Definition: Templates.hpp:2011
EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >::OP
typename FormsIntegrators< FaceUserDataOperator >::Assembly< A >::OpBrokenBase OP
Definition: EshelbianPlasticity.hpp:650
a
constexpr double a
Definition: approx_sphere.cpp:30
EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >::bcRotPtr
boost::shared_ptr< BcRotVec > bcRotPtr
Definition: EshelbianPlasticity.hpp:662
MoFEM::EntitiesFieldData::EntData::getIndices
const VectorInt & getIndices() const
Get global indices of dofs on entity.
Definition: EntitiesFieldData.hpp:1214
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
EshelbianPlasticity::OpRotationBcImpl< A, GAUSS >::scalingMethodsVec
std::vector< boost::shared_ptr< ScalingMethod > > scalingMethodsVec
Definition: EshelbianPlasticity.hpp:663
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:43
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:1318
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:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359