v0.15.5
Loading...
Searching...
No Matches
Public Types | Protected Member Functions | Protected Attributes | List of all members
MoFEM::OpBrokenTopoBase< OpBrokenBase > Struct Template Reference

#include "src/finite_elements/FormsBrokenSpaceConstraintImpl.hpp"

Inheritance diagram for MoFEM::OpBrokenTopoBase< OpBrokenBase >:
[legend]
Collaboration diagram for MoFEM::OpBrokenTopoBase< OpBrokenBase >:
[legend]

Public Types

using OP = OpBrokenBase
 

Protected Member Functions

 OpBrokenTopoBase (const std::string row_field, boost::shared_ptr< MatrixDouble > tangent1_diff_ptr, boost::shared_ptr< MatrixDouble > tangent2_diff_ptr, SmartPetscObj< Vec > assemble_vec, Tag th, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode aSsemble (EntitiesFieldData::EntData &row_data)
 

Protected Attributes

boost::shared_ptr< MatrixDoubletangent1DiffPtr
 
boost::shared_ptr< MatrixDoubletangent2DiffPtr
 
SmartPetscObj< Vec > assembleVec
 
Tag thGradTag
 

Detailed Description

template<typename OpBrokenBase>
struct MoFEM::OpBrokenTopoBase< OpBrokenBase >

Definition at line 632 of file FormsBrokenSpaceConstraintImpl.hpp.

Member Typedef Documentation

◆ OP

Definition at line 633 of file FormsBrokenSpaceConstraintImpl.hpp.

Constructor & Destructor Documentation

◆ OpBrokenTopoBase()

template<typename OpBrokenBase >
MoFEM::OpBrokenTopoBase< OpBrokenBase >::OpBrokenTopoBase ( const std::string  row_field,
boost::shared_ptr< MatrixDouble tangent1_diff_ptr,
boost::shared_ptr< MatrixDouble tangent2_diff_ptr,
SmartPetscObj< Vec >  assemble_vec,
Tag  th,
boost::shared_ptr< Range ents_ptr = nullptr 
)
inlineprotected

Definition at line 637 of file FormsBrokenSpaceConstraintImpl.hpp.

643 : OP(row_field, row_field, OP::OPROW, ents_ptr),
644 tangent1DiffPtr(tangent1_diff_ptr),
645 tangent2DiffPtr(tangent2_diff_ptr), assembleVec(assemble_vec),
646 thGradTag(th) {}
boost::shared_ptr< MatrixDouble > tangent2DiffPtr
boost::shared_ptr< MatrixDouble > tangent1DiffPtr

Member Function Documentation

◆ aSsemble()

template<typename OpBrokenBase >
MoFEMErrorCode MoFEM::OpBrokenTopoBase< OpBrokenBase >::aSsemble ( EntitiesFieldData::EntData row_data)
inlineprotected

Definition at line 648 of file FormsBrokenSpaceConstraintImpl.hpp.

648 {
650 if (!this->timeScalingFun.empty())
651 this->locF *= this->timeScalingFun(this->getFEMethod()->ts_t);
652 if (!this->feScalingFun.empty())
653 this->locF *= this->feScalingFun(this->getFEMethod());
654 if (assembleVec) {
655 auto *vec_ptr = this->locF.data().data();
656 const auto nb_dofs = row_data.getIndices().size();
657 auto *ind_ptr = row_data.getIndices().data().data();
658 return VecSetValues(assembleVec, nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
659 }
660 if (thGradTag) {
661 const auto field_ents = row_data.getFieldEntities();
662 std::vector<EntityHandle> ents(field_ents.size());
663 std::transform(field_ents.begin(), field_ents.end(), ents.begin(),
664 [](const auto *fe) { return fe->getEnt(); });
665 if (field_ents.empty())
667 if (type_from_handle(ents[0]) != MBVERTEX)
669 auto &moab = this->getMoab();
670 VectorDouble topo_values(this->locF.size());
671 CHKERR moab.tag_get_data(thGradTag, ents.data(), ents.size(),
672 topo_values.data().data());
673 topo_values += this->locF;
674 CHKERR moab.tag_set_data(thGradTag, ents.data(), ents.size(),
675 topo_values.data().data());
676 }
678 }
#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.

Member Data Documentation

◆ assembleVec

template<typename OpBrokenBase >
SmartPetscObj<Vec> MoFEM::OpBrokenTopoBase< OpBrokenBase >::assembleVec
protected

Definition at line 682 of file FormsBrokenSpaceConstraintImpl.hpp.

◆ tangent1DiffPtr

template<typename OpBrokenBase >
boost::shared_ptr<MatrixDouble> MoFEM::OpBrokenTopoBase< OpBrokenBase >::tangent1DiffPtr
protected

Definition at line 680 of file FormsBrokenSpaceConstraintImpl.hpp.

◆ tangent2DiffPtr

template<typename OpBrokenBase >
boost::shared_ptr<MatrixDouble> MoFEM::OpBrokenTopoBase< OpBrokenBase >::tangent2DiffPtr
protected

Definition at line 681 of file FormsBrokenSpaceConstraintImpl.hpp.

◆ thGradTag

template<typename OpBrokenBase >
Tag MoFEM::OpBrokenTopoBase< OpBrokenBase >::thGradTag
protected

Definition at line 683 of file FormsBrokenSpaceConstraintImpl.hpp.


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