![]() |
v0.13.1 |
Provide data structure for (tensor) field approximation. More...
#include <src/multi_indices/FieldMultiIndices.hpp>
Public Types | |
using | SequenceDofContainer = multi_index_container< boost::weak_ptr< std::vector< DofEntity > >, indexed_by< sequenced<> > > |
typedef std::array< std::array< int, MAX_DOFS_ON_ENTITY >, MBMAXTYPE > | DofsOrderMap |
Public Member Functions | |
Field (moab::Interface &moab, const EntityHandle meshset) | |
constructor for moab field More... | |
virtual | ~Field ()=default |
FieldOrderTable & | getFieldOrderTable () |
Get the Field Order Table. More... | |
UId | generateGlobalUniqueIdForTypeLo (const EntityType type, const int owner_proc) const |
UId | generateGlobalUniqueIdForTypeHi (const EntityType type, const int owner_proc) const |
EntityHandle | getMeshset () const |
Get field meshset. More... | |
const BitFieldId & | getId () const |
Get unique field id. More... | |
boost::string_ref | getNameRef () const |
Get string reference to field name. More... | |
std::string | getName () const |
Get field name. More... | |
FieldSpace | getSpace () const |
Get field approximation space. More... | |
auto | getSpaceName () const |
Get field approximation space. More... | |
FieldApproximationBase | getApproxBase () const |
Get approximation base. More... | |
auto | getApproxBaseName () const |
Get approximation base. More... | |
FieldCoefficientsNumber | getNbOfCoeffs () const |
Get number of field coefficients. More... | |
FieldBitNumber | getBitNumber () const |
Get number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for given field. Field ID has only one bit set for each field. More... | |
FieldBitNumber | getBitNumberCalculate () const |
Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for given field. Field ID has only one bit set for each field. More... | |
SequenceDofContainer & | getDofSequenceContainer () const |
Get reference to sequence data container. More... | |
const std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & | getDofOrderMap (const EntityType type) const |
get hash-map relating dof index on entity with its order More... | |
const DofsOrderMap & | getDofOrderMap () const |
get hash-map relating dof index on entity with its order More... | |
MoFEMErrorCode | rebuildDofsOrderMap () |
const Field * | getFieldRawPtr () const |
Static Public Member Functions | |
static UId | generateGlobalUniqueIdForTypeLo (const char bit_number, const EntityType type, const int owner_proc) |
static UId | generateGlobalUniqueIdForTypeHi (const char bit_number, const EntityType type, const int owner_proc) |
static FieldBitNumber | getBitNumberCalculate (const BitFieldId &id) |
Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for given field. Field ID has only one bit set for each field. More... | |
Public Attributes | |
moab::Interface & | moab |
EntityHandle | meshSet |
keeps entities for this meshset More... | |
TagType | tagFieldDataVertsType |
Tag | th_FieldDataVerts |
Tag storing field values on vertices in the field. More... | |
Tag | th_FieldData |
Tag storing field values on entity in the field. More... | |
Tag | th_AppOrder |
Tag storing approximation order on entity. More... | |
Tag | th_FieldRank |
BitFieldId * | tagId |
Tag field rank. More... | |
FieldSpace * | tagSpaceData |
tag keeps field space More... | |
FieldApproximationBase * | tagBaseData |
tag keeps field base More... | |
FieldCoefficientsNumber * | tagNbCoeffData |
const void * | tagName |
tag keeps name of the field More... | |
int | tagNameSize |
number of bits necessary to keep field name More... | |
const void * | tagNamePrefixData |
tag keeps name prefix of the field More... | |
int | tagNamePrefixSize |
FieldOrderTable | forderTable |
nb. DOFs table for entities More... | |
unsigned int | bitNumber |
Private Attributes | |
SequenceDofContainer | sequenceDofContainer |
DofsOrderMap | dofOrderMap |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Field &e) |
Provide data structure for (tensor) field approximation.
The Field is intended to provide support for fields, with a strong bias towards supporting first and best the capabilities required for scientific computing applications. Since we work with discrete spaces, data structure has to carry information about type of approximation space, its regularity.
Field data structure storing information about space, approximation base, coordinate systems, etc. It stores additional data needed for book keeping, like tags to data on the mesh.
Each filed has unique ID and name. This data structure is shared between entities on which is spanning and DOFs on those entities.
Definition at line 64 of file FieldMultiIndices.hpp.
typedef std::array<std::array<int, MAX_DOFS_ON_ENTITY>, MBMAXTYPE> MoFEM::Field::DofsOrderMap |
Definition at line 82 of file FieldMultiIndices.hpp.
using MoFEM::Field::SequenceDofContainer = multi_index_container< boost::weak_ptr<std::vector<DofEntity> >, indexed_by<sequenced<> >> |
Definition at line 75 of file FieldMultiIndices.hpp.
MoFEM::Field::Field | ( | moab::Interface & | moab, |
const EntityHandle | meshset | ||
) |
constructor for moab field
meshset | which keeps entities for this field |
Definition at line 29 of file FieldMultiIndices.cpp.
|
virtualdefault |
|
static |
Definition at line 136 of file FieldMultiIndices.hpp.
UId MoFEM::Field::generateGlobalUniqueIdForTypeHi | ( | const EntityType | type, |
const int | owner_proc | ||
) | const |
Definition at line 146 of file FieldMultiIndices.hpp.
|
static |
Definition at line 121 of file FieldMultiIndices.hpp.
UId MoFEM::Field::generateGlobalUniqueIdForTypeLo | ( | const EntityType | type, |
const int | owner_proc | ||
) | const |
Definition at line 131 of file FieldMultiIndices.hpp.
FieldApproximationBase MoFEM::Field::getApproxBase | ( | ) | const |
Get approximation base.
Definition at line 207 of file FieldMultiIndices.hpp.
auto MoFEM::Field::getApproxBaseName | ( | ) | const |
Get approximation base.
Definition at line 213 of file FieldMultiIndices.hpp.
FieldBitNumber MoFEM::Field::getBitNumber | ( | ) | const |
Get number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for given field. Field ID has only one bit set for each field.
Definition at line 240 of file FieldMultiIndices.hpp.
FieldBitNumber MoFEM::Field::getBitNumberCalculate | ( | ) | const |
Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for given field. Field ID has only one bit set for each field.
Definition at line 261 of file FieldMultiIndices.hpp.
|
static |
Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for given field. Field ID has only one bit set for each field.
Definition at line 247 of file FieldMultiIndices.hpp.
const DofsOrderMap & MoFEM::Field::getDofOrderMap | ( | ) | const |
get hash-map relating dof index on entity with its order
Dofs of given field are indexed on entity of the same type, same space, approximation base and number of coefficients, are sorted in the way.
Definition at line 309 of file FieldMultiIndices.hpp.
const std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & MoFEM::Field::getDofOrderMap | ( | const EntityType | type | ) | const |
get hash-map relating dof index on entity with its order
Dofs of given field are indexed on entity of the same type, same space, approximation base and number of coefficients, are sorted in the way.
Definition at line 297 of file FieldMultiIndices.hpp.
SequenceDofContainer & MoFEM::Field::getDofSequenceContainer | ( | ) | const |
Get reference to sequence data container.
In sequence data container data are physically stored. The purpose of this is to allocate DofEntity data in bulk, having only one allocation instead each time entity is inserted. That makes code efficient.
The vector in sequence is destroyed if last entity inside that vector is destroyed. All MoFEM::MoFEMEntities have aliased shared_ptr which points to the vector.
Not all DOFs are starred in this way, currently such cases are considered;
For other cases, DOFs are stored locally in each MoFEM::MoFEMEntities.
Definition at line 284 of file FieldMultiIndices.hpp.
FieldOrderTable & MoFEM::Field::getFieldOrderTable | ( | ) |
Get the Field Order Table.
Definition at line 113 of file FieldMultiIndices.hpp.
const Field * MoFEM::Field::getFieldRawPtr | ( | ) | const |
Definition at line 315 of file FieldMultiIndices.hpp.
const BitFieldId & MoFEM::Field::getId | ( | ) | const |
EntityHandle MoFEM::Field::getMeshset | ( | ) | const |
Get field meshset.
To meshsets entity are attached Tags which keeps basic information about field. Those information is field name, approximation base, approximation space, id, etc.
In meshset contains entities on which given filed is sparing. Type of entities depended on approximations space.
Definition at line 165 of file FieldMultiIndices.hpp.
std::string MoFEM::Field::getName | ( | ) | const |
boost::string_ref MoFEM::Field::getNameRef | ( | ) | const |
Get string reference to field name.
Definition at line 177 of file FieldMultiIndices.hpp.
FieldCoefficientsNumber MoFEM::Field::getNbOfCoeffs | ( | ) | const |
Get number of field coefficients.
Scalar field has only one coefficient, vector field in 3D has three. In general number determine space needed to keep data on entities. What coefficient means depend on interpretation and associated coordinate system. For example 3 coefficient means could be covariant or contravariant, or mean three temperatures for mixture of solid, air and water, etc.
Definition at line 231 of file FieldMultiIndices.hpp.
FieldSpace MoFEM::Field::getSpace | ( | ) | const |
Get field approximation space.
Definition at line 193 of file FieldMultiIndices.hpp.
auto MoFEM::Field::getSpaceName | ( | ) | const |
Get field approximation space.
Definition at line 199 of file FieldMultiIndices.hpp.
MoFEMErrorCode MoFEM::Field::rebuildDofsOrderMap | ( | ) |
Definition at line 362 of file FieldMultiIndices.cpp.
|
friend |
Definition at line 399 of file FieldMultiIndices.cpp.
unsigned int MoFEM::Field::bitNumber |
Field Id is bit set. Each field has only one bit on, bitNumber stores number of set bit
Definition at line 119 of file FieldMultiIndices.hpp.
|
mutableprivate |
Definition at line 319 of file FieldMultiIndices.hpp.
FieldOrderTable MoFEM::Field::forderTable |
nb. DOFs table for entities
Definition at line 106 of file FieldMultiIndices.hpp.
EntityHandle MoFEM::Field::meshSet |
keeps entities for this meshset
Definition at line 86 of file FieldMultiIndices.hpp.
moab::Interface& MoFEM::Field::moab |
Definition at line 84 of file FieldMultiIndices.hpp.
|
mutableprivate |
Definition at line 318 of file FieldMultiIndices.hpp.
FieldApproximationBase* MoFEM::Field::tagBaseData |
tag keeps field base
Definition at line 96 of file FieldMultiIndices.hpp.
TagType MoFEM::Field::tagFieldDataVertsType |
Definition at line 88 of file FieldMultiIndices.hpp.
BitFieldId* MoFEM::Field::tagId |
const void* MoFEM::Field::tagName |
tag keeps name of the field
Definition at line 101 of file FieldMultiIndices.hpp.
const void* MoFEM::Field::tagNamePrefixData |
tag keeps name prefix of the field
Definition at line 103 of file FieldMultiIndices.hpp.
int MoFEM::Field::tagNamePrefixSize |
number of bits necessary to keep field name prefix
Definition at line 104 of file FieldMultiIndices.hpp.
int MoFEM::Field::tagNameSize |
number of bits necessary to keep field name
Definition at line 102 of file FieldMultiIndices.hpp.
FieldCoefficientsNumber* MoFEM::Field::tagNbCoeffData |
tag keeps field rank (dimension, f.e. Temperature field has rank 1, displacements field in 3d has rank 3)
Definition at line 100 of file FieldMultiIndices.hpp.
FieldSpace* MoFEM::Field::tagSpaceData |
tag keeps field space
Definition at line 95 of file FieldMultiIndices.hpp.
Tag MoFEM::Field::th_AppOrder |
Tag storing approximation order on entity.
Definition at line 91 of file FieldMultiIndices.hpp.
Tag MoFEM::Field::th_FieldData |
Tag storing field values on entity in the field.
Definition at line 90 of file FieldMultiIndices.hpp.
Tag MoFEM::Field::th_FieldDataVerts |
Tag storing field values on vertices in the field.
Definition at line 89 of file FieldMultiIndices.hpp.
Tag MoFEM::Field::th_FieldRank |
Definition at line 92 of file FieldMultiIndices.hpp.