v0.16.3
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< MatrixDouble > tangent1DiffPtr
 
boost::shared_ptr< MatrixDouble > tangent2DiffPtr
 
SmartPetscObj< Vec > assembleVec
 
Tag thGradTag
 

Detailed Description

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

Definition at line 668 of file FormsBrokenSpaceConstraintImpl.hpp.

Member Typedef Documentation

◆ OP

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

679 : OP(row_field, row_field, OP::OPROW, ents_ptr),
680 tangent1DiffPtr(tangent1_diff_ptr),
681 tangent2DiffPtr(tangent2_diff_ptr), assembleVec(assemble_vec),
682 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 684 of file FormsBrokenSpaceConstraintImpl.hpp.

684 {
686 if (!this->timeScalingFun.empty())
687 this->locF *= this->timeScalingFun(this->getFEMethod()->ts_t);
688 if (!this->feScalingFun.empty())
689 this->locF *= this->feScalingFun(this->getFEMethod());
690 if (assembleVec) {
691 auto *vec_ptr = this->locF.data().data();
692 const auto nb_dofs = row_data.getIndices().size();
693 auto *ind_ptr = row_data.getIndices().data().data();
694 return VecSetValues(assembleVec, nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
695 }
696 if (thGradTag) {
697 const auto field_ents = row_data.getFieldEntities();
698 std::vector<EntityHandle> ents(field_ents.size());
699 std::transform(field_ents.begin(), field_ents.end(), ents.begin(),
700 [](const auto *fe) { return fe->getEnt(); });
701 if (field_ents.empty())
703 if (type_from_handle(ents[0]) != MBVERTEX)
705 auto &moab = this->getMoab();
706 VectorDouble topo_values(this->locF.size());
707 CHKERR moab.tag_get_data(thGradTag, ents.data(), ents.size(),
708 topo_values.data().data());
709 topo_values += this->locF;
710 CHKERR moab.tag_set_data(thGradTag, ents.data(), ents.size(),
711 topo_values.data().data());
712 }
714 }
#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 718 of file FormsBrokenSpaceConstraintImpl.hpp.

◆ tangent1DiffPtr

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

Definition at line 716 of file FormsBrokenSpaceConstraintImpl.hpp.

◆ tangent2DiffPtr

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

Definition at line 717 of file FormsBrokenSpaceConstraintImpl.hpp.

◆ thGradTag

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

Definition at line 719 of file FormsBrokenSpaceConstraintImpl.hpp.


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