v0.15.5
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 772 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

Definition at line 774 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 776 of file EshelbianCohesive.cpp.

781 : OpBrokenBaseCohesive(broken_base_side_data, ents_ptr), tagHandle(tag),
782 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 837 of file EshelbianCohesive.cpp.

837 {
840 }
#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 784 of file EshelbianCohesive.cpp.

784 {
786
787 auto get_sense_index = [this]() { return (faceSense == 1) ? 0 : 1; };
788 auto &v = *tagDataPtr;
789
790 switch (tagGetType) {
791 case TagSET:
792 break;
793 case TagGET:
794 v.resize(1);
795 v.clear();
796 break;
797 }
798
799 auto get_data = [&](auto &v) {
801
802 auto &moab = getMoab();
803 auto fe_ent = getFEEntityHandle();
804
805 int size;
806 double *data;
807 rval = moab.tag_get_by_ptr(tagHandle, &fe_ent, 1, (const void **)&data,
808 &size);
809 if (
810
811 rval == MB_SUCCESS && size > 0 && size != v.size()
812
813 ) {
814 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
815 "Inconsistent size of tag data");
816 } else {
817 if (rval != MB_SUCCESS || tagGetType == TagSET) {
818 int tag_size[1];
819 tag_size[0] = v.size();
820 void const *tag_data[] = {&v[0]};
821 CHKERR moab.tag_set_by_ptr(tagHandle, &fe_ent, 1, tag_data, tag_size);
822 } else {
823 CHKERR moab.tag_get_by_ptr(tagHandle, &fe_ent, 1,
824 (const void **)&data, &size);
825 std::copy(data, data + size, v.begin());
826 }
827 }
828
830 };
831
832 CHKERR get_data(v);
833
835 }
@ 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 844 of file EshelbianCohesive.cpp.

◆ tagGetType

TagGetType EshelbianPlasticity::OpGetTag::tagGetType
private

Definition at line 845 of file EshelbianCohesive.cpp.

◆ tagHandle

Tag EshelbianPlasticity::OpGetTag::tagHandle
private

Definition at line 843 of file EshelbianCohesive.cpp.


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