ESYS13  Revision_
ShapeTable.h
Go to the documentation of this file.
00001 
00002 /*******************************************************
00003 *
00004 * Copyright (c) 2003-2012 by University of Queensland
00005 * Earth Systems Science Computational Center (ESSCC)
00006 * http://www.uq.edu.au/esscc
00007 *
00008 * Primary Business: Queensland, Australia
00009 * Licensed under the Open Software License version 3.0
00010 * http://www.opensource.org/licenses/osl-3.0.php
00011 *
00012 *******************************************************/
00013 
00014 /* Shape Function info
00015 These tables are a much simplified version of content from finley's ShapeFunctions files
00016 
00017 This file is not to be included in .h files - only .c files should have any use for it
00018 */
00019 
00020 #ifndef SHAPETABLE_DUDLEY
00021 #define SHAPETABLE_DUDLEY
00022 
00023 #include "esysUtils/types.h"    
00024 
00025 #include "ElementType.h"
00026 
00027 /* These are constructed from dsdv in ShapeFunction.c in finley
00028    The first two are just there for functions that want a pointer
00029 */
00030 static const double DTDV_0D[1][1] = { {0} };
00031 static const double DTDV_1D[2][2] = { {-1., 1}, {-1., 1.} };
00032 
00033 /* The repetition here is a hack to prevent out of bounds access */
00034 static const double DTDV_2D[3 * 3][2] = { {-1, 1}, {0, -1.}, {0, 1},
00035 {-1, 1}, {0, -1.}, {0, 1},
00036 {-1, 1}, {0, -1.}, {0, 1}
00037 };
00038 static const double DTDV_3D[4][3] = { {-1, -1, -1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1} };
00039 
00040 /* Index by the following by Dudley_ElementTypeID
00041  * The number of local dimensions (as opposed to dimension of the embedding space) */
00042 static const dim_t localDims[8] = { 0, 1, 2, 3, 0, 1, 2, 0 };
00043 static const dim_t Dims[8] = { 0, 1, 2, 3, 1, 2, 3, 0 };
00044 
00045 /* the following lists are only used for face elements defined by numNodesOnFace>0 */
00046 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 */
00047 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 */
00048 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. */
00049                           /* shiftNodes={-1} or reverseNodes={-1} are ignored. */
00050 
00051 /* [0] is reduced quadrature, [1] is full quadrature */
00052 /* in order the positions are POINT, LINE, TRI, TET */
00053 static const double QuadWeight[4][2] = { {0, 0}, {1., 0.5}, {0.5, 1. / 6}, {1. / 6, 1. / 24} };
00054 
00055 /* number of quadrature points per element */
00056 static const dim_t QuadNums[4][2] = { {0, 0}, {1, 2}, {1, 3}, {1, 4} };
00057 
00058 /*shape functions at quadrature nodes */
00059 bool_t getQuadShape(dim_t sim, bool_t reduced, const double **shapearr);
00060 
00061 const char *getElementName(Dudley_ElementTypeId id);
00062 
00063 #endif