/[escript]/branches/domexper/dudley/src/ShapeFunctions.h
ViewVC logotype

Contents of /branches/domexper/dudley/src/ShapeFunctions.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3114 - (show annotations)
Fri Aug 27 05:26:25 2010 UTC (9 years, 5 months ago) by jfenwick
File MIME type: text/plain
File size: 4594 byte(s)
It doesn't pass all tests but this is major progress

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 /* Dudley: Shape functions header file */
18
19 /**************************************************************/
20
21 #ifndef INC_DUDLEY_SHAPEFUNCTIONS
22 #define INC_DUDLEY_SHAPEFUNCTIONS
23
24 /**************************************************************/
25
26 #include "Dudley.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 /*
44 Rec4Shape,
45 Rec8Shape,
46 Rec9Shape,
47 Rec12Shape,
48 Rec16Shape,
49 */
50 Tet4Shape,
51 Tet10Shape,
52 Tet16Shape,
53 /*
54 Hex8Shape,
55 Hex20Shape,
56 Hex27Shape,
57 Hex32Shape,
58 */
59 NoShape /* marks end of list */
60 } Dudley_ShapeFunctionTypeId;
61
62 /**************************************************************/
63
64 /* this struct holds the definition of the shape functions on element: */
65
66 typedef void (Dudley_ShapeFunction_Evaluation) (dim_t,double*,double*,double*);
67
68 typedef struct Dudley_ShapeFunctionInfo {
69
70 Dudley_ShapeFunctionTypeId TypeId; /* the id */
71 char* Name; /* the name in text form e.g. Line1,Rec12,... */
72 dim_t numDim; /* spacial dimension */
73 dim_t numShapes; /* number of shape functions */
74 dim_t numOrder; /* order of the shape functions */
75 dim_t numVertices; /* number of vertices of the element */
76 Dudley_ShapeFunction_Evaluation* getValues; /* function to evaluate the shape functions at a set of points */
77 } Dudley_ShapeFunctionInfo;
78
79
80 /**************************************************************/
81
82 /* this struct holds the evaluation of a shape function on a quadrature scheme: */
83
84 typedef struct Dudley_ShapeFunction {
85 Dudley_ShapeFunctionInfo* Type; /* type of the reference element */
86 int numQuadNodes; /* number of quadrature points */
87 double *QuadNodes; /* coordinates of quadrature nodes */
88 double *QuadWeights; /* weights of the quadrature scheme */
89 double *S; /* shape functions at quadrature nodes */
90 double *dSdv; /* derivative of the shape functions at quadrature nodes */
91 index_t reference_counter; /* reference counter */
92 } Dudley_ShapeFunction;
93
94 /**************************************************************/
95 /* Interfaces: */
96
97 Dudley_ShapeFunction_Evaluation Dudley_Shape_Point1;
98 Dudley_ShapeFunction_Evaluation Dudley_Shape_Line2;
99 Dudley_ShapeFunction_Evaluation Dudley_Shape_Line3;
100 Dudley_ShapeFunction_Evaluation Dudley_Shape_Line4;
101 Dudley_ShapeFunction_Evaluation Dudley_Shape_Tri3;
102 Dudley_ShapeFunction_Evaluation Dudley_Shape_Tri6;
103 Dudley_ShapeFunction_Evaluation Dudley_Shape_Tri9;
104 Dudley_ShapeFunction_Evaluation Dudley_Shape_Tri10;
105 /*
106 Dudley_ShapeFunction_Evaluation Dudley_Shape_Rec4;
107 Dudley_ShapeFunction_Evaluation Dudley_Shape_Rec8;
108 Dudley_ShapeFunction_Evaluation Dudley_Shape_Rec9;
109 Dudley_ShapeFunction_Evaluation Dudley_Shape_Rec12;
110 Dudley_ShapeFunction_Evaluation Dudley_Shape_Rec16;
111 */
112 Dudley_ShapeFunction_Evaluation Dudley_Shape_Tet4;
113 Dudley_ShapeFunction_Evaluation Dudley_Shape_Tet10;
114 Dudley_ShapeFunction_Evaluation Dudley_Shape_Tet16;
115 /*
116 Dudley_ShapeFunction_Evaluation Dudley_Shape_Hex8;
117 Dudley_ShapeFunction_Evaluation Dudley_Shape_Hex20;
118 Dudley_ShapeFunction_Evaluation Dudley_Shape_Hex27;
119 Dudley_ShapeFunction_Evaluation Dudley_Shape_Hex32;
120 */
121
122 Dudley_ShapeFunction* Dudley_ShapeFunction_alloc(Dudley_ShapeFunctionTypeId id,int numQuadDim, int numQuadNodes, double *QuadNodes, double *QuadWeights);
123 void Dudley_ShapeFunction_dealloc(Dudley_ShapeFunction*);
124 Dudley_ShapeFunctionTypeId Dudley_ShapeFunction_getTypeId(char*);
125 Dudley_ShapeFunction* Dudley_ShapeFunction_reference(Dudley_ShapeFunction* in);
126 Dudley_ShapeFunctionInfo* Dudley_ShapeFunction_getInfo(Dudley_ShapeFunctionTypeId id);
127 #endif /* #ifndef INC_DUDLEY_SHAPEFUNCTIONS */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26