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

Annotation of /branches/domexper/dudley/src/ShapeTable.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3254 - (hide annotations)
Thu Oct 7 06:33:09 2010 UTC (8 years, 6 months ago) by caltinay
File MIME type: text/plain
File size: 2718 byte(s)
Back to C90 since M$ still won't support mixed code and declarations.
This should be a no-op.

1 jfenwick 3184
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     /* Shape Function info
15     These tables are a much simplified version of content from finley's ShapeFunctions files
16    
17     This file is not to be included in .h files - only .c files should have any use for it
18     */
19    
20     #ifndef SHAPETABLE_DUDLEY
21     #define SHAPETABLE_DUDLEY
22    
23 jfenwick 3251 #include "esysUtils/types.h"
24 jfenwick 3196
25 jfenwick 3220 #include "ElementType.h"
26 jfenwick 3210
27 jfenwick 3251 /* These are constructed from dsdv in ShapeFunction.c in finley
28     The first two are just there for functions that want a pointer
29     */
30 jfenwick 3224 static const double DTDV_0D[1][1] = { {0} };
31     static const double DTDV_1D[2][2] = { {-1., 1}, {-1., 1.} };
32    
33 jfenwick 3251 /* The repetition here is a hack to prevent out of bounds access */
34 jfenwick 3224 static const double DTDV_2D[3 * 3][2] = { {-1, 1}, {0, -1.}, {0, 1},
35     {-1, 1}, {0, -1.}, {0, 1},
36     {-1, 1}, {0, -1.}, {0, 1}
37 jfenwick 3197 };
38 jfenwick 3224 static const double DTDV_3D[4][3] = { {-1, -1, -1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1} };
39 jfenwick 3197
40 caltinay 3254 /* Index by the following by Dudley_ElementTypeID
41     * The number of local dimensions (as opposed to dimension of the embedding space) */
42 jfenwick 3224 static const dim_t localDims[8] = { 0, 1, 2, 3, 0, 1, 2, 0 };
43     static const dim_t Dims[8] = { 0, 1, 2, 3, 1, 2, 3, 0 };
44 jfenwick 3197
45 jfenwick 3210 /* the following lists are only used for face elements defined by numNodesOnFace>0 */
46 jfenwick 3224 static const dim_t numNodesOnFaceMap[8] = { 1, 2, 3, 4, 1, 2, 4, -1 }; /* if the element is allowed as a face element, numNodesOnFace defines the number of nodes defining the face */
47     static const dim_t shiftNodesMap[8][4] = { {0}, {1, 0}, {1, 2, 0}, {-1}, {0, 1, 2}, {1, 0, 2}, {1, 2, 0, 3}, {0} }; /* defines a permutation of the nodes which rotates the nodes on the face */
48     static const dim_t reverseNodesMap[8][4] = { {-1}, {-1}, {0, 2, 1}, {-1}, {-1}, {-1}, {0, 2, 1, 3}, {0} }; /* reverses the order of the nodes on a face. the permutation has keep 0 fixed. */
49     /* shiftNodes={-1} or reverseNodes={-1} are ignored. */
50 jfenwick 3210
51 jfenwick 3251 /* [0] is reduced quadrature, [1] is full quadrature */
52     /* in order the positions are POINT, LINE, TRI, TET */
53 jfenwick 3224 static const double QuadWeight[4][2] = { {0, 0}, {1., 0.5}, {0.5, 1. / 6}, {1. / 6, 1. / 24} };
54 jfenwick 3184
55 jfenwick 3251 /* number of quadrature points per element */
56 jfenwick 3224 static const dim_t QuadNums[4][2] = { {0, 0}, {1, 2}, {1, 3}, {1, 4} };
57 jfenwick 3196
58 jfenwick 3251 /*shape functions at quadrature nodes */
59 jfenwick 3224 bool_t getQuadShape(dim_t sim, bool_t reduced, const double **shapearr);
60 jfenwick 3196
61 caltinay 3247 const char *getElementName(Dudley_ElementTypeId id);
62 jfenwick 3184
63 jfenwick 3224 #endif

  ViewVC Help
Powered by ViewVC 1.1.26