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

Contents of /branches/trilinos_from_5897/dudley/src/ShapeTable.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6079 - (show annotations)
Mon Mar 21 12:22:38 2016 UTC (2 years, 11 months ago) by caltinay
File MIME type: text/plain
File size: 2911 byte(s)
Big commit - making dudley much more like finley to make it more
managable. Fixed quite a few issues that had been fixed in finley.
Disposed of all ReducedNode/ReducedDOF entities that dudley never supported.
Compiles and passes tests.

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2016 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
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 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16
17 /* Shape Function info
18 These tables are a much simplified version of content from finley's ShapeFunctions files
19
20 This file is not to be included in .h files - only .cpp files should have any use for it
21 */
22
23 #ifndef __DUDLEY_SHAPETABLE_H__
24 #define __DUDLEY_SHAPETABLE_H__
25
26 #include "Dudley.h"
27 #include "ElementType.h"
28
29 namespace dudley {
30
31 // These are constructed from dsdv in ShapeFunction.cpp in finley.
32 // The first one is just there for functions that want a pointer
33 static const double DTDV_1D[2][2] = { {-1., 1}, {-1., 1.} };
34
35 // The repetition here is a hack to prevent out of bounds access
36 static const double DTDV_2D[3 * 3][2] = {
37 {-1, 1}, {0, -1.}, {0, 1},
38 {-1, 1}, {0, -1.}, {0, 1},
39 {-1, 1}, {0, -1.}, {0, 1}
40 };
41
42 static const double DTDV_3D[4][3] = {
43 {-1, -1, -1},
44 { 1, 0, 0},
45 { 0, 1, 0},
46 { 0, 0, 1}
47 };
48
49 // Index the following by ElementTypeID
50 // The number of local dimensions (as opposed to dimension of the embedding
51 // space)
52 static const int localDims[8] = { 0, 1, 2, 3, 0, 1, 2, 0 };
53 static const int Dims[8] = { 0, 1, 2, 3, 1, 2, 3, 0 };
54
55 // the following lists are only used for face elements defined by
56 // numNodesOnFace>0
57
58 // if the element is allowed as a face element, numNodesOnFace defines the
59 // number of nodes defining the face
60 static const int numNodesOnFaceMap[8] = { 1, 2, 3, 4, 1, 2, 4, -1 };
61
62 // defines a permutation of the nodes which rotates the nodes on the face
63 static const int shiftNodesMap[8][4] = { {0}, {1, 0}, {1, 2, 0}, {-1}, {0, 1, 2}, {1, 0, 2}, {1, 2, 0, 3}, {0} };
64
65 // reverses the order of the nodes on a face. the permutation has keep 0 fixed.
66 // shiftNodes={-1} or reverseNodes={-1} are ignored.
67 static const int reverseNodesMap[8][4] = { {-1}, {-1}, {0, 2, 1}, {-1}, {-1}, {-1}, {0, 2, 1, 3}, {0} };
68
69 // [0] is reduced quadrature, [1] is full quadrature
70 // in order the positions are POINT, LINE, TRI, TET
71 static const double QuadWeight[4][2] = { {0, 0}, {1., 0.5}, {0.5, 1. / 6}, {1. / 6, 1. / 24} };
72
73 // number of quadrature points per element
74 static const int QuadNums[4][2] = { {0, 0}, {1, 2}, {1, 3}, {1, 4} };
75
76 // shape functions at quadrature nodes
77 bool getQuadShape(dim_t sim, bool reduced, const double **shapearr);
78
79 const char* getElementName(ElementTypeId id);
80
81 } // namespace dudley
82
83 #endif // __DUDLEY_SHAPETABLE_H__
84

  ViewVC Help
Powered by ViewVC 1.1.26