escript Revision_
ShapeFunctions.h
Go to the documentation of this file.
1
2/*****************************************************************************
3*
4* Copyright (c) 2003-2020 by The University of Queensland
5* http://www.uq.edu.au
6*
7* Primary Business: Queensland, Australia
8* Licensed under the Apache License, version 2.0
9* http://www.apache.org/licenses/LICENSE-2.0
10*
11* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12* Development 2012-2013 by School of Earth Sciences
13* Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
14* Development from 2019 by School of Earth and Environmental Sciences
15**
16*****************************************************************************/
17
18#ifndef __FINLEY_SHAPEFUNCTIONS_H__
19#define __FINLEY_SHAPEFUNCTIONS_H__
20
21#include "system_dep.h"
22
23#include "Finley.h"
24
25#include <boost/shared_ptr.hpp>
26
27#define S_INDEX(_J_,_I_,_NUMNODES_) INDEX2(_J_,_I_,_NUMNODES_)
28#define DSDV_INDEX(_J_,_K_,_I_,_NUMNODES_,_DIM_) INDEX3(_J_,_K_,_I_,_NUMNODES_,_DIM_)
29
30namespace finley {
31
55
56
57typedef void (ShapeFunction_Evaluation) (int, std::vector<double>&, std::vector<double>&, std::vector<double>&);
58
76
77
80 ShapeFunction(ShapeFunctionTypeId id, int numQuadDim, int numQuadNodes,
81 const std::vector<double>& QuadNodes,
82 const std::vector<double>& QuadWeights);
83
84 ShapeFunctionTypeId getTypeId(const char*);
85
86 static const ShapeFunctionInfo* getInfo(ShapeFunctionTypeId id);
87
93 std::vector<double> QuadNodes;
95 std::vector<double> QuadWeights;
97 std::vector<double> S;
99 std::vector<double> dSdv;
100};
101
102typedef boost::shared_ptr<const ShapeFunction> const_ShapeFunction_ptr;
103
124
125} // namespace finley
126
127#endif // __FINLEY_SHAPEFUNCTIONS_H__
128
#define FINLEY_DLL_API
Definition finley/src/system_dep.h:29
A suite of factory methods for creating various finley domains.
Definition finley/src/Assemble.h:32
ShapeFunction_Evaluation Shape_Rec16
Definition ShapeFunctions.h:116
ShapeFunction_Evaluation Shape_Tet4
Definition ShapeFunctions.h:117
ShapeFunctionTypeId
Definition ShapeFunctions.h:32
@ Rec12Shape
Definition ShapeFunctions.h:44
@ Point1Shape
Definition ShapeFunctions.h:33
@ Rec4Shape
Definition ShapeFunctions.h:41
@ Rec8Shape
Definition ShapeFunctions.h:42
@ Tri3Shape
Definition ShapeFunctions.h:37
@ Line4Shape
Definition ShapeFunctions.h:36
@ Tet4Shape
Definition ShapeFunctions.h:46
@ Hex20Shape
Definition ShapeFunctions.h:50
@ Hex27Shape
Definition ShapeFunctions.h:51
@ Tri6Shape
Definition ShapeFunctions.h:38
@ Line2Shape
Definition ShapeFunctions.h:34
@ Rec9Shape
Definition ShapeFunctions.h:43
@ Hex32Shape
Definition ShapeFunctions.h:52
@ Tet16Shape
Definition ShapeFunctions.h:48
@ Tri10Shape
Definition ShapeFunctions.h:40
@ Tri9Shape
Definition ShapeFunctions.h:39
@ Hex8Shape
Definition ShapeFunctions.h:49
@ NoShape
Definition ShapeFunctions.h:53
@ Tet10Shape
Definition ShapeFunctions.h:47
@ Line3Shape
Definition ShapeFunctions.h:35
@ Rec16Shape
Definition ShapeFunctions.h:45
void ShapeFunction_Evaluation(int, std::vector< double > &, std::vector< double > &, std::vector< double > &)
Definition ShapeFunctions.h:57
ShapeFunction_Evaluation Shape_Hex32
Definition ShapeFunctions.h:123
ShapeFunction_Evaluation Shape_Hex27
Definition ShapeFunctions.h:122
ShapeFunction_Evaluation Shape_Tri3
Definition ShapeFunctions.h:108
ShapeFunction_Evaluation Shape_Line4
Definition ShapeFunctions.h:107
ShapeFunction_Evaluation Shape_Hex8
Definition ShapeFunctions.h:120
boost::shared_ptr< const ShapeFunction > const_ShapeFunction_ptr
Definition ShapeFunctions.h:102
ShapeFunction_Evaluation Shape_Hex20
Definition ShapeFunctions.h:121
ShapeFunction_Evaluation Shape_Tri6
Definition ShapeFunctions.h:109
ShapeFunction_Evaluation Shape_Point1
Definition ShapeFunctions.h:104
ShapeFunction_Evaluation Shape_Rec4
Definition ShapeFunctions.h:112
ShapeFunction_Evaluation Shape_Line2
Definition ShapeFunctions.h:105
ShapeFunction_Evaluation Shape_Line3
Definition ShapeFunctions.h:106
ShapeFunction_Evaluation Shape_Tet10
Definition ShapeFunctions.h:118
ShapeFunction_Evaluation Shape_Tri10
Definition ShapeFunctions.h:111
ShapeFunction_Evaluation Shape_Rec8
Definition ShapeFunctions.h:113
ShapeFunction_Evaluation Shape_Tet16
Definition ShapeFunctions.h:119
ShapeFunction_Evaluation Shape_Tri9
Definition ShapeFunctions.h:110
ShapeFunction_Evaluation Shape_Rec12
Definition ShapeFunctions.h:115
ShapeFunction_Evaluation Shape_Rec9
Definition ShapeFunctions.h:114
this struct holds the definition of the shape functions on an element
Definition ShapeFunctions.h:60
ShapeFunctionTypeId TypeId
shape function type
Definition ShapeFunctions.h:62
const char * Name
the name in text form e.g. "Line2", "Rec12", ...
Definition ShapeFunctions.h:64
int numVertices
number of vertices of the element
Definition ShapeFunctions.h:72
ShapeFunction_Evaluation * getValues
function to evaluate the shape functions at a set of points
Definition ShapeFunctions.h:74
int numOrder
order of the shape functions
Definition ShapeFunctions.h:70
int numDim
number of spatial dimensions
Definition ShapeFunctions.h:66
int numShapes
number of shape functions
Definition ShapeFunctions.h:68
this struct holds the evaluation of a shape function on a quadrature scheme
Definition ShapeFunctions.h:79
std::vector< double > QuadWeights
weights of the quadrature scheme
Definition ShapeFunctions.h:95
std::vector< double > S
shape functions at quadrature nodes
Definition ShapeFunctions.h:97
int numQuadNodes
number of quadrature points
Definition ShapeFunctions.h:91
const ShapeFunctionInfo * Type
shape function information
Definition ShapeFunctions.h:89
std::vector< double > dSdv
derivative of the shape functions at quadrature nodes
Definition ShapeFunctions.h:99
std::vector< double > QuadNodes
coordinates of quadrature nodes
Definition ShapeFunctions.h:93