v0.15.0
Loading...
Searching...
No Matches
MoFEM::OpGetBrokenBaseSideData< OpBase > Struct Template Reference

#include "src/finite_elements/FormsBrokenSpaceConstraintImpl.hpp"

Inheritance diagram for MoFEM::OpGetBrokenBaseSideData< OpBase >:
[legend]
Collaboration diagram for MoFEM::OpGetBrokenBaseSideData< OpBase >:
[legend]

Public Types

using OP = OpBase
 
- Public Types inherited from MoFEM::OpBaseImpl< A, EleOp >
using OpType = typename EleOp::OpType
 
using EntData = EntitiesFieldData::EntData
 
using MatSetValuesHook
 

Public Member Functions

 OpGetBrokenBaseSideData (const std::string field_name, boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data)
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntitiesFieldData::EntData &row_data)
 
- Public Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
 OpBaseImpl (const std::string row_field_name, const std::string col_field_name, const OpType type, boost::shared_ptr< Range > ents_ptr=nullptr)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 Do calculations for the left hand side.
 
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntData &row_data)
 Do calculations for the right hand side.
 

Private Attributes

boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideData
 

Additional Inherited Members

- Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
TimeFun timeScalingFun
 assumes that time variable is set
 
FEFun feScalingFun
 assumes that time variable is set
 
boost::shared_ptr< RangeentsPtr
 Entities on which element is run.
 
- Static Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
static MatSetValuesHook matSetValuesHook
 
- Protected Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
template<int DIM>
FTensor::Tensor1< FTensor::PackPtr< double *, DIM >, DIM > getNf ()
 
template<int DIM>
FTensor::Tensor2< FTensor::PackPtr< double *, DIM >, DIM, DIM > getLocMat (const int rr)
 
virtual MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 Integrate grad-grad operator.
 
virtual MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool trans)
 
virtual MoFEMErrorCode iNtegrate (EntData &data)
 Class dedicated to integrate operator.
 
virtual MoFEMErrorCode aSsemble (EntData &data)
 
virtual size_t getNbOfBaseFunctions (EntitiesFieldData::EntData &data)
 Get number of base functions.
 
- Protected Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
int nbRows
 number of dofs on rows
 
int nbCols
 number if dof on column
 
int nbIntegrationPts
 number of integration points
 
int nbRowBaseFunctions
 number or row base functions
 
int rowSide
 row side number
 
int colSide
 column side number
 
EntityType rowType
 row type
 
EntityType colType
 column type
 
bool assembleTranspose
 
bool onlyTranspose
 
MatrixDouble locMat
 local entity block matrix
 
MatrixDouble locMatTranspose
 local entity block matrix
 
VectorDouble locF
 local entity vector
 

Detailed Description

template<typename OpBase>
struct MoFEM::OpGetBrokenBaseSideData< OpBase >
Examples
EshelbianPlasticity.cpp, and test_broken_space.cpp.

Definition at line 86 of file FormsBrokenSpaceConstraintImpl.hpp.

Member Typedef Documentation

◆ OP

template<typename OpBase >
using MoFEM::OpGetBrokenBaseSideData< OpBase >::OP = OpBase

Definition at line 88 of file FormsBrokenSpaceConstraintImpl.hpp.

Constructor & Destructor Documentation

◆ OpGetBrokenBaseSideData()

template<typename OpBase >
MoFEM::OpGetBrokenBaseSideData< OpBase >::OpGetBrokenBaseSideData ( const std::string field_name,
boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data )

Definition at line 102 of file FormsBrokenSpaceConstraintImpl.hpp.

105 : OP(field_name, field_name, OP::OPROW),
106 brokenBaseSideData(broken_base_side_data) {}
constexpr auto field_name
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideData

Member Function Documentation

◆ doWork()

template<typename OpBase >
MoFEMErrorCode MoFEM::OpGetBrokenBaseSideData< OpBase >::doWork ( int row_side,
EntityType row_type,
EntitiesFieldData::EntData & row_data )

Definition at line 110 of file FormsBrokenSpaceConstraintImpl.hpp.

111 {
113
114 if (row_data.getIndices().size() == 0)
116
117 brokenBaseSideData->resize(OP::getLoopSize());
118
119 const auto n_in_the_loop = OP::getNinTheLoop();
120 const auto face_sense = OP::getSkeletonSense();
121
122#ifndef NDEBUG
123 if (face_sense != -1 && face_sense != 1)
124 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "face sense not set");
125#endif // NDEBUG
126
127 auto set_data = [&](auto &side_data) {
128 side_data.getSide() = row_side;
129 side_data.getType() = row_type;
130 side_data.getSense() = face_sense;
131 side_data.getData().sEnse = row_data.sEnse;
132 side_data.getData().sPace = row_data.sPace;
133 side_data.getData().bAse = row_data.bAse;
134 side_data.getData().iNdices = row_data.iNdices;
135 side_data.getData().localIndices = row_data.localIndices;
136 side_data.getData().dOfs = row_data.dOfs;
137 side_data.getData().fieldEntities = row_data.fieldEntities;
138 side_data.getData().fieldData = row_data.fieldData;
139 };
140
141 auto set_base = [&](auto &side_data) {
142 auto base = side_data.getData().getBase();
143 for (auto dd = 0; dd != BaseDerivatives::LastDerivative; ++dd) {
144 side_data.getData().baseFunctionsAndBaseDerivatives[dd][base].reset();
145 if (auto base_ptr = row_data.baseFunctionsAndBaseDerivatives[dd][base]) {
146 side_data.getData().baseFunctionsAndBaseDerivatives[dd][base] =
147 boost::make_shared<MatrixDouble>(*base_ptr);
148 }
149 }
150 };
151
152 set_data((*brokenBaseSideData)[n_in_the_loop]);
153 set_base((*brokenBaseSideData)[n_in_the_loop]);
154
156}
#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 ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition ddTensor0.hpp:33

Member Data Documentation

◆ brokenBaseSideData

template<typename OpBase >
boost::shared_ptr<std::vector<BrokenBaseSideData> > MoFEM::OpGetBrokenBaseSideData< OpBase >::brokenBaseSideData
private

Definition at line 98 of file FormsBrokenSpaceConstraintImpl.hpp.


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