v0.14.0
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:
[legend]
Collaboration diagram for MoFEM::EntitiesFieldData:
[legend]

Classes

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< 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< std::bitset< LASTBASE >, LASTSPACEbrokenBasesOnSpaces
 base on spaces More...
 
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
 

Protected Member Functions

 EntitiesFieldData ()
 

Friends

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.

Examples
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 ( )
virtualdefault

◆ EntitiesFieldData() [2/2]

MoFEM::EntitiesFieldData::EntitiesFieldData ( )
inlineprotected

Definition at line 96 of file EntitiesFieldData.hpp.

96 {}

Member Function Documentation

◆ baseSwap()

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

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 particular field using BB base, pointers to shape functions 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);

Parameters
field_name
base
Returns
MoFEMErrorCode

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 ( )
inline

Reset data associated with particular field name

Returns
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)
virtual

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 
)
friend

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 42 of file EntitiesFieldData.hpp.

◆ basesOnEntities

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

bases on entity types

Definition at line 51 of file EntitiesFieldData.hpp.

◆ basesOnSpaces

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

base on spaces

Definition at line 53 of file EntitiesFieldData.hpp.

◆ brokenBasesOnSpaces

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

base on spaces

Definition at line 55 of file EntitiesFieldData.hpp.

◆ dataOnEntities

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

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

Examples
EshelbianPlasticity.cpp, and forces_and_sources_testing_users_base.cpp.

Definition at line 57 of file EntitiesFieldData.hpp.

◆ facesNodes

MatrixInt MoFEM::EntitiesFieldData::facesNodes

nodes on finite element faces

Examples
forces_and_sources_testing_users_base.cpp.

Definition at line 45 of file EntitiesFieldData.hpp.

◆ facesNodesOrder

MatrixInt MoFEM::EntitiesFieldData::facesNodesOrder

order of face nodes on element

Definition at line 46 of file EntitiesFieldData.hpp.

◆ spacesOnEntities

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

spaces on entity types

Definition at line 49 of file EntitiesFieldData.hpp.


The documentation for this struct was generated from the following files:
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
convert.type
type
Definition: convert.py:64
t
constexpr double t
plate stiffness
Definition: plate.cpp:58
MoFEM::constructor_data
static void constructor_data(EntitiesFieldData *data, const EntityType type)
Definition: EntitiesFieldData.cpp:42
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
MoFEM::EntitiesFieldData::dataOnEntities
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
Definition: EntitiesFieldData.hpp:57
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