/[escript]/trunk/finley/src/ShapeFunctions.h
ViewVC logotype

Contents of /trunk/finley/src/ShapeFunctions.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6939 - (show annotations)
Mon Jan 20 03:37:18 2020 UTC (4 months, 1 week ago) by uqaeller
File MIME type: text/plain
File size: 3788 byte(s)
Updated the copyright header.


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

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26