v0.14.0
Public Member Functions | Public Attributes | List of all members
FractureMechanics::GriffithForceElement::AuxOp Struct Reference

#include <users_modules/fracture_mechanics/src/GriffithForceElement.hpp>

Inheritance diagram for FractureMechanics::GriffithForceElement::AuxOp:
[legend]
Collaboration diagram for FractureMechanics::GriffithForceElement::AuxOp:
[legend]

Public Member Functions

 AuxOp (int tag, BlockData &block_data, CommonData &common_data)
 
MoFEMErrorCode setIndices (DataForcesAndSourcesCore::EntData &data)
 
MoFEMErrorCode setVariables (FaceElementForcesAndSourcesCore::UserDataOperator *fe_ptr, DataForcesAndSourcesCore::EntData &data)
 
MoFEMErrorCode setLambdaNodes (FaceElementForcesAndSourcesCore::UserDataOperator *fe_ptr, const std::string &lambda_field_name)
 
MoFEMErrorCode setLambdaIndices (FaceElementForcesAndSourcesCore::UserDataOperator *fe_ptr, const std::string &lambda_field_name)
 

Public Attributes

int tAg
 
BlockDatablockData
 
CommonDatacommonData
 
ublas::vector< int > rowIndices
 
ublas::vector< int > rowIndicesLocal
 
VectorInt3 rowLambdaIndices
 
VectorInt3 rowLambdaIndicesLocal
 
VectorDouble3 lambdaAtNodes
 
VectorDouble activeVariables
 

Detailed Description

Definition at line 215 of file GriffithForceElement.hpp.

Constructor & Destructor Documentation

◆ AuxOp()

FractureMechanics::GriffithForceElement::AuxOp::AuxOp ( int  tag,
BlockData block_data,
CommonData common_data 
)
inline

Definition at line 221 of file GriffithForceElement.hpp.

222  : tAg(tag), blockData(block_data), commonData(common_data){};

Member Function Documentation

◆ setIndices()

MoFEMErrorCode FractureMechanics::GriffithForceElement::AuxOp::setIndices ( DataForcesAndSourcesCore::EntData data)
inline

Definition at line 232 of file GriffithForceElement.hpp.

232  {
234  const auto nb_dofs = data.getIndices().size();
235  rowIndices.resize(nb_dofs, false);
236  noalias(rowIndices) = data.getIndices();
237  rowIndicesLocal.resize(nb_dofs, false);
238  noalias(rowIndicesLocal) = data.getLocalIndices();
239  auto dit = data.getFieldDofs().begin();
240  auto hi_dit = data.getFieldDofs().end();
241  for (int ii = 0; dit != hi_dit; ++dit, ++ii) {
242  if (auto dof = (*dit)) {
243  if (blockData.frontNodes.find(dof->getEnt()) ==
244  blockData.frontNodes.end()) {
245 
246  const auto side = dof->getSideNumber();
247  const auto idx = dof->getEntDofIdx();
248  const auto rank = dof->getNbDofsOnEnt();
249  if (ii != side * rank + idx)
250  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong index");
251 
252  rowIndices[ii] = -1;
253  rowIndicesLocal[ii] = -1;
254  }
255  }
256  }
258  }

◆ setLambdaIndices()

MoFEMErrorCode FractureMechanics::GriffithForceElement::AuxOp::setLambdaIndices ( FaceElementForcesAndSourcesCore::UserDataOperator fe_ptr,
const std::string &  lambda_field_name 
)
inline

Definition at line 301 of file GriffithForceElement.hpp.

302  {
304  rowLambdaIndices.resize(3, false);
305  rowLambdaIndicesLocal.resize(3, false);
306  std::fill(rowLambdaIndices.begin(), rowLambdaIndices.end(), -1);
307  std::fill(rowLambdaIndicesLocal.begin(), rowLambdaIndicesLocal.end(), -1);
308  const auto bit_field_number =
309  fe_ptr->getFEMethod()->getFieldBitNumber(lambda_field_name);
310 
311  auto data_dofs = fe_ptr->getFEMethod()->getRowDofsPtr();
312  for (auto dit = data_dofs->get<Unique_mi_tag>().lower_bound(
313  FieldEntity::getLoBitNumberUId(bit_field_number));
314  dit != data_dofs->get<Unique_mi_tag>().upper_bound(
315  FieldEntity::getHiBitNumberUId(bit_field_number));
316  ++dit) {
317 
318  if (dit->get()->getEntType() != MBVERTEX)
319  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
320  "DOFs only on vertices");
321 
322  int side = dit->get()->getSideNumber();
323  rowLambdaIndices[side] = dit->get()->getPetscGlobalDofIdx();
324  rowLambdaIndicesLocal[side] = dit->get()->getPetscLocalDofIdx();
325  }
327  }

◆ setLambdaNodes()

MoFEMErrorCode FractureMechanics::GriffithForceElement::AuxOp::setLambdaNodes ( FaceElementForcesAndSourcesCore::UserDataOperator fe_ptr,
const std::string &  lambda_field_name 
)
inline

Definition at line 276 of file GriffithForceElement.hpp.

277  {
279  lambdaAtNodes.resize(3, false);
280  lambdaAtNodes.clear();
281  const auto bit_field_number =
282  fe_ptr->getFEMethod()->getFieldBitNumber(lambda_field_name);
283 
284  auto data_dofs = fe_ptr->getFEMethod()->getDataDofsPtr();
285  for (auto dit = data_dofs->get<Unique_mi_tag>().lower_bound(
286  FieldEntity::getLoBitNumberUId(bit_field_number));
287  dit != data_dofs->get<Unique_mi_tag>().upper_bound(
288  FieldEntity::getHiBitNumberUId(bit_field_number));
289  ++dit) {
290  if (dit->get()->getEntType() != MBVERTEX) {
291  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
292  "DOFs only on vertices");
293  }
294  int side = dit->get()->getSideNumber();
295  lambdaAtNodes[side] = dit->get()->getFieldData();
296  }
298  }

◆ setVariables()

MoFEMErrorCode FractureMechanics::GriffithForceElement::AuxOp::setVariables ( FaceElementForcesAndSourcesCore::UserDataOperator fe_ptr,
DataForcesAndSourcesCore::EntData data 
)
inline

Definition at line 261 of file GriffithForceElement.hpp.

262  {
264  int nb_dofs = data.getIndices().size();
265  activeVariables.resize(18, false);
266  for (int dd = 0; dd != nb_dofs; dd++) {
267  activeVariables[dd] = fe_ptr->getCoords()[dd];
268  }
269  for (int dd = 0; dd != nb_dofs; dd++) {
270  activeVariables[9 + dd] = data.getFieldData()[dd];
271  }
273  }

Member Data Documentation

◆ activeVariables

VectorDouble FractureMechanics::GriffithForceElement::AuxOp::activeVariables

Definition at line 230 of file GriffithForceElement.hpp.

◆ blockData

BlockData& FractureMechanics::GriffithForceElement::AuxOp::blockData

Definition at line 218 of file GriffithForceElement.hpp.

◆ commonData

CommonData& FractureMechanics::GriffithForceElement::AuxOp::commonData

Definition at line 219 of file GriffithForceElement.hpp.

◆ lambdaAtNodes

VectorDouble3 FractureMechanics::GriffithForceElement::AuxOp::lambdaAtNodes

Definition at line 229 of file GriffithForceElement.hpp.

◆ rowIndices

ublas::vector<int> FractureMechanics::GriffithForceElement::AuxOp::rowIndices

Definition at line 222 of file GriffithForceElement.hpp.

◆ rowIndicesLocal

ublas::vector<int> FractureMechanics::GriffithForceElement::AuxOp::rowIndicesLocal

Definition at line 225 of file GriffithForceElement.hpp.

◆ rowLambdaIndices

VectorInt3 FractureMechanics::GriffithForceElement::AuxOp::rowLambdaIndices

Definition at line 227 of file GriffithForceElement.hpp.

◆ rowLambdaIndicesLocal

VectorInt3 FractureMechanics::GriffithForceElement::AuxOp::rowLambdaIndicesLocal

Definition at line 228 of file GriffithForceElement.hpp.

◆ tAg

int FractureMechanics::GriffithForceElement::AuxOp::tAg

Definition at line 217 of file GriffithForceElement.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
FractureMechanics::GriffithForceElement::AuxOp::activeVariables
VectorDouble activeVariables
Definition: GriffithForceElement.hpp:230
FractureMechanics::GriffithForceElement::AuxOp::rowLambdaIndicesLocal
VectorInt3 rowLambdaIndicesLocal
Definition: GriffithForceElement.hpp:228
FractureMechanics::GriffithForceElement::AuxOp::tAg
int tAg
Definition: GriffithForceElement.hpp:217
FractureMechanics::GriffithForceElement::BlockData::frontNodes
Range frontNodes
Nodes on crack front.
Definition: GriffithForceElement.hpp:78
FractureMechanics::GriffithForceElement::AuxOp::rowLambdaIndices
VectorInt3 rowLambdaIndices
Definition: GriffithForceElement.hpp:227
FractureMechanics::GriffithForceElement::AuxOp::blockData
BlockData & blockData
Definition: GriffithForceElement.hpp:218
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
FractureMechanics::GriffithForceElement::AuxOp::lambdaAtNodes
VectorDouble3 lambdaAtNodes
Definition: GriffithForceElement.hpp:229
FractureMechanics::GriffithForceElement::AuxOp::rowIndicesLocal
ublas::vector< int > rowIndicesLocal
Definition: GriffithForceElement.hpp:225
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
FractureMechanics::GriffithForceElement::AuxOp::rowIndices
ublas::vector< int > rowIndices
Definition: GriffithForceElement.hpp:222
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
FractureMechanics::GriffithForceElement::AuxOp::commonData
CommonData & commonData
Definition: GriffithForceElement.hpp:219
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359