ESScript  Revision_4488
ShapeFunctions.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by 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 since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 
17 /************************************************************************************/
18 
19 /* Finley: Shape functions header file */
20 
21 /************************************************************************************/
22 
23 #ifndef INC_FINLEY_SHAPEFUNCTIONS
24 #define INC_FINLEY_SHAPEFUNCTIONS
25 
26 /************************************************************************************/
27 
28 #include "Finley.h"
29 
30 /************************************************************************************/
31 
32 #define S_INDEX(_J_,_I_,_NUMNODES_) INDEX2(_J_,_I_,_NUMNODES_)
33 #define DSDV_INDEX(_J_,_K_,_I_,_NUMNODES_,_DIM_) INDEX3(_J_,_K_,_I_,_NUMNODES_,_DIM_)
34 
35 
36 typedef enum {
57  NoShape /* marks end of list */
59 
60 /************************************************************************************/
61 
62 /* this struct holds the definition of the shape functions on an element: */
63 
64 typedef void (Finley_ShapeFunction_Evaluation) (dim_t,double*,double*,double*);
65 
66 typedef struct Finley_ShapeFunctionInfo {
67 
69  const char* Name; /* the name in text form e.g. Line1,Rec12,... */
70  dim_t numDim; /* spatial dimension */
71  dim_t numShapes; /* number of shape functions */
72  dim_t numOrder; /* order of the shape functions */
73  dim_t numVertices; /* number of vertices of the element */
74  Finley_ShapeFunction_Evaluation* getValues; /* function to evaluate the shape functions at a set of points */
76 
77 
78 /************************************************************************************/
79 
80 /* this struct holds the evaluation of a shape function on a quadrature scheme: */
81 
82 typedef struct Finley_ShapeFunction {
83  Finley_ShapeFunctionInfo* Type; /* type of the reference element */
84  int numQuadNodes; /* number of quadrature points */
85  double *QuadNodes; /* coordinates of quadrature nodes */
86  double *QuadWeights; /* weights of the quadrature scheme */
87  double *S; /* shape functions at quadrature nodes */
88  double *dSdv; /* derivative of the shape functions at quadrature nodes */
89  index_t reference_counter; /* reference counter */
91 
92 /************************************************************************************/
93 /* Interfaces: */
94 
115 
116 Finley_ShapeFunction* Finley_ShapeFunction_alloc(Finley_ShapeFunctionTypeId id,int numQuadDim, int numQuadNodes, double *QuadNodes, double *QuadWeights);
121 #endif /* #ifndef INC_FINLEY_SHAPEFUNCTIONS */