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 97 of file EshelbianTopologicalDerivativeOperators.cpp.

Member Typedef Documentation

◆ OP

Definition at line 100 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 114 of file EshelbianTopologicalDerivativeOperators.cpp.

114 {
116 if (assembleVec) {
117 double *vec_ptr = OP::locF.data().data();
118 const int nb_dofs = data.getIndices().size();
119 int *ind_ptr = data.getIndices().data().data();
120 CHKERR VecSetValues(assembleVec, nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
121 }
122 if (topoTag) {
123 const auto field_ents = data.getFieldEntities();
124 std::vector<EntityHandle> ents(field_ents.size());
125 std::transform(field_ents.begin(), field_ents.end(), ents.begin(),
126 [](const auto *fe) { return fe->getEnt(); });
127 if (field_ents.empty())
129 if (type_from_handle(ents[0]) != MBVERTEX)
131 auto &moab = getMoab();
132 VectorDouble topo_values(OP::locF.size());
133 CHKERR moab.tag_set_data(topoTag, ents.data(), ents.size(),
134 topo_values.data().data());
135 topo_values += OP::locF;
136 CHKERR moab.tag_set_data(topoTag, ents.data(), ents.size(),
137 OP::locF.data().data());
138 }
140 }
#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 144 of file EshelbianTopologicalDerivativeOperators.cpp.

◆ JPtr

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

Definition at line 143 of file EshelbianTopologicalDerivativeOperators.cpp.

◆ topoData

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

Definition at line 146 of file EshelbianTopologicalDerivativeOperators.cpp.

◆ topoTag

Tag EshelbianPlasticity::OpAssembleBrokenFaceTopologicalDerivativeImplBase::topoTag
protected

Definition at line 145 of file EshelbianTopologicalDerivativeOperators.cpp.


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