v0.16.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OpCalculateReactionForces Struct Reference

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

Inheritance diagram for OpCalculateReactionForces:
[legend]
Collaboration diagram for 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 303 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpCalculateReactionForces()

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 304 of file EshelbianOperators.hpp.

307 : FaceUserDataOperator(NOSPACE, OPSPACE), dataAtPts(data_ptr),
308 blockName(block_name), blockEntities(block_entities),
309 reactionVec(reaction_vec) {}
@ NOSPACE
Definition definitions.h:83
FaceElementForcesAndSourcesCore::UserDataOperator FaceUserDataOperator
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
std::array< double, 6 > & reactionVec

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpCalculateReactionForces::doWork ( int  side,
EntityType  type,
EntData data 
)
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 734 of file EshelbianOperators.cpp.

735 {
737 if (blockEntities.find(getFEEntityHandle()) == blockEntities.end()) {
739 };
743 int nb_integration_pts = getGaussPts().size2();
744 auto t_w = getFTensor0IntegrationWeight();
745 auto t_traction = dataAtPts->getFTensorTraction(nb_integration_pts);
746 auto t_coords = getFTensor1CoordsAtGaussPts();
747 auto t_spatial_disp = dataAtPts->getFTensorSmallWL2(nb_integration_pts);
748
749 FTensor::Tensor1<double, 3> t_coords_spatial{0., 0., 0.};
750 // Offset for center of mass. Can be added in the future.
751 FTensor::Tensor1<double, 3> t_off{0.0, 0.0, 0.0};
752 FTensor::Tensor1<double, 3> loc_reaction_forces{0., 0., 0.};
753 FTensor::Tensor1<double, 3> loc_moment_forces{0., 0., 0.};
754
755 for (auto gg = 0; gg != nb_integration_pts; ++gg) {
756 loc_reaction_forces(i) += (t_traction(i)) * t_w * getMeasure();
757 t_coords_spatial(i) = t_coords(i) + t_spatial_disp(i);
758 // t_coords_spatial(i) -= t_off(i);
759 loc_moment_forces(i) +=
760 (FTensor::levi_civita<double>(i, j, k) * t_coords_spatial(j)) *
761 t_traction(k) * t_w * getMeasure();
762 ++t_coords;
763 ++t_spatial_disp;
764 ++t_w;
765 ++t_traction;
766 }
767
768 reactionVec[0] += loc_reaction_forces(0);
769 reactionVec[1] += loc_reaction_forces(1);
770 reactionVec[2] += loc_reaction_forces(2);
771 reactionVec[3] += loc_moment_forces(0);
772 reactionVec[4] += loc_moment_forces(1);
773 reactionVec[5] += loc_moment_forces(2);
774
776}
#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

Member Data Documentation

◆ blockEntities

Range OpCalculateReactionForces::blockEntities
private

Definition at line 315 of file EshelbianOperators.hpp.

◆ blockName

std::string OpCalculateReactionForces::blockName
private

Definition at line 316 of file EshelbianOperators.hpp.

◆ dataAtPts

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

data at integration pts

Definition at line 314 of file EshelbianOperators.hpp.

◆ reactionVec

std::array<double, 6>& OpCalculateReactionForces::reactionVec
private

Definition at line 317 of file EshelbianOperators.hpp.


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