ShapeFunctions.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
**
*****************************************************************************/
#ifndef __FINLEY_SHAPEFUNCTIONS_H__
#define __FINLEY_SHAPEFUNCTIONS_H__
#include "system_dep.h"
#include "Finley.h"
#include <boost/shared_ptr.hpp>
#define S_INDEX(_J_,_I_,_NUMNODES_) INDEX2(_J_,_I_,_NUMNODES_)
#define DSDV_INDEX(_J_,_K_,_I_,_NUMNODES_,_DIM_) INDEX3(_J_,_K_,_I_,_NUMNODES_,_DIM_)
namespace finley {
typedef enum {
Point1Shape,
Line2Shape,
Line3Shape,
Line4Shape,
Tri3Shape,
Tri6Shape,
Tri9Shape,
Tri10Shape,
Rec4Shape,
Rec8Shape,
Rec9Shape,
Rec12Shape,
Rec16Shape,
Tet4Shape,
Tet10Shape,
Tet16Shape,
Hex8Shape,
Hex20Shape,
Hex27Shape,
Hex32Shape,
NoShape // marks end of list
} ShapeFunctionTypeId;
typedef void (ShapeFunction_Evaluation) (int, std::vector<double>&, std::vector<double>&, std::vector<double>&);
struct ShapeFunctionInfo {
ShapeFunctionTypeId TypeId;
const char* Name;
int numDim;
int numShapes;
int numOrder;
int numVertices;
ShapeFunction_Evaluation* getValues;
};
struct FINLEY_DLL_API ShapeFunction {
ShapeFunction(ShapeFunctionTypeId id, int numQuadDim, int numQuadNodes,
const std::vector<double>& QuadNodes,
const std::vector<double>& QuadWeights);
ShapeFunctionTypeId getTypeId(const char*);
static const ShapeFunctionInfo* getInfo(ShapeFunctionTypeId id);
const ShapeFunctionInfo* Type;
int numQuadNodes;
std::vector<double> QuadNodes;
std::vector<double> QuadWeights;
std::vector<double> S;
std::vector<double> dSdv;
};
typedef boost::shared_ptr<const ShapeFunction> const_ShapeFunction_ptr;
ShapeFunction_Evaluation Shape_Point1;
ShapeFunction_Evaluation Shape_Line2;
ShapeFunction_Evaluation Shape_Line3;
ShapeFunction_Evaluation Shape_Line4;
ShapeFunction_Evaluation Shape_Tri3;
ShapeFunction_Evaluation Shape_Tri6;
ShapeFunction_Evaluation Shape_Tri9;
ShapeFunction_Evaluation Shape_Tri10;
ShapeFunction_Evaluation Shape_Rec4;
ShapeFunction_Evaluation Shape_Rec8;
ShapeFunction_Evaluation Shape_Rec9;
ShapeFunction_Evaluation Shape_Rec12;
ShapeFunction_Evaluation Shape_Rec16;
ShapeFunction_Evaluation Shape_Tet4;
ShapeFunction_Evaluation Shape_Tet10;
ShapeFunction_Evaluation Shape_Tet16;
ShapeFunction_Evaluation Shape_Hex8;
ShapeFunction_Evaluation Shape_Hex20;
ShapeFunction_Evaluation Shape_Hex27;
ShapeFunction_Evaluation Shape_Hex32;
} // namespace finley
#endif // __FINLEY_SHAPEFUNCTIONS_H__
Finley.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::Shape_Rec16
ShapeFunction_Evaluation Shape_Rec16
Definition: ShapeFunctions.h:116
finley::ShapeFunction_Evaluation
void() ShapeFunction_Evaluation(int, std::vector< double > &, std::vector< double > &, std::vector< double > &)
Definition: ShapeFunctions.h:57
finley::Shape_Tet4
ShapeFunction_Evaluation Shape_Tet4
Definition: ShapeFunctions.h:117
finley::ShapeFunctionTypeId
ShapeFunctionTypeId
Definition: ShapeFunctions.h:32
finley::Rec12Shape
@ Rec12Shape
Definition: ShapeFunctions.h:44
finley::Point1Shape
@ Point1Shape
Definition: ShapeFunctions.h:33
finley::Rec4Shape
@ Rec4Shape
Definition: ShapeFunctions.h:41
finley::Rec8Shape
@ Rec8Shape
Definition: ShapeFunctions.h:42
finley::Tri3Shape
@ Tri3Shape
Definition: ShapeFunctions.h:37
finley::Line4Shape
@ Line4Shape
Definition: ShapeFunctions.h:36
finley::Tet4Shape
@ Tet4Shape
Definition: ShapeFunctions.h:46
finley::Hex20Shape
@ Hex20Shape
Definition: ShapeFunctions.h:50
finley::Hex27Shape
@ Hex27Shape
Definition: ShapeFunctions.h:51
finley::Tri6Shape
@ Tri6Shape
Definition: ShapeFunctions.h:38
finley::Line2Shape
@ Line2Shape
Definition: ShapeFunctions.h:34
finley::Rec9Shape
@ Rec9Shape
Definition: ShapeFunctions.h:43
finley::Hex32Shape
@ Hex32Shape
Definition: ShapeFunctions.h:52
finley::Tet16Shape
@ Tet16Shape
Definition: ShapeFunctions.h:48
finley::Tri10Shape
@ Tri10Shape
Definition: ShapeFunctions.h:40
finley::Tri9Shape
@ Tri9Shape
Definition: ShapeFunctions.h:39
finley::Hex8Shape
@ Hex8Shape
Definition: ShapeFunctions.h:49
finley::NoShape
@ NoShape
Definition: ShapeFunctions.h:53
finley::Tet10Shape
@ Tet10Shape
Definition: ShapeFunctions.h:47
finley::Line3Shape
@ Line3Shape
Definition: ShapeFunctions.h:35
finley::Rec16Shape
@ Rec16Shape
Definition: ShapeFunctions.h:45
finley::Shape_Hex32
ShapeFunction_Evaluation Shape_Hex32
Definition: ShapeFunctions.h:123
finley::Shape_Hex27
ShapeFunction_Evaluation Shape_Hex27
Definition: ShapeFunctions.h:122
finley::Shape_Tri3
ShapeFunction_Evaluation Shape_Tri3
Definition: ShapeFunctions.h:108
finley::Shape_Line4
ShapeFunction_Evaluation Shape_Line4
Definition: ShapeFunctions.h:107
finley::Shape_Hex8
ShapeFunction_Evaluation Shape_Hex8
Definition: ShapeFunctions.h:120
finley::const_ShapeFunction_ptr
boost::shared_ptr< const ShapeFunction > const_ShapeFunction_ptr
Definition: ShapeFunctions.h:102
finley::Shape_Hex20
ShapeFunction_Evaluation Shape_Hex20
Definition: ShapeFunctions.h:121
finley::Shape_Tri6
ShapeFunction_Evaluation Shape_Tri6
Definition: ShapeFunctions.h:109
finley::Shape_Point1
ShapeFunction_Evaluation Shape_Point1
Definition: ShapeFunctions.h:104
finley::Shape_Rec4
ShapeFunction_Evaluation Shape_Rec4
Definition: ShapeFunctions.h:112
finley::Shape_Line2
ShapeFunction_Evaluation Shape_Line2
Definition: ShapeFunctions.h:105
finley::Shape_Line3
ShapeFunction_Evaluation Shape_Line3
Definition: ShapeFunctions.h:106
finley::Shape_Tet10
ShapeFunction_Evaluation Shape_Tet10
Definition: ShapeFunctions.h:118
finley::Shape_Tri10
ShapeFunction_Evaluation Shape_Tri10
Definition: ShapeFunctions.h:111
finley::Shape_Rec8
ShapeFunction_Evaluation Shape_Rec8
Definition: ShapeFunctions.h:113
finley::Shape_Tet16
ShapeFunction_Evaluation Shape_Tet16
Definition: ShapeFunctions.h:119
finley::Shape_Tri9
ShapeFunction_Evaluation Shape_Tri9
Definition: ShapeFunctions.h:110
finley::Shape_Rec12
ShapeFunction_Evaluation Shape_Rec12
Definition: ShapeFunctions.h:115
finley::Shape_Rec9
ShapeFunction_Evaluation Shape_Rec9
Definition: ShapeFunctions.h:114
system_dep.h
finley::ShapeFunctionInfo
this struct holds the definition of the shape functions on an element
Definition: ShapeFunctions.h:60
finley::ShapeFunctionInfo::TypeId
ShapeFunctionTypeId TypeId
shape function type
Definition: ShapeFunctions.h:62
finley::ShapeFunctionInfo::Name
const char * Name
the name in text form e.g. "Line2", "Rec12", ...
Definition: ShapeFunctions.h:64
finley::ShapeFunctionInfo::numVertices
int numVertices
number of vertices of the element
Definition: ShapeFunctions.h:72
finley::ShapeFunctionInfo::getValues
ShapeFunction_Evaluation * getValues
function to evaluate the shape functions at a set of points
Definition: ShapeFunctions.h:74
finley::ShapeFunctionInfo::numOrder
int numOrder
order of the shape functions
Definition: ShapeFunctions.h:70
finley::ShapeFunctionInfo::numDim
int numDim
number of spatial dimensions
Definition: ShapeFunctions.h:66
finley::ShapeFunctionInfo::numShapes
int numShapes
number of shape functions
Definition: ShapeFunctions.h:68
finley::ShapeFunction
this struct holds the evaluation of a shape function on a quadrature scheme
Definition: ShapeFunctions.h:79
finley::ShapeFunction::QuadWeights
std::vector< double > QuadWeights
weights of the quadrature scheme
Definition: ShapeFunctions.h:95
finley::ShapeFunction::S
std::vector< double > S
shape functions at quadrature nodes
Definition: ShapeFunctions.h:97
finley::ShapeFunction::numQuadNodes
int numQuadNodes
number of quadrature points
Definition: ShapeFunctions.h:91
finley::ShapeFunction::Type
const ShapeFunctionInfo * Type
shape function information
Definition: ShapeFunctions.h:89
finley::ShapeFunction::dSdv
std::vector< double > dSdv
derivative of the shape functions at quadrature nodes
Definition: ShapeFunctions.h:99
finley::ShapeFunction::QuadNodes
std::vector< double > QuadNodes
coordinates of quadrature nodes
Definition: ShapeFunctions.h:93