v0.16.0
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 651 of file FormsBrokenSpaceConstraintImpl.hpp.

Member Typedef Documentation

◆ OP

Definition at line 652 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 656 of file FormsBrokenSpaceConstraintImpl.hpp.

662 : OP(row_field, row_field, OP::OPROW, ents_ptr),
663 tangent1DiffPtr(tangent1_diff_ptr),
664 tangent2DiffPtr(tangent2_diff_ptr), assembleVec(assemble_vec),
665 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 667 of file FormsBrokenSpaceConstraintImpl.hpp.

667 {
669 if (!this->timeScalingFun.empty())
670 this->locF *= this->timeScalingFun(this->getFEMethod()->ts_t);
671 if (!this->feScalingFun.empty())
672 this->locF *= this->feScalingFun(this->getFEMethod());
673 if (assembleVec) {
674 auto *vec_ptr = this->locF.data().data();
675 const auto nb_dofs = row_data.getIndices().size();
676 auto *ind_ptr = row_data.getIndices().data().data();
677 return VecSetValues(assembleVec, nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
678 }
679 if (thGradTag) {
680 const auto field_ents = row_data.getFieldEntities();
681 std::vector<EntityHandle> ents(field_ents.size());
682 std::transform(field_ents.begin(), field_ents.end(), ents.begin(),
683 [](const auto *fe) { return fe->getEnt(); });
684 if (field_ents.empty())
686 if (type_from_handle(ents[0]) != MBVERTEX)
688 auto &moab = this->getMoab();
689 VectorDouble topo_values(this->locF.size());
690 CHKERR moab.tag_get_data(thGradTag, ents.data(), ents.size(),
691 topo_values.data().data());
692 topo_values += this->locF;
693 CHKERR moab.tag_set_data(thGradTag, ents.data(), ents.size(),
694 topo_values.data().data());
695 }
697 }
#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 701 of file FormsBrokenSpaceConstraintImpl.hpp.

◆ tangent1DiffPtr

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

Definition at line 699 of file FormsBrokenSpaceConstraintImpl.hpp.

◆ tangent2DiffPtr

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

Definition at line 700 of file FormsBrokenSpaceConstraintImpl.hpp.

◆ thGradTag

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

Definition at line 702 of file FormsBrokenSpaceConstraintImpl.hpp.


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