ReferenceElements.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2020 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
* Development 2012-2013 by School of Earth Sciences
* Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
* Development from 2019 by School of Earth and Environmental Sciences
**
*****************************************************************************/
/****************************************************************************
Finley: Reference elements
*****************************************************************************/
#ifndef __FINLEY_REFERENCEELEMENTS_H__
#define __FINLEY_REFERENCEELEMENTS_H__
#include "system_dep.h"
#include "Finley.h"
#include "ShapeFunctions.h"
#include "Quadrature.h"
// The ids of the allowed reference elements:
#define MAX_numNodes 64
#define MAX_numSubElements 8
#define MAX_numSides 2
namespace finley {
typedef enum {
Point1,
Line2,
Line3,
Line4,
Tri3,
Tri6,
Tri9,
Tri10,
Rec4,
Rec8,
Rec9,
Rec12,
Rec16,
Tet4,
Tet10,
Tet16,
Hex8,
Hex20,
Hex27,
Hex32,
Line2Face,
Line3Face,
Line4Face,
Tri3Face,
Tri6Face,
Tri9Face,
Tri10Face,
Rec4Face,
Rec8Face,
Rec9Face,
Rec12Face,
Rec16Face,
Tet4Face,
Tet10Face,
Tet16Face,
Hex8Face,
Hex20Face,
Hex27Face,
Hex32Face,
Point1_Contact,
Line2_Contact,
Line3_Contact,
Line4_Contact,
Tri3_Contact,
Tri6_Contact,
Tri9_Contact,
Tri10_Contact,
Rec4_Contact,
Rec8_Contact,
Rec9_Contact,
Rec12_Contact,
Rec16_Contact,
Line2Face_Contact,
Line3Face_Contact,
Line4Face_Contact,
Tri3Face_Contact,
Tri6Face_Contact,
Tri9Face_Contact,
Tri10Face_Contact,
Rec4Face_Contact,
Rec8Face_Contact,
Rec9Face_Contact,
Rec12Face_Contact,
Rec16Face_Contact,
Tet4Face_Contact,
Tet10Face_Contact,
Tet16Face_Contact,
Hex8Face_Contact,
Hex20Face_Contact,
Hex27Face_Contact,
Hex32Face_Contact,
Line3Macro,
Tri6Macro,
Rec9Macro,
Tet10Macro,
Hex27Macro,
NoRef // marks end of list
} ElementTypeId;
struct FINLEY_DLL_API ReferenceElementInfo {
ElementTypeId TypeId;
const char* Name;
int numNodes;
int numSubElements;
int numSides;
int offsets[MAX_numSides+1];
ElementTypeId LinearTypeId;
int linearNodes[MAX_numNodes*MAX_numSides];
QuadTypeId Quadrature;
ShapeFunctionTypeId Parametrization;
ShapeFunctionTypeId BasisFunctions;
int subElementNodes[MAX_numNodes*MAX_numSides*MAX_numSubElements];
int numRelevantGeoNodes;
int relevantGeoNodes[MAX_numNodes];
int numNodesOnFace;
// the following lists are only used for face elements defined by
// numNodesOnFace>0:
int faceNodes[MAX_numNodes];
// shiftNodes={-1} or reverseNodes={-1} are ignored.
int shiftNodes[MAX_numNodes];
int reverseNodes[MAX_numNodes];
};
struct FINLEY_DLL_API ReferenceElement {
ReferenceElement(ElementTypeId id, int order);
~ReferenceElement();
static const ReferenceElementInfo* getInfo(ElementTypeId id);
static ElementTypeId getTypeId(const char*);
int getNumNodes() const { return Type->numNodes; }
const ReferenceElementInfo* Type;
const ReferenceElementInfo* LinearType;
int integrationOrder;
int numNodes;
int numLocalDim;
int numLinearNodes;
const_ShapeFunction_ptr Parametrization;
const_ShapeFunction_ptr BasisFunctions;
const_ShapeFunction_ptr LinearBasisFunctions;
double* DBasisFunctionDv;
bool DBasisFunctionDvShared;
};
typedef boost::shared_ptr<ReferenceElement> ReferenceElement_ptr;
typedef boost::shared_ptr<const ReferenceElement> const_ReferenceElement_ptr;
} // namespace finley
#endif // __FINLEY_REFERENCEELEMENTS_H__
Finley.h
Quadrature.h
MAX_numSubElements
#define MAX_numSubElements
Definition: ReferenceElements.h:36
MAX_numSides
#define MAX_numSides
Definition: ReferenceElements.h:37
MAX_numNodes
#define MAX_numNodes
Definition: ReferenceElements.h:35
ShapeFunctions.h
FINLEY_DLL_API
#define FINLEY_DLL_API
Definition: finley/src/system_dep.h:29
finley
A suite of factory methods for creating various finley domains.
Definition: finley/src/Assemble.h:32
finley::ShapeFunctionTypeId
ShapeFunctionTypeId
Definition: ShapeFunctions.h:32
finley::const_ReferenceElement_ptr
boost::shared_ptr< const ReferenceElement > const_ReferenceElement_ptr
Definition: ReferenceElements.h:216
finley::const_ShapeFunction_ptr
boost::shared_ptr< const ShapeFunction > const_ShapeFunction_ptr
Definition: ShapeFunctions.h:102
finley::ReferenceElement_ptr
boost::shared_ptr< ReferenceElement > ReferenceElement_ptr
Definition: ReferenceElements.h:215
finley::ElementTypeId
ElementTypeId
Definition: ReferenceElements.h:41
finley::Tet10Face
@ Tet10Face
Definition: ReferenceElements.h:75
finley::Hex32Face
@ Hex32Face
Definition: ReferenceElements.h:80
finley::Tri10Face
@ Tri10Face
Definition: ReferenceElements.h:68
finley::Tri10
@ Tri10
Definition: ReferenceElements.h:49
finley::Hex32
@ Hex32
Definition: ReferenceElements.h:61
finley::Tri6_Contact
@ Tri6_Contact
Definition: ReferenceElements.h:86
finley::Tri9Face
@ Tri9Face
Definition: ReferenceElements.h:67
finley::Line4
@ Line4
Definition: ReferenceElements.h:45
finley::Rec8_Contact
@ Rec8_Contact
Definition: ReferenceElements.h:90
finley::Tet10Macro
@ Tet10Macro
Definition: ReferenceElements.h:116
finley::Rec4_Contact
@ Rec4_Contact
Definition: ReferenceElements.h:89
finley::Tet16Face
@ Tet16Face
Definition: ReferenceElements.h:76
finley::Tri3_Contact
@ Tri3_Contact
Definition: ReferenceElements.h:85
finley::Line2
@ Line2
Definition: ReferenceElements.h:43
finley::Rec9Face_Contact
@ Rec9Face_Contact
Definition: ReferenceElements.h:103
finley::Rec4Face_Contact
@ Rec4Face_Contact
Definition: ReferenceElements.h:101
finley::Rec12Face_Contact
@ Rec12Face_Contact
Definition: ReferenceElements.h:104
finley::Hex27Macro
@ Hex27Macro
Definition: ReferenceElements.h:117
finley::Tri6Face_Contact
@ Tri6Face_Contact
Definition: ReferenceElements.h:98
finley::Rec9
@ Rec9
Definition: ReferenceElements.h:52
finley::Hex20Face_Contact
@ Hex20Face_Contact
Definition: ReferenceElements.h:110
finley::Hex8
@ Hex8
Definition: ReferenceElements.h:58
finley::Hex8Face_Contact
@ Hex8Face_Contact
Definition: ReferenceElements.h:109
finley::Hex27
@ Hex27
Definition: ReferenceElements.h:60
finley::Tri3
@ Tri3
Definition: ReferenceElements.h:46
finley::Line4Face_Contact
@ Line4Face_Contact
Definition: ReferenceElements.h:96
finley::Rec9Face
@ Rec9Face
Definition: ReferenceElements.h:71
finley::Tri9
@ Tri9
Definition: ReferenceElements.h:48
finley::Rec8Face
@ Rec8Face
Definition: ReferenceElements.h:70
finley::Tet10Face_Contact
@ Tet10Face_Contact
Definition: ReferenceElements.h:107
finley::Line2Face_Contact
@ Line2Face_Contact
Definition: ReferenceElements.h:94
finley::Tri6
@ Tri6
Definition: ReferenceElements.h:47
finley::Tri10_Contact
@ Tri10_Contact
Definition: ReferenceElements.h:88
finley::Rec16Face_Contact
@ Rec16Face_Contact
Definition: ReferenceElements.h:105
finley::Hex20
@ Hex20
Definition: ReferenceElements.h:59
finley::Tet4
@ Tet4
Definition: ReferenceElements.h:55
finley::Tri10Face_Contact
@ Tri10Face_Contact
Definition: ReferenceElements.h:100
finley::Line3Face
@ Line3Face
Definition: ReferenceElements.h:63
finley::NoRef
@ NoRef
Definition: ReferenceElements.h:118
finley::Hex27Face
@ Hex27Face
Definition: ReferenceElements.h:79
finley::Hex32Face_Contact
@ Hex32Face_Contact
Definition: ReferenceElements.h:112
finley::Tri6Face
@ Tri6Face
Definition: ReferenceElements.h:66
finley::Hex20Face
@ Hex20Face
Definition: ReferenceElements.h:78
finley::Tet10
@ Tet10
Definition: ReferenceElements.h:56
finley::Line3_Contact
@ Line3_Contact
Definition: ReferenceElements.h:83
finley::Line2Face
@ Line2Face
Definition: ReferenceElements.h:62
finley::Rec9_Contact
@ Rec9_Contact
Definition: ReferenceElements.h:91
finley::Rec9Macro
@ Rec9Macro
Definition: ReferenceElements.h:115
finley::Line4_Contact
@ Line4_Contact
Definition: ReferenceElements.h:84
finley::Line3
@ Line3
Definition: ReferenceElements.h:44
finley::Tri9_Contact
@ Tri9_Contact
Definition: ReferenceElements.h:87
finley::Rec16Face
@ Rec16Face
Definition: ReferenceElements.h:73
finley::Rec12Face
@ Rec12Face
Definition: ReferenceElements.h:72
finley::Rec4
@ Rec4
Definition: ReferenceElements.h:50
finley::Tet4Face
@ Tet4Face
Definition: ReferenceElements.h:74
finley::Line3Face_Contact
@ Line3Face_Contact
Definition: ReferenceElements.h:95
finley::Tri3Face
@ Tri3Face
Definition: ReferenceElements.h:65
finley::Line3Macro
@ Line3Macro
Definition: ReferenceElements.h:113
finley::Hex8Face
@ Hex8Face
Definition: ReferenceElements.h:77
finley::Rec8Face_Contact
@ Rec8Face_Contact
Definition: ReferenceElements.h:102
finley::Tri6Macro
@ Tri6Macro
Definition: ReferenceElements.h:114
finley::Line2_Contact
@ Line2_Contact
Definition: ReferenceElements.h:82
finley::Rec12
@ Rec12
Definition: ReferenceElements.h:53
finley::Rec8
@ Rec8
Definition: ReferenceElements.h:51
finley::Tet16Face_Contact
@ Tet16Face_Contact
Definition: ReferenceElements.h:108
finley::Rec16
@ Rec16
Definition: ReferenceElements.h:54
finley::Tet16
@ Tet16
Definition: ReferenceElements.h:57
finley::Hex27Face_Contact
@ Hex27Face_Contact
Definition: ReferenceElements.h:111
finley::Rec16_Contact
@ Rec16_Contact
Definition: ReferenceElements.h:93
finley::Rec4Face
@ Rec4Face
Definition: ReferenceElements.h:69
finley::Point1
@ Point1
Definition: ReferenceElements.h:42
finley::Line4Face
@ Line4Face
Definition: ReferenceElements.h:64
finley::Tet4Face_Contact
@ Tet4Face_Contact
Definition: ReferenceElements.h:106
finley::Rec12_Contact
@ Rec12_Contact
Definition: ReferenceElements.h:92
finley::Tri3Face_Contact
@ Tri3Face_Contact
Definition: ReferenceElements.h:97
finley::Point1_Contact
@ Point1_Contact
Definition: ReferenceElements.h:81
finley::Tri9Face_Contact
@ Tri9Face_Contact
Definition: ReferenceElements.h:99
finley::QuadTypeId
QuadTypeId
Definition: Quadrature.h:35
system_dep.h
finley::ReferenceElementInfo
this struct holds the definition of the reference element
Definition: ReferenceElements.h:123
finley::ReferenceElementInfo::numNodes
int numNodes
number of nodes defining the element
Definition: ReferenceElements.h:129
finley::ReferenceElementInfo::Quadrature
QuadTypeId Quadrature
quadrature scheme
Definition: ReferenceElements.h:144
finley::ReferenceElementInfo::LinearTypeId
ElementTypeId LinearTypeId
type id of the linear version of the element
Definition: ReferenceElements.h:140
finley::ReferenceElementInfo::Parametrization
ShapeFunctionTypeId Parametrization
shape function for parametrization of the element
Definition: ReferenceElements.h:146
finley::ReferenceElementInfo::numSubElements
int numSubElements
number of subelements (>1 if macro elements are used)
Definition: ReferenceElements.h:131
finley::ReferenceElementInfo::numRelevantGeoNodes
int numRelevantGeoNodes
deprecated
Definition: ReferenceElements.h:156
finley::ReferenceElementInfo::Name
const char * Name
the name in text form e.g. "Line1", "Rec12", ...
Definition: ReferenceElements.h:127
finley::ReferenceElementInfo::numSides
int numSides
Definition: ReferenceElements.h:134
finley::ReferenceElementInfo::BasisFunctions
ShapeFunctionTypeId BasisFunctions
shape function for the basis functions
Definition: ReferenceElements.h:148
finley::ReferenceElementInfo::TypeId
ElementTypeId TypeId
the type
Definition: ReferenceElements.h:125
finley::ReferenceElementInfo::numNodesOnFace
int numNodesOnFace
Definition: ReferenceElements.h:161
finley::ReferenceElement
this struct holds the realization of a reference element
Definition: ReferenceElements.h:179
finley::ReferenceElement::Parametrization
const_ShapeFunction_ptr Parametrization
Definition: ReferenceElements.h:204
finley::ReferenceElement::numLocalDim
int numLocalDim
Definition: ReferenceElements.h:202
finley::ReferenceElement::DBasisFunctionDvShared
bool DBasisFunctionDvShared
Definition: ReferenceElements.h:212
finley::ReferenceElement::LinearBasisFunctions
const_ShapeFunction_ptr LinearBasisFunctions
Definition: ReferenceElements.h:206
finley::ReferenceElement::DBasisFunctionDv
double * DBasisFunctionDv
Definition: ReferenceElements.h:209
finley::ReferenceElement::getNumNodes
int getNumNodes() const
Definition: ReferenceElements.h:193
finley::ReferenceElement::numLinearNodes
int numLinearNodes
Definition: ReferenceElements.h:203
finley::ReferenceElement::Type
const ReferenceElementInfo * Type
type of the reference element
Definition: ReferenceElements.h:196
finley::ReferenceElement::BasisFunctions
const_ShapeFunction_ptr BasisFunctions
Definition: ReferenceElements.h:205
finley::ReferenceElement::integrationOrder
int integrationOrder
used integration order
Definition: ReferenceElements.h:200
finley::ReferenceElement::LinearType
const ReferenceElementInfo * LinearType
type of the linear reference element
Definition: ReferenceElements.h:198
finley::ReferenceElement::numNodes
int numNodes
Definition: ReferenceElements.h:201