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

Contents of /branches/domexper/dudley/src/ReferenceElements.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3210 - (show annotations)
Mon Sep 27 04:13:19 2010 UTC (8 years, 6 months ago) by jfenwick
File MIME type: text/plain
File size: 3920 byte(s)


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: Reference elements */
18
19 /**************************************************************/
20
21 #ifndef INC_DUDLEY_REFERENCEELEMENTS
22 #define INC_DUDLEY_REFERENCEELEMENTS
23
24
25 /**************************************************************/
26
27 #include "Dudley.h"
28 #include "ShapeFunctions.h"
29 #include "Quadrature.h"
30
31 /**************************************************************/
32
33 /* The ids of the allowed reference ellements: */
34
35 #define MAX_numNodes 64
36
37 typedef enum {
38 Point1=0,
39 Line2=1,
40 Tri3=2,
41 Tet4=3,
42 Line2Face=4,
43 Tri3Face=5,
44 Tet4Face=6,
45 NoRef=7 /* marks end of list */
46 } ElementTypeId;
47
48 /**************************************************************/
49
50 /* this struct holds the definition of the reference element: */
51
52 typedef struct Dudley_ReferenceElementInfo {
53 ElementTypeId TypeId; /* the id */
54 char* Name; /* the name in text form e.g. Line1,Rec12,... */
55 dim_t numNodes; /* number of nodes defining the element*/
56
57 Dudley_QuadTypeId Quadrature; /* quadrature scheme */
58 Dudley_ShapeFunctionTypeId BasisFunctions; /* shape function for the basis functions */
59
60 /*********************************************************************************************************************************** */
61
62 dim_t numNodesOnFace; /* if the element is allowed as a face element, numNodesOnFace defines the number of nodes defining the face */
63 /* the following lists are only used for face elements defined by numNodesOnFace>0 */
64
65 index_t shiftNodes[MAX_numNodes]; /* defines a permutation of the nodes which rotates the nodes on the face */
66 index_t reverseNodes[MAX_numNodes]; /* reverses the order of the nodes on a face. the permutation has keep 0 fixed. */
67 /* shiftNodes={-1} or reverseNodes={-1} are ignored. */
68 } Dudley_ReferenceElementInfo;
69
70
71 /**************************************************************/
72
73 /* this struct holds the realization of a reference element */
74
75 typedef struct Dudley_ReferenceElement {
76 Dudley_ReferenceElementInfo* Type; /* type of the reference element - dudley only supports linear elements*/
77 index_t reference_counter; /* reference counter */
78 dim_t integrationOrder; /* used integration order */
79 dim_t numNodes;
80 dim_t numLocalDim;
81 Dudley_ShapeFunction* BasisFunctions;
82 double* DBasisFunctionDv; /* pointer to derivatives to basis function corresponding to the Parametrization quad points */
83 bool_t DBasisFunctionDvShared; /* TRUE to indicate that DBasisFunctionDv is shared with another object which is managing it */
84
85 } Dudley_ReferenceElement;
86
87 /**************************************************************/
88
89 /* interfaces: */
90
91 Dudley_ReferenceElement* Dudley_ReferenceElement_alloc(ElementTypeId,int);
92 void Dudley_ReferenceElement_dealloc(Dudley_ReferenceElement*);
93 ElementTypeId Dudley_ReferenceElement_getTypeId(char*);
94 Dudley_ReferenceElement* Dudley_ReferenceElement_reference(Dudley_ReferenceElement* in);
95 Dudley_ReferenceElementInfo* Dudley_ReferenceElement_getInfo(ElementTypeId id);
96
97
98 #define Dudley_ReferenceElement_getNumNodes(__in__) (__in__)->Type->numNodes
99
100 #endif /* #ifndef INC_DUDLEY_REFERENCEELEMENTS */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26