v0.15.0
Loading...
Searching...
No Matches
EshelbianPlasticity::OpCalculateReactionForces Struct Reference

#include "users_modules/eshelbian_plasticity/src/EshelbianPlasticity.hpp"

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

Public Member Functions

 OpCalculateReactionForces (boost::shared_ptr< DataAtIntegrationPts > data_ptr, std::string block_name, Range block_entities, std::array< double, 6 > &reaction_vec)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Private Attributes

boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 data at integration pts
 
Range blockEntities
 
std::string blockName
 
std::array< double, 6 > & reactionVec
 

Detailed Description

Definition at line 324 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpCalculateReactionForces()

EshelbianPlasticity::OpCalculateReactionForces::OpCalculateReactionForces ( boost::shared_ptr< DataAtIntegrationPts > data_ptr,
std::string block_name,
Range block_entities,
std::array< double, 6 > & reaction_vec )
inline

Definition at line 325 of file EshelbianPlasticity.hpp.

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpCalculateReactionForces::doWork ( int side,
EntityType type,
EntData & data )
Examples
EshelbianOperators.cpp.

Definition at line 913 of file EshelbianOperators.cpp.

914 {
916 if (blockEntities.find(getFEEntityHandle()) == blockEntities.end()) {
918 };
922 int nb_integration_pts = getGaussPts().size2();
923 auto t_w = getFTensor0IntegrationWeight();
924 auto t_traction = getFTensor1FromMat<SPACE_DIM>(dataAtPts->tractionAtPts);
925 auto t_coords = getFTensor1CoordsAtGaussPts();
926 auto t_spatial_disp = getFTensor1FromMat<SPACE_DIM>(dataAtPts->wL2AtPts);
927
928 FTensor::Tensor1<double, 3> t_coords_spatial{0., 0., 0.};
929 // Offset for center of mass. Can be added in the future.
930 FTensor::Tensor1<double, 3> t_off{0.0, 0.0, 0.0};
931 FTensor::Tensor1<double, 3> loc_reaction_forces{0., 0., 0.};
932 FTensor::Tensor1<double, 3> loc_moment_forces{0., 0., 0.};
933
934 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
935 loc_reaction_forces(i) += (t_traction(i)) * t_w * getMeasure();
936 t_coords_spatial(i) = t_coords(i) + t_spatial_disp(i);
937 // t_coords_spatial(i) -= t_off(i);
938 loc_moment_forces(i) +=
939 (FTensor::levi_civita<double>(i, j, k) * t_coords_spatial(j)) *
940 t_traction(k) * t_w * getMeasure();
941 ++t_coords;
942 ++t_spatial_disp;
943 ++t_w;
944 ++t_traction;
945 }
946
947 reactionVec[0] += loc_reaction_forces(0);
948 reactionVec[1] += loc_reaction_forces(1);
949 reactionVec[2] += loc_reaction_forces(2);
950 reactionVec[3] += loc_moment_forces(0);
951 reactionVec[4] += loc_moment_forces(1);
952 reactionVec[5] += loc_moment_forces(2);
953
955}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
FTensor::Tensor1< FTensor::PackPtr< T *, S >, Tensor_Dim > getFTensor1FromMat(ublas::matrix< T, L, A > &data)
Get tensor rank 1 (vector) form data matrix.
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts

Member Data Documentation

◆ blockEntities

Range EshelbianPlasticity::OpCalculateReactionForces::blockEntities
private
Examples
EshelbianOperators.cpp.

Definition at line 336 of file EshelbianPlasticity.hpp.

◆ blockName

std::string EshelbianPlasticity::OpCalculateReactionForces::blockName
private

Definition at line 337 of file EshelbianPlasticity.hpp.

◆ dataAtPts

boost::shared_ptr<DataAtIntegrationPts> EshelbianPlasticity::OpCalculateReactionForces::dataAtPts
private

data at integration pts

Examples
EshelbianOperators.cpp.

Definition at line 335 of file EshelbianPlasticity.hpp.

◆ reactionVec

std::array<double, 6>& EshelbianPlasticity::OpCalculateReactionForces::reactionVec
private
Examples
EshelbianOperators.cpp.

Definition at line 338 of file EshelbianPlasticity.hpp.


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