v0.13.1
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]

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

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
forces_and_sources_testing_users_base.cpp.

Definition at line 52 of file EntitiesFieldData.hpp.

Constructor & Destructor Documentation

◆ EntitiesFieldData() [1/2]

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

Definition at line 87 of file EntitiesFieldData.cpp.

87 {
89}
static void constructor_data(EntitiesFieldData *data, const EntityType type)

◆ ~EntitiesFieldData()

virtual MoFEM::EntitiesFieldData::~EntitiesFieldData ( )
virtualdefault

◆ EntitiesFieldData() [2/2]

MoFEM::EntitiesFieldData::EntitiesFieldData ( )
protected

Definition at line 107 of file EntitiesFieldData.hpp.

107{}

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

Parameters
field_name
base
Returns
MoFEMErrorCode

Definition at line 168 of file EntitiesFieldData.cpp.

169 {
171 // Note: Do not swap bases on entities sets
172 for (int tt = MBVERTEX; tt != MBENTITYSET; ++tt) {
173 auto &ent_data = dataOnEntities[tt];
174 for (auto &side_data : ent_data)
175 CHKERR side_data.baseSwap(field_name, base);
176 }
178}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
#define CHKERR
Inline error check.
Definition: definitions.h:548
constexpr auto field_name
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities

◆ resetFieldDependentData()

MoFEMErrorCode MoFEM::EntitiesFieldData::resetFieldDependentData ( )

Reset data associated with particular field name

Returns
error code

Definition at line 139 of file EntitiesFieldData.cpp.

139 {
141 for (EntityType t = MBVERTEX; t != MBMAXTYPE; t++)
142 for (auto &e : dataOnEntities[t])
143 CHKERR e.resetFieldDependentData();
145}
constexpr double t
plate stiffness
Definition: plate.cpp:76

◆ setElementType()

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

Reimplemented in MoFEM::DerivedEntitiesFieldData.

Definition at line 91 of file EntitiesFieldData.cpp.

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 282 of file EntitiesFieldData.cpp.

282 {
283 for (EntityType t = MBVERTEX; t != MBMAXTYPE; ++t) {
284 for (unsigned int nn = 0; nn < e.dataOnEntities[t].size(); nn++) {
285 os << "dataOnEntities[" << moab::CN::EntityTypeName(t) << "][" << nn
286 << "]" << std::endl
287 << e.dataOnEntities[t][nn] << std::endl;
288 }
289 }
290 return os;
291}

Member Data Documentation

◆ bAse

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

bases on element

Definition at line 57 of file EntitiesFieldData.hpp.

◆ basesOnEntities

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

bases on entity types

Definition at line 64 of file EntitiesFieldData.hpp.

◆ basesOnSpaces

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

base on spaces

Definition at line 66 of file EntitiesFieldData.hpp.

◆ dataOnEntities

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

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

Examples
forces_and_sources_testing_users_base.cpp.

Definition at line 68 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 58 of file EntitiesFieldData.hpp.

◆ facesNodesOrder

MatrixInt MoFEM::EntitiesFieldData::facesNodesOrder

order of face nodes on element

Definition at line 59 of file EntitiesFieldData.hpp.

◆ sPace

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

spaces on element

Definition at line 56 of file EntitiesFieldData.hpp.

◆ spacesOnEntities

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

spaces on entity types

Definition at line 62 of file EntitiesFieldData.hpp.


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