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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (hide annotations)
Wed Feb 7 02:12:08 2018 UTC (20 months, 1 week ago) by jfenwick
File MIME type: text/plain
File size: 3712 byte(s)
Make everyone sad by touching all the files

Copyright dates update

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26