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

Public Types

using OP = typename FormsIntegrators< FaceUserDataOperator >::Assembly< A >::OpBrokenBase
 

Public Member Functions

 OpAssembleBrokenFaceTopologicalDerivativeImplBase (boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< TopologicalData > topo_ptr, boost::shared_ptr< double > J_ptr, SmartPetscObj< Vec > assemble_vec, Tag topo_tag, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode aSsemble (EntData &data) override
 

Protected Attributes

boost::shared_ptr< doubleJPtr
 
SmartPetscObj< Vec > assembleVec
 
Tag topoTag
 
boost::shared_ptr< TopologicalDatatopoData
 

Detailed Description

Definition at line 84 of file EshelbianTopologicalDerivativeOperators.cpp.

Member Typedef Documentation

◆ OP

Definition at line 87 of file EshelbianTopologicalDerivativeOperators.cpp.

Constructor & Destructor Documentation

◆ OpAssembleBrokenFaceTopologicalDerivativeImplBase()

EshelbianPlasticity::OpAssembleBrokenFaceTopologicalDerivativeImplBase::OpAssembleBrokenFaceTopologicalDerivativeImplBase ( boost::shared_ptr< std::vector< BrokenBaseSideData > >  broken_base_side_data,
boost::shared_ptr< TopologicalData topo_ptr,
boost::shared_ptr< double J_ptr,
SmartPetscObj< Vec >  assemble_vec,
Tag  topo_tag,
boost::shared_ptr< Range ents_ptr = nullptr 
)
inline

Member Function Documentation

◆ aSsemble()

MoFEMErrorCode EshelbianPlasticity::OpAssembleBrokenFaceTopologicalDerivativeImplBase::aSsemble ( EntData data)
inlineoverride

Definition at line 101 of file EshelbianTopologicalDerivativeOperators.cpp.

101 {
103 if (assembleVec) {
104 double *vec_ptr = OP::locF.data().data();
105 const int nb_dofs = data.getIndices().size();
106 int *ind_ptr = data.getIndices().data().data();
107 CHKERR VecSetValues(assembleVec, nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
108 }
109 if (topoTag) {
110 const auto field_ents = data.getFieldEntities();
111 std::vector<EntityHandle> ents(field_ents.size());
112 std::transform(field_ents.begin(), field_ents.end(), ents.begin(),
113 [](const auto *fe) { return fe->getEnt(); });
114 if (field_ents.empty())
116 if (type_from_handle(ents[0]) != MBVERTEX)
118 auto &moab = getMoab();
119 VectorDouble topo_values(OP::locF.size());
120 CHKERR moab.tag_set_data(topoTag, ents.data(), ents.size(),
121 topo_values.data().data());
122 topo_values += OP::locF;
123 CHKERR moab.tag_set_data(topoTag, ents.data(), ents.size(),
124 OP::locF.data().data());
125 }
127 }
#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()
#define CHKERR
Inline error check.
UBlasVector< double > VectorDouble
Definition Types.hpp:68
auto type_from_handle(const EntityHandle h)
get type from entity handle
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
const VectorFieldEntities & getFieldEntities() const
Get field entities (const version)
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.

Member Data Documentation

◆ assembleVec

SmartPetscObj<Vec> EshelbianPlasticity::OpAssembleBrokenFaceTopologicalDerivativeImplBase::assembleVec
protected

Definition at line 131 of file EshelbianTopologicalDerivativeOperators.cpp.

◆ JPtr

boost::shared_ptr<double> EshelbianPlasticity::OpAssembleBrokenFaceTopologicalDerivativeImplBase::JPtr
protected

Definition at line 130 of file EshelbianTopologicalDerivativeOperators.cpp.

◆ topoData

boost::shared_ptr<TopologicalData> EshelbianPlasticity::OpAssembleBrokenFaceTopologicalDerivativeImplBase::topoData
protected

Definition at line 133 of file EshelbianTopologicalDerivativeOperators.cpp.

◆ topoTag

Tag EshelbianPlasticity::OpAssembleBrokenFaceTopologicalDerivativeImplBase::topoTag
protected

Definition at line 132 of file EshelbianTopologicalDerivativeOperators.cpp.


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