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 791 of file EshelbianCohesive.cpp.

Member Typedef Documentation

◆ OP

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

800 : OpBrokenBaseCohesive(broken_base_side_data, ents_ptr), tagHandle(tag),
801 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 856 of file EshelbianCohesive.cpp.

856 {
859 }
#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 803 of file EshelbianCohesive.cpp.

803 {
805
806 auto get_sense_index = [this]() { return (faceSense == 1) ? 0 : 1; };
807 auto &v = *tagDataPtr;
808
809 switch (tagGetType) {
810 case TagSET:
811 break;
812 case TagGET:
813 v.resize(1);
814 v.clear();
815 break;
816 }
817
818 auto get_data = [&](auto &v) {
820
821 auto &moab = getMoab();
822 auto fe_ent = getFEEntityHandle();
823
824 int size;
825 double *data;
826 rval = moab.tag_get_by_ptr(tagHandle, &fe_ent, 1, (const void **)&data,
827 &size);
828 if (
829
830 rval == MB_SUCCESS && size > 0 && size != v.size()
831
832 ) {
833 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
834 "Inconsistent size of tag data");
835 } else {
836 if (rval != MB_SUCCESS || tagGetType == TagSET) {
837 int tag_size[1];
838 tag_size[0] = v.size();
839 void const *tag_data[] = {&v[0]};
840 CHKERR moab.tag_set_by_ptr(tagHandle, &fe_ent, 1, tag_data, tag_size);
841 } else {
842 CHKERR moab.tag_get_by_ptr(tagHandle, &fe_ent, 1,
843 (const void **)&data, &size);
844 std::copy(data, data + size, v.begin());
845 }
846 }
847
849 };
850
851 CHKERR get_data(v);
852
854 }
@ 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 863 of file EshelbianCohesive.cpp.

◆ tagGetType

TagGetType EshelbianPlasticity::OpGetTag::tagGetType
private

Definition at line 864 of file EshelbianCohesive.cpp.

◆ tagHandle

Tag EshelbianPlasticity::OpGetTag::tagHandle
private

Definition at line 862 of file EshelbianCohesive.cpp.


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