v0.16.3
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
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 = boost::function< MoFEMErrorCode(ForcesAndSourcesCore::UserDataOperator *op_ptr, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, MatrixDouble &m)>
 

Public Member Functions

 OpGetBrokenBaseSideData (const ForcesAndSourcesCore::UserDataOperator::OpType op_type, const std::string field_name, boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data)
 
 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)
 Constructor for base operator implementation.
 
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
 set by fe entity handle
 
boost::shared_ptr< Range > entsPtr
 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>
auto getNf ()
 Get local vector tensor for assembly.
 
template<int ROW_DIM, int COL_DIM = ROW_DIM>
FTensor::Tensor2< FTensor::PackPtr< double *, COL_DIM >, ROW_DIM, COL_DIM > getLocMat (const int rr)
 Get local matrix tensor for assembly.
 
virtual MoFEMErrorCode iNtegrate (EntData &, EntData &)
 Integrate grad-grad operator.
 
virtual MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool trans)
 Assemble local matrix into global matrix.
 
virtual MoFEMErrorCode iNtegrate (EntData &)
 Class dedicated to integrate operator.
 
virtual MoFEMErrorCode aSsemble (EntData &data)
 Assemble local vector into global vector.
 
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
mofem/atom_tests/test_broken_space.cpp.

Definition at line 88 of file FormsBrokenSpaceConstraintImpl.hpp.

Member Typedef Documentation

◆ OP

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

Definition at line 90 of file FormsBrokenSpaceConstraintImpl.hpp.

Constructor & Destructor Documentation

◆ OpGetBrokenBaseSideData() [1/2]

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

Definition at line 109 of file FormsBrokenSpaceConstraintImpl.hpp.

113 : OP(field_name, field_name, op_type),
114 brokenBaseSideData(broken_base_side_data) {}
constexpr auto field_name
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideData

◆ OpGetBrokenBaseSideData() [2/2]

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 117 of file FormsBrokenSpaceConstraintImpl.hpp.

120 : OpGetBrokenBaseSideData<OpBase>(
122 broken_base_side_data) {}
@ OPROW
operator doWork function is executed on FE rows

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 126 of file FormsBrokenSpaceConstraintImpl.hpp.

127 {
129 brokenBaseSideData->resize(OP::getLoopSize());
130
131 const auto n_in_the_loop = OP::getNinTheLoop();
132 const auto face_sense = OP::getSkeletonSense();
133
134#ifndef NDEBUG
135 if (face_sense != -1 && face_sense != 1)
136 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "face sense not set");
137#endif // NDEBUG
138
139 auto set_data = [&](auto &side_data) {
140 side_data.getSide() = row_side;
141 side_data.getType() = row_type;
142 side_data.getSense() = face_sense;
143 side_data.getData().sEnse = row_data.sEnse;
144 side_data.getData().sPace = row_data.sPace;
145 side_data.getData().bAse = row_data.bAse;
146 side_data.getData().iNdices = row_data.iNdices;
147 side_data.getData().localIndices = row_data.localIndices;
148 side_data.getData().dOfs = row_data.dOfs;
149 side_data.getData().fieldEntities = row_data.fieldEntities;
150 side_data.getData().fieldData = row_data.fieldData;
151 };
152
153 auto set_base = [&](auto &side_data) {
154 auto base = side_data.getData().getBase();
155 for (auto dd = 0; dd != BaseDerivatives::LastDerivative; ++dd) {
156 for (auto bb = 0; bb != LASTBASE; ++bb) {
157 side_data.getData().baseFunctionsAndBaseDerivatives[dd][bb].reset();
158 }
159 if (auto base_ptr = row_data.getNSharedPtr(
160 base, static_cast<BaseDerivatives>(dd))) {
161 side_data.getData().baseFunctionsAndBaseDerivatives[dd][base] =
162 boost::make_shared<MatrixDouble>(*base_ptr);
163 }
164 }
165 };
166
167 set_data((*brokenBaseSideData)[n_in_the_loop]);
168 set_base((*brokenBaseSideData)[n_in_the_loop]);
169
171}
@ LASTBASE
Definition definitions.h:69
#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
EntitiesFieldData::EntData::BaseDerivatives BaseDerivatives

Member Data Documentation

◆ brokenBaseSideData

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

Definition at line 105 of file FormsBrokenSpaceConstraintImpl.hpp.


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