v0.9.0
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
MoFEM::DataForcesAndSourcesCore Struct Reference

data structure for finite element entityIt keeps that about indices of degrees of freedom, dofs data, base functions functions, entity side number, type of entities, approximation order, etc. More...

#include <src/finite_elements/DataStructures.hpp>

Inheritance diagram for MoFEM::DataForcesAndSourcesCore:
[legend]

Classes

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

Public Member Functions

 DataForcesAndSourcesCore (const EntityType type)
 
virtual ~DataForcesAndSourcesCore ()=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...
 
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

 DataForcesAndSourcesCore ()
 

Friends

std::ostream & operator<< (std::ostream &os, const DataForcesAndSourcesCore &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 43 of file DataStructures.hpp.

Constructor & Destructor Documentation

◆ DataForcesAndSourcesCore() [1/2]

MoFEM::DataForcesAndSourcesCore::DataForcesAndSourcesCore ( const EntityType  type)

Definition at line 116 of file DataStructures.cpp.

116  {
117  constructor_data(this, type);
118 }
static void constructor_data(DataForcesAndSourcesCore *data, const EntityType type)

◆ ~DataForcesAndSourcesCore()

virtual MoFEM::DataForcesAndSourcesCore::~DataForcesAndSourcesCore ( )
virtualdefault

◆ DataForcesAndSourcesCore() [2/2]

MoFEM::DataForcesAndSourcesCore::DataForcesAndSourcesCore ( )
protected

Definition at line 1053 of file DataStructures.hpp.

1053 {}

Member Function Documentation

◆ baseSwap()

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

Swap approximation base.

Parameters
field_name
base
Returns
MoFEMErrorCode

Definition at line 200 of file DataStructures.cpp.

201  {
203  for (int tt = MBVERTEX; tt != MBMAXTYPE; ++tt) {
204  auto &ent_data = dataOnEntities[tt];
205  for (auto &side_data : ent_data)
206  CHKERR side_data.baseSwap(field_name, base);
207  }
209 }
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:481
#define CHKERR
Inline error check.
Definition: definitions.h:600
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:411

◆ resetFieldDependentData()

MoFEMErrorCode MoFEM::DataForcesAndSourcesCore::resetFieldDependentData ( )

Reset data associated with particular field name

Returns
error code

Definition at line 171 of file DataStructures.cpp.

171  {
173  for (EntityType t = MBVERTEX; t != MBMAXTYPE; t++)
174  for (auto &e : dataOnEntities[t])
175  CHKERR e.resetFieldDependentData();
177 }
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:481
#define CHKERR
Inline error check.
Definition: definitions.h:600
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:411

◆ setElementType()

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

Reimplemented in MoFEM::DerivedDataForcesAndSourcesCore.

Definition at line 120 of file DataStructures.cpp.

120  {
122  for (auto &data : dataOnEntities)
123  data.clear();
124  constructor_data(this, type);
126 }
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:481
static void constructor_data(DataForcesAndSourcesCore *data, const EntityType type)
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:411

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 302 of file DataStructures.cpp.

302  {
303  for (unsigned int nn = 0; nn < e.dataOnEntities[MBVERTEX].size(); nn++) {
304  os << "dataOnEntities[MBVERTEX][" << nn << "]" << std::endl
305  << e.dataOnEntities[MBVERTEX][nn] << std::endl;
306  }
307  for (unsigned int ee = 0; ee < e.dataOnEntities[MBEDGE].size(); ee++) {
308  os << "dataOnEntities[MBEDGE][" << ee << "]" << std::endl
309  << e.dataOnEntities[MBEDGE][ee] << std::endl;
310  }
311  for (unsigned int ff = 0; ff < e.dataOnEntities[MBTRI].size(); ff++) {
312  os << "dataOnEntities[MBTRI][" << ff << "] " << std::endl
313  << e.dataOnEntities[MBTRI][ff] << std::endl;
314  }
315  for (unsigned int vv = 0; vv < e.dataOnEntities[MBTET].size(); vv++) {
316  os << "dataOnEntities[MBTET][" << vv << "]" << std::endl
317  << e.dataOnEntities[MBTET][vv] << std::endl;
318  }
319  return os;
320 }

Member Data Documentation

◆ bAse

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

bases on element

Definition at line 1014 of file DataStructures.hpp.

◆ basesOnEntities

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

bases on entity types

Definition at line 1020 of file DataStructures.hpp.

◆ basesOnSpaces

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

base on spaces

Definition at line 1022 of file DataStructures.hpp.

◆ dataOnEntities

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

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

Examples
EshelbianPlasticity.cpp, and forces_and_sources_testing_users_base.cpp.

Definition at line 1024 of file DataStructures.hpp.

◆ facesNodes

MatrixInt MoFEM::DataForcesAndSourcesCore::facesNodes

nodes on finite element faces

Examples
forces_and_sources_testing_users_base.cpp.

Definition at line 1015 of file DataStructures.hpp.

◆ sPace

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

spaces on element

Definition at line 1013 of file DataStructures.hpp.

◆ spacesOnEntities

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

spaces on entity types

Definition at line 1018 of file DataStructures.hpp.


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