v0.14.0
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 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)
 

Private Attributes

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

Detailed Description

template<typename OpBase>
struct MoFEM::OpGetBrokenBaseSideData< OpBase >

Examples
EshelbianPlasticity.cpp, and test_broken_space.cpp.

Definition at line 68 of file FormsBrokenSpaceConstraintImpl.hpp.

Member Typedef Documentation

◆ OP

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

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

87  : OP(field_name, field_name, OP::OPROW),
88  brokenBaseSideData(broken_base_side_data) {}

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

93  {
95 
96  if (row_data.getIndices().size() == 0)
98 
99  brokenBaseSideData->resize(OP::getLoopSize());
100 
101  const auto n_in_the_loop = OP::getNinTheLoop();
102  const auto face_sense = OP::getSkeletonSense();
103 
104 #ifndef NDEBUG
105  if (face_sense != -1 && face_sense != 1)
106  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "face sense not set");
107 #endif // NDEBUG
108 
109  auto set_data = [&](auto &side_data) {
110  side_data.getSide() = row_side;
111  side_data.getType() = row_type;
112  side_data.getSense() = face_sense;
113  side_data.getData().sEnse = row_data.sEnse;
114  side_data.getData().sPace = row_data.sPace;
115  side_data.getData().bAse = row_data.bAse;
116  side_data.getData().iNdices = row_data.iNdices;
117  side_data.getData().localIndices = row_data.localIndices;
118  side_data.getData().dOfs = row_data.dOfs;
119  side_data.getData().fieldEntities = row_data.fieldEntities;
120  side_data.getData().fieldData = row_data.fieldData;
121  };
122 
123  auto set_base = [&](auto &side_data) {
124  auto base = side_data.getData().getBase();
125  for (auto dd = 0; dd != BaseDerivatives::LastDerivative; ++dd) {
126  if (auto base_ptr = row_data.baseFunctionsAndBaseDerivatives[dd][base]) {
127  side_data.getData().baseFunctionsAndBaseDerivatives[dd][base] =
128  boost::make_shared<MatrixDouble>(*base_ptr);
129  }
130  }
131  };
132 
133  set_data((*brokenBaseSideData)[n_in_the_loop]);
134  set_base((*brokenBaseSideData)[n_in_the_loop]);
135 
137 }

Member Data Documentation

◆ brokenBaseSideData

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

Definition at line 80 of file FormsBrokenSpaceConstraintImpl.hpp.


The documentation for this struct was generated from the following file:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
MoFEM::OpGetBrokenBaseSideData::OP
OpBase OP
Definition: FormsBrokenSpaceConstraintImpl.hpp:70
MoFEM::OpGetBrokenBaseSideData::brokenBaseSideData
boost::shared_ptr< std::vector< BrokenBaseSideData > > brokenBaseSideData
Definition: FormsBrokenSpaceConstraintImpl.hpp:80
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::dd
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
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359