v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OpElasticTools::OpEssentialRHS_U Struct Reference

#include <users_modules/multifield_plasticity/src/ElasticOperators.hpp>

Inheritance diagram for OpElasticTools::OpEssentialRHS_U:
[legend]
Collaboration diagram for OpElasticTools::OpEssentialRHS_U:
[legend]

Public Member Functions

 OpEssentialRHS_U (std::string disp_name, boost::shared_ptr< CommonData > common_data_ptr, VectorDouble &disp, const Range &essential_ents)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data)
 

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 
VectorDouble & disP
 
Range essentialEnts
 

Detailed Description

Definition at line 949 of file ElasticOperators.hpp.

Constructor & Destructor Documentation

◆ OpEssentialRHS_U()

OpElasticTools::OpEssentialRHS_U::OpEssentialRHS_U ( std::string  disp_name,
boost::shared_ptr< CommonData common_data_ptr,
VectorDouble &  disp,
const Range essential_ents 
)
inline

Definition at line 951 of file ElasticOperators.hpp.

954 : BoundaryEleOpAssembly(disp_name, disp_name, BoundaryEleOp::OPROW),
955 essentialEnts(essential_ents), disP(disp),
956 commonDataPtr(common_data_ptr) {}
@ OPROW
operator doWork function is executed on FE rows
boost::shared_ptr< CommonData > commonDataPtr

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode OpElasticTools::OpEssentialRHS_U::iNtegrate ( EntitiesFieldData::EntData &  row_data)
inline

Definition at line 958 of file ElasticOperators.hpp.

958 {
960 const int nb_row_dofs = row_data.getIndices().size();
961 const int nb_row_base_functions = row_data.getN().size2();
962
963 if (nb_row_dofs) {
964
965 EntityHandle ent = getFEEntityHandle();
966 if (essentialEnts.find(ent) == essentialEnts.end()) {
968 }
969
970 auto t_disp = getFTensor1FromMat<3>(*commonDataPtr->mDispPtr);
971
972 const int nb_integration_pts = getGaussPts().size2();
973 auto t_row_val = row_data.getFTensor0N();
974 auto t_w = getFTensor0IntegrationWeight();
975 const double vol = getMeasure();
976 auto t_coords = getFTensor1CoordsAtGaussPts();
977
978 Tensor1<double, 3> bc_disp(disP(0), disP(1), disP(2));
979 for (int gg = 0; gg != nb_integration_pts; ++gg) {
980 const double a = vol * t_w;
981
982 // // for testing radial displacement
983 // auto theta = atan2(t_coords(1), t_coords(0));
984 // bc_disp(0) = disP(0) * cos(theta);
985 // bc_disp(1) = disP(1) * sin(theta);
986
987 auto t_nf = getFTensor1FromArray<3, 3>(locF);
988 int rr = 0;
989 for (;rr != nb_row_dofs / 3; ++rr) {
990 t_nf(i) += a * t_row_val * (t_disp(i) - bc_disp(i));
991 ++t_row_val;
992 ++t_nf;
993 }
994 for (; rr < nb_row_base_functions; ++rr)
995 ++t_row_val;
996 ++t_disp;
997 ++t_coords;
998 ++t_w;
999 }
1000 }
1002 }
constexpr double a
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
FTensor::Index< 'i', SPACE_DIM > i

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<CommonData> OpElasticTools::OpEssentialRHS_U::commonDataPtr
private

Definition at line 1005 of file ElasticOperators.hpp.

◆ disP

VectorDouble& OpElasticTools::OpEssentialRHS_U::disP
private

Definition at line 1006 of file ElasticOperators.hpp.

◆ essentialEnts

Range OpElasticTools::OpEssentialRHS_U::essentialEnts
private

Definition at line 1007 of file ElasticOperators.hpp.


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