v0.16.3
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
OpFaceMaterialForce Struct Reference

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

Inheritance diagram for OpFaceMaterialForce:
[legend]
Collaboration diagram for OpFaceMaterialForce:
[legend]

Public Types

using OP = FaceElementForcesAndSourcesCore::UserDataOperator
 

Public Member Functions

 OpFaceMaterialForce (boost::shared_ptr< DataAtIntegrationPts > data_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Private Attributes

boost::shared_ptr< DataAtIntegrationPts > dataAtPts
 data at integration pts
 

Detailed Description

Definition at line 1002 of file EshelbianOperators.hpp.

Member Typedef Documentation

◆ OP

using OpFaceMaterialForce::OP = FaceElementForcesAndSourcesCore::UserDataOperator

Definition at line 1006 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpFaceMaterialForce()

OpFaceMaterialForce::OpFaceMaterialForce ( boost::shared_ptr< DataAtIntegrationPts >  data_ptr)
inline

Definition at line 1008 of file EshelbianOperators.hpp.

1009 : OP(NOSPACE, OPSPACE), dataAtPts(data_ptr) {}
@ NOSPACE
Definition definitions.h:83
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
FaceElementForcesAndSourcesCore::UserDataOperator OP

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpFaceMaterialForce::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 4496 of file EshelbianOperators.cpp.

4497 {
4499
4500#ifndef NDEBUG
4501 auto fe_mi_ptr = getFEMethod()->numeredEntFiniteElementPtr;
4502 auto pstatus = fe_mi_ptr->getPStatus();
4503 if (pstatus) {
4504 auto owner = fe_mi_ptr->getOwnerProc();
4505 MOFEM_LOG("SELF", Sev::noisy)
4506 << "OpFaceMaterialForce: owner proc is not 0, owner proc: " << owner
4507 << " " << getPtrFE()->mField.get_comm_rank();
4508 }
4509#endif // NDEBUG
4510
4512
4514 t_face_T(I) = 0.;
4515 double face_pressure = 0.;
4516 auto t_T = dataAtPts->getFTensorFaceMaterialForce(
4517 getGaussPts().size2()); //< face material force
4518 auto t_p =
4519 getFTensor0FromVec(dataAtPts->normalPressureAtPts); //< normal pressure
4520 auto t_w = getFTensor0IntegrationWeight();
4521 for (auto gg = 0; gg != getGaussPts().size2(); ++gg) {
4522 t_face_T(I) += t_w * t_T(I);
4523 face_pressure += t_w * t_p;
4524 ++t_w;
4525 ++t_T;
4526 ++t_p;
4527 }
4528 t_face_T(I) *= getMeasure();
4529 face_pressure *= getMeasure();
4530
4531 auto get_tag = [&](auto name, auto dim) {
4532 auto &moab = getPtrFE()->mField.get_moab();
4533 Tag tag;
4534 double def_val[] = {0., 0., 0.};
4535 CHK_MOAB_THROW(moab.tag_get_handle(name, dim, MB_TYPE_DOUBLE, tag,
4536 MB_TAG_CREAT | MB_TAG_SPARSE, def_val),
4537 "create tag");
4538 return tag;
4539 };
4540
4541 auto set_tag = [&](auto &&tag, auto ptr) {
4542 auto &moab = getPtrFE()->mField.get_moab();
4543 auto face = getPtrFE()->getFEEntityHandle();
4544 CHK_MOAB_THROW(moab.tag_set_data(tag, &face, 1, ptr), "set tag");
4545 };
4546
4547 set_tag(get_tag("MaterialForce", 3), &t_face_T(0));
4548 set_tag(get_tag("FacePressure", 1), &face_pressure);
4549
4551}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MOFEM_LOG(channel, severity)
Log.
static auto getFTensor0FromVec(V &data)
Get tensor rank 0 (scalar) form data vector.
constexpr IntegrationType I

Member Data Documentation

◆ dataAtPts

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

data at integration pts

Definition at line 1015 of file EshelbianOperators.hpp.


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