v0.16.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
EshelbianPlasticity::OpGetTag Struct Reference
Inheritance diagram for EshelbianPlasticity::OpGetTag:
[legend]
Collaboration diagram for EshelbianPlasticity::OpGetTag:
[legend]

Public Types

using OP = OpBrokenBaseCohesive
 
- Public Types inherited from EshelbianPlasticity::OpBrokenBaseCohesive
using OP = FormsIntegrators< FaceElementForcesAndSourcesCore::UserDataOperator >::Assembly< A >::OpBrokenBase
 

Public Member Functions

 OpGetTag (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, Tag tag, TagGetType tag_get_type, boost::shared_ptr< VectorDouble > tag_data_ptr, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode iNtegrate (EntData &data)
 
MoFEMErrorCode aSsemble (EntData &data)
 
- Public Member Functions inherited from EshelbianPlasticity::OpBrokenBaseCohesive
 OpBrokenBaseCohesive (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_flux_data_ptr, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
 

Private Attributes

Tag tagHandle
 
boost::shared_ptr< VectorDouble > tagDataPtr
 
TagGetType tagGetType
 

Additional Inherited Members

- Protected Attributes inherited from EshelbianPlasticity::OpBrokenBaseCohesive
boost::shared_ptr< MatrixDouble > fluxMatPtr
 
int faceSense = 0
 

Detailed Description

Definition at line 823 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

Definition at line 825 of file EshelbianCohesive.cpp.

Constructor & Destructor Documentation

◆ OpGetTag()

EshelbianPlasticity::OpGetTag::OpGetTag ( boost::shared_ptr< std::vector< BrokenBaseSideData > >  broken_base_side_data,
Tag  tag,
TagGetType  tag_get_type,
boost::shared_ptr< VectorDouble >  tag_data_ptr,
boost::shared_ptr< Range ents_ptr = nullptr 
)
inline

Definition at line 827 of file EshelbianCohesive.cpp.

832 : OpBrokenBaseCohesive(broken_base_side_data, ents_ptr), tagHandle(tag),
833 tagGetType(tag_get_type), tagDataPtr(tag_data_ptr) {}
OpBrokenBaseCohesive(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_flux_data_ptr, boost::shared_ptr< Range > ents_ptr=nullptr)
boost::shared_ptr< VectorDouble > tagDataPtr

Member Function Documentation

◆ aSsemble()

MoFEMErrorCode EshelbianPlasticity::OpGetTag::aSsemble ( EntData data)
inline

Definition at line 888 of file EshelbianCohesive.cpp.

888 {
891 }
#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()

◆ iNtegrate()

MoFEMErrorCode EshelbianPlasticity::OpGetTag::iNtegrate ( EntData data)
inline

Definition at line 835 of file EshelbianCohesive.cpp.

835 {
837
838 auto get_sense_index = [this]() { return (faceSense == 1) ? 0 : 1; };
839 auto &v = *tagDataPtr;
840
841 switch (tagGetType) {
842 case TagSET:
843 break;
844 case TagGET:
845 v.resize(1);
846 v.clear();
847 break;
848 }
849
850 auto get_data = [&](auto &v) {
852
853 auto &moab = getMoab();
854 auto fe_ent = getFEEntityHandle();
855
856 int size;
857 double *data;
858 rval = moab.tag_get_by_ptr(tagHandle, &fe_ent, 1, (const void **)&data,
859 &size);
860 if (
861
862 rval == MB_SUCCESS && size > 0 && size != v.size()
863
864 ) {
865 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
866 "Inconsistent size of tag data");
867 } else {
868 if (rval != MB_SUCCESS || tagGetType == TagSET) {
869 int tag_size[1];
870 tag_size[0] = v.size();
871 void const *tag_data[] = {&v[0]};
872 CHKERR moab.tag_set_by_ptr(tagHandle, &fe_ent, 1, tag_data, tag_size);
873 } else {
874 CHKERR moab.tag_get_by_ptr(tagHandle, &fe_ent, 1,
875 (const void **)&data, &size);
876 std::copy(data, data + size, v.begin());
877 }
878 }
879
881 };
882
883 CHKERR get_data(v);
884
886 }
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
#define CHKERR
Inline error check.
const double v
phase velocity of light in medium (cm/ns)
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval

Member Data Documentation

◆ tagDataPtr

boost::shared_ptr<VectorDouble> EshelbianPlasticity::OpGetTag::tagDataPtr
private

Definition at line 895 of file EshelbianCohesive.cpp.

◆ tagGetType

TagGetType EshelbianPlasticity::OpGetTag::tagGetType
private

Definition at line 896 of file EshelbianCohesive.cpp.

◆ tagHandle

Tag EshelbianPlasticity::OpGetTag::tagHandle
private

Definition at line 894 of file EshelbianCohesive.cpp.


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