Classes | Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
MoFEM::EntitiesFieldData Struct Reference

data structure for finite element entity More...

#include <src/finite_elements/EntitiesFieldData.hpp>

Inheritance diagram for MoFEM::EntitiesFieldData:
Collaboration diagram for MoFEM::EntitiesFieldData:


struct  EntData
 Data on single entity (This is passed as argument to DataOperator::doWork) More...

Public Member Functions

 EntitiesFieldData (const EntityType type)
virtual ~EntitiesFieldData ()=default
virtual MoFEMErrorCode setElementType (const EntityType type)
MoFEMErrorCode resetFieldDependentData ()
virtual MoFEMErrorCode baseSwap (const std::string &field_name, const FieldApproximationBase base)
 Swap approximation base. More...

Public Attributes

std::bitset< LASTSPACEsPace
 spaces on element More...
std::bitset< LASTBASEbAse
 bases on element More...
MatrixInt facesNodes
 nodes on finite element faces More...
MatrixInt facesNodesOrder
 order of face nodes on element More...
std::array< std::bitset< LASTSPACE >, MBMAXTYPE > spacesOnEntities
 spaces on entity types More...
std::array< std::bitset< LASTBASE >, MBMAXTYPE > basesOnEntities
 bases on entity types More...
std::array< std::bitset< LASTBASE >, LASTSPACEbasesOnSpaces
 base on spaces More...
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities

Protected Member Functions

 EntitiesFieldData ()


std::ostream & operator<< (std::ostream &os, const EntitiesFieldData &e)

Detailed Description

data structure for finite element entity

It keeps that about indices of degrees of freedom, dofs data, base functions functions, entity side number, type of entities, approximation order, etc.

EshelbianPlasticity.cpp, and forces_and_sources_testing_users_base.cpp.

Definition at line 40 of file EntitiesFieldData.hpp.

Constructor & Destructor Documentation

◆ EntitiesFieldData() [1/2]

MoFEM::EntitiesFieldData::EntitiesFieldData ( const EntityType  type)

Definition at line 75 of file EntitiesFieldData.cpp.

75  {
76  constructor_data(this, type);
77 }

◆ ~EntitiesFieldData()

virtual MoFEM::EntitiesFieldData::~EntitiesFieldData ( )

◆ EntitiesFieldData() [2/2]

MoFEM::EntitiesFieldData::EntitiesFieldData ( )

Definition at line 95 of file EntitiesFieldData.hpp.

95 {}

Member Function Documentation

◆ baseSwap()

MoFEMErrorCode MoFEM::EntitiesFieldData::baseSwap ( const std::string &  field_name,
const FieldApproximationBase  base 

Swap approximation base.

Bernstein-Bezier (BB) base is not hierarchical, and is calculated for particular field, since it all shape functions change with the order. BB base is precalculated for every field, and when user push operator with paricular field using BB base, pointers to shape funtions and BaseDerivatives of shape functions are set to particular location, once operator is executed, pointers are switch back to its oroginal position.

getNSharedPtr(base) <=== getBBNSharedPtr(field_name); // DO OPERATOR WORK getNSharedPtr(base) ==> getBBNSharedPtr(field_name);


Definition at line 156 of file EntitiesFieldData.cpp.

157  {
159  // Note: Do not swap bases on entities sets
160  for (int tt = MBVERTEX; tt != MBENTITYSET; ++tt) {
161  auto &ent_data = dataOnEntities[tt];
162  for (auto &side_data : ent_data)
163  CHKERR side_data.baseSwap(field_name, base);
164  }
166 }

◆ resetFieldDependentData()

MoFEMErrorCode MoFEM::EntitiesFieldData::resetFieldDependentData ( )

Reset data associated with particular field name

error code

Definition at line 127 of file EntitiesFieldData.cpp.

127  {
129  for (EntityType t = MBVERTEX; t != MBMAXTYPE; t++)
130  for (auto &e : dataOnEntities[t])
131  CHKERR e.resetFieldDependentData();
133 }

◆ setElementType()

MoFEMErrorCode MoFEM::EntitiesFieldData::setElementType ( const EntityType  type)

Reimplemented in MoFEM::DerivedEntitiesFieldData.

Definition at line 79 of file EntitiesFieldData.cpp.

79  {
81  constructor_data(this, type);
83 }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const EntitiesFieldData e 

Definition at line 270 of file EntitiesFieldData.cpp.

270  {
271  for (EntityType t = MBVERTEX; t != MBMAXTYPE; ++t) {
272  for (unsigned int nn = 0; nn < e.dataOnEntities[t].size(); nn++) {
273  os << "dataOnEntities[" << moab::CN::EntityTypeName(t) << "][" << nn
274  << "]" << std::endl
275  << e.dataOnEntities[t][nn] << std::endl;
276  }
277  }
278  return os;
279 }

Member Data Documentation

◆ bAse

std::bitset<LASTBASE> MoFEM::EntitiesFieldData::bAse

bases on element

Definition at line 45 of file EntitiesFieldData.hpp.

◆ basesOnEntities

std::array<std::bitset<LASTBASE>, MBMAXTYPE> MoFEM::EntitiesFieldData::basesOnEntities

bases on entity types

Definition at line 52 of file EntitiesFieldData.hpp.

◆ basesOnSpaces

std::array<std::bitset<LASTBASE>, LASTSPACE> MoFEM::EntitiesFieldData::basesOnSpaces

base on spaces

Definition at line 54 of file EntitiesFieldData.hpp.

◆ dataOnEntities

std::array<boost::ptr_vector<EntData>, MBMAXTYPE> MoFEM::EntitiesFieldData::dataOnEntities

data on nodes, base function, dofs values, etc.

EshelbianPlasticity.cpp, and forces_and_sources_testing_users_base.cpp.

Definition at line 56 of file EntitiesFieldData.hpp.

◆ facesNodes

MatrixInt MoFEM::EntitiesFieldData::facesNodes

nodes on finite element faces


Definition at line 46 of file EntitiesFieldData.hpp.

◆ facesNodesOrder

MatrixInt MoFEM::EntitiesFieldData::facesNodesOrder

order of face nodes on element

Definition at line 47 of file EntitiesFieldData.hpp.

◆ sPace

std::bitset<LASTSPACE> MoFEM::EntitiesFieldData::sPace

spaces on element

Definition at line 42 of file EntitiesFieldData.hpp.

◆ spacesOnEntities

std::array<std::bitset<LASTSPACE>, MBMAXTYPE> MoFEM::EntitiesFieldData::spacesOnEntities

spaces on entity types

Definition at line 50 of file EntitiesFieldData.hpp.

The documentation for this struct was generated from the following files:
#define CHKERR
Inline error check.
Definition: definitions.h:535
Definition: convert.py:64
constexpr double t
plate stiffness
Definition: plate.cpp:59
static void constructor_data(EntitiesFieldData *data, const EntityType type)
Definition: EntitiesFieldData.cpp:42
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
Definition: EntitiesFieldData.hpp:56
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346