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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2881 - (show annotations)
Thu Jan 28 02:03:15 2010 UTC (9 years, 10 months ago) by jfenwick
File MIME type: text/plain
File size: 4570 byte(s)
Don't panic.
Updating copyright stamps

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2010 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 /**************************************************************/
16
17 /* Finley: Shape functions header file */
18
19 /**************************************************************/
20
21 #ifndef INC_FINLEY_SHAPEFUNCTIONS
22 #define INC_FINLEY_SHAPEFUNCTIONS
23
24 /**************************************************************/
25
26 #include "Finley.h"
27
28 /**************************************************************/
29
30 #define S_INDEX(_J_,_I_,_NUMNODES_) INDEX2(_J_,_I_,_NUMNODES_)
31 #define DSDV_INDEX(_J_,_K_,_I_,_NUMNODES_,_DIM_) INDEX3(_J_,_K_,_I_,_NUMNODES_,_DIM_)
32
33
34 typedef enum {
35 Point1Shape,
36 Line2Shape,
37 Line3Shape,
38 Line4Shape,
39 Tri3Shape,
40 Tri6Shape,
41 Tri9Shape,
42 Tri10Shape,
43 Rec4Shape,
44 Rec8Shape,
45 Rec9Shape,
46 Rec12Shape,
47 Rec16Shape,
48 Tet4Shape,
49 Tet10Shape,
50 Tet16Shape,
51 Hex8Shape,
52 Hex20Shape,
53 Hex27Shape,
54 Hex32Shape,
55 NoShape /* marks end of list */
56 } Finley_ShapeFunctionTypeId;
57
58 /**************************************************************/
59
60 /* this struct holds the definition of the shape functions on element: */
61
62 typedef void (Finley_ShapeFunction_Evaluation) (dim_t,double*,double*,double*);
63
64 typedef struct Finley_ShapeFunctionInfo {
65
66 Finley_ShapeFunctionTypeId TypeId; /* the id */
67 char* Name; /* the name in text form e.g. Line1,Rec12,... */
68 dim_t numDim; /* spacial dimension */
69 dim_t numShapes; /* number of shape functions */
70 dim_t numOrder; /* order of the shape functions */
71 dim_t numVertices; /* number of vertices of the element */
72 Finley_ShapeFunction_Evaluation* getValues; /* function to evaluate the shape functions at a set of points */
73 } Finley_ShapeFunctionInfo;
74
75
76 /**************************************************************/
77
78 /* this struct holds the evaluation of a shape function on a quadrature scheme: */
79
80 typedef struct Finley_ShapeFunction {
81 Finley_ShapeFunctionInfo* Type; /* type of the reference element */
82 int numQuadNodes; /* number of quadrature points */
83 double *QuadNodes; /* coordinates of quadrature nodes */
84 double *QuadWeights; /* weights of the quadrature scheme */
85 double *S; /* shape functions at quadrature nodes */
86 double *dSdv; /* derivative of the shape functions at quadrature nodes */
87 index_t reference_counter; /* reference counter */
88 } Finley_ShapeFunction;
89
90 /**************************************************************/
91 /* Interfaces: */
92
93 Finley_ShapeFunction_Evaluation Finley_Shape_Point1;
94 Finley_ShapeFunction_Evaluation Finley_Shape_Line2;
95 Finley_ShapeFunction_Evaluation Finley_Shape_Line3;
96 Finley_ShapeFunction_Evaluation Finley_Shape_Line4;
97 Finley_ShapeFunction_Evaluation Finley_Shape_Tri3;
98 Finley_ShapeFunction_Evaluation Finley_Shape_Tri6;
99 Finley_ShapeFunction_Evaluation Finley_Shape_Tri9;
100 Finley_ShapeFunction_Evaluation Finley_Shape_Tri10;
101 Finley_ShapeFunction_Evaluation Finley_Shape_Rec4;
102 Finley_ShapeFunction_Evaluation Finley_Shape_Rec8;
103 Finley_ShapeFunction_Evaluation Finley_Shape_Rec9;
104 Finley_ShapeFunction_Evaluation Finley_Shape_Rec12;
105 Finley_ShapeFunction_Evaluation Finley_Shape_Rec16;
106 Finley_ShapeFunction_Evaluation Finley_Shape_Tet4;
107 Finley_ShapeFunction_Evaluation Finley_Shape_Tet10;
108 Finley_ShapeFunction_Evaluation Finley_Shape_Tet16;
109 Finley_ShapeFunction_Evaluation Finley_Shape_Hex8;
110 Finley_ShapeFunction_Evaluation Finley_Shape_Hex20;
111 Finley_ShapeFunction_Evaluation Finley_Shape_Hex27;
112 Finley_ShapeFunction_Evaluation Finley_Shape_Hex32;
113
114 Finley_ShapeFunction* Finley_ShapeFunction_alloc(Finley_ShapeFunctionTypeId id,int numQuadDim, int numQuadNodes, double *QuadNodes, double *QuadWeights);
115 void Finley_ShapeFunction_dealloc(Finley_ShapeFunction*);
116 Finley_ShapeFunctionTypeId Finley_ShapeFunction_getTypeId(char*);
117 Finley_ShapeFunction* Finley_ShapeFunction_reference(Finley_ShapeFunction* in);
118 Finley_ShapeFunctionInfo* Finley_ShapeFunction_getInfo(Finley_ShapeFunctionTypeId id);
119 #endif /* #ifndef INC_FINLEY_SHAPEFUNCTIONS */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26