/[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 3157 - (show annotations)
Mon Sep 6 05:10:18 2010 UTC (8 years, 7 months ago) by jfenwick
File MIME type: text/plain
File size: 3319 byte(s)
hacking
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 Tri3Shape,
38 Tet4Shape,
39 NoShape /* marks end of list */
40 } Dudley_ShapeFunctionTypeId;
41
42 /**************************************************************/
43
44 /* this struct holds the definition of the shape functions on element: */
45
46 typedef void (Dudley_ShapeFunction_Evaluation) (dim_t,double*,double*,double*);
47
48 typedef struct Dudley_ShapeFunctionInfo {
49
50 Dudley_ShapeFunctionTypeId TypeId; /* the id */
51 char* Name; /* the name in text form e.g. Line1,Rec12,... */
52 dim_t numDim; /* spacial dimension */
53 dim_t numShapes; /* number of shape functions */
54 dim_t numOrder; /* order of the shape functions */
55 dim_t numVertices; /* number of vertices of the element */
56 Dudley_ShapeFunction_Evaluation* getValues; /* function to evaluate the shape functions at a set of points */
57 } Dudley_ShapeFunctionInfo;
58
59
60 /**************************************************************/
61
62 /* this struct holds the evaluation of a shape function on a quadrature scheme: */
63
64 typedef struct Dudley_ShapeFunction {
65 Dudley_ShapeFunctionInfo* Type; /* type of the reference element */
66 int numQuadNodes; /* number of quadrature points */
67 double *QuadNodes; /* coordinates of quadrature nodes */
68 double *QuadWeights; /* weights of the quadrature scheme */
69 double *S; /* shape functions at quadrature nodes */
70 double *dSdv; /* derivative of the shape functions at quadrature nodes */
71 index_t reference_counter; /* reference counter */
72 } Dudley_ShapeFunction;
73
74 /**************************************************************/
75 /* Interfaces: */
76
77
78 Dudley_ShapeFunction* Dudley_ShapeFunction_alloc(Dudley_ShapeFunctionTypeId id,int numQuadDim, int numQuadNodes, double *QuadNodes, double *QuadWeights);
79 void Dudley_ShapeFunction_dealloc(Dudley_ShapeFunction*);
80 Dudley_ShapeFunctionTypeId Dudley_ShapeFunction_getTypeId(char*);
81 Dudley_ShapeFunction* Dudley_ShapeFunction_reference(Dudley_ShapeFunction* in);
82 Dudley_ShapeFunctionInfo* Dudley_ShapeFunction_getInfo(Dudley_ShapeFunctionTypeId id);
83 #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