ESYS13
Revision_
|
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 00015 /**************************************************************/ 00016 00017 /* Finley: Shape functions header file */ 00018 00019 /**************************************************************/ 00020 00021 #ifndef INC_FINLEY_SHAPEFUNCTIONS 00022 #define INC_FINLEY_SHAPEFUNCTIONS 00023 00024 /**************************************************************/ 00025 00026 #include "Finley.h" 00027 00028 /**************************************************************/ 00029 00030 #define S_INDEX(_J_,_I_,_NUMNODES_) INDEX2(_J_,_I_,_NUMNODES_) 00031 #define DSDV_INDEX(_J_,_K_,_I_,_NUMNODES_,_DIM_) INDEX3(_J_,_K_,_I_,_NUMNODES_,_DIM_) 00032 00033 00034 typedef enum { 00035 Point1Shape, 00036 Line2Shape, 00037 Line3Shape, 00038 Line4Shape, 00039 Tri3Shape, 00040 Tri6Shape, 00041 Tri9Shape, 00042 Tri10Shape, 00043 Rec4Shape, 00044 Rec8Shape, 00045 Rec9Shape, 00046 Rec12Shape, 00047 Rec16Shape, 00048 Tet4Shape, 00049 Tet10Shape, 00050 Tet16Shape, 00051 Hex8Shape, 00052 Hex20Shape, 00053 Hex27Shape, 00054 Hex32Shape, 00055 NoShape /* marks end of list */ 00056 } Finley_ShapeFunctionTypeId; 00057 00058 /**************************************************************/ 00059 00060 /* this struct holds the definition of the shape functions on an element: */ 00061 00062 typedef void (Finley_ShapeFunction_Evaluation) (dim_t,double*,double*,double*); 00063 00064 typedef struct Finley_ShapeFunctionInfo { 00065 00066 Finley_ShapeFunctionTypeId TypeId; /* the id */ 00067 char* Name; /* the name in text form e.g. Line1,Rec12,... */ 00068 dim_t numDim; /* spatial dimension */ 00069 dim_t numShapes; /* number of shape functions */ 00070 dim_t numOrder; /* order of the shape functions */ 00071 dim_t numVertices; /* number of vertices of the element */ 00072 Finley_ShapeFunction_Evaluation* getValues; /* function to evaluate the shape functions at a set of points */ 00073 } Finley_ShapeFunctionInfo; 00074 00075 00076 /**************************************************************/ 00077 00078 /* this struct holds the evaluation of a shape function on a quadrature scheme: */ 00079 00080 typedef struct Finley_ShapeFunction { 00081 Finley_ShapeFunctionInfo* Type; /* type of the reference element */ 00082 int numQuadNodes; /* number of quadrature points */ 00083 double *QuadNodes; /* coordinates of quadrature nodes */ 00084 double *QuadWeights; /* weights of the quadrature scheme */ 00085 double *S; /* shape functions at quadrature nodes */ 00086 double *dSdv; /* derivative of the shape functions at quadrature nodes */ 00087 index_t reference_counter; /* reference counter */ 00088 } Finley_ShapeFunction; 00089 00090 /**************************************************************/ 00091 /* Interfaces: */ 00092 00093 Finley_ShapeFunction_Evaluation Finley_Shape_Point1; 00094 Finley_ShapeFunction_Evaluation Finley_Shape_Line2; 00095 Finley_ShapeFunction_Evaluation Finley_Shape_Line3; 00096 Finley_ShapeFunction_Evaluation Finley_Shape_Line4; 00097 Finley_ShapeFunction_Evaluation Finley_Shape_Tri3; 00098 Finley_ShapeFunction_Evaluation Finley_Shape_Tri6; 00099 Finley_ShapeFunction_Evaluation Finley_Shape_Tri9; 00100 Finley_ShapeFunction_Evaluation Finley_Shape_Tri10; 00101 Finley_ShapeFunction_Evaluation Finley_Shape_Rec4; 00102 Finley_ShapeFunction_Evaluation Finley_Shape_Rec8; 00103 Finley_ShapeFunction_Evaluation Finley_Shape_Rec9; 00104 Finley_ShapeFunction_Evaluation Finley_Shape_Rec12; 00105 Finley_ShapeFunction_Evaluation Finley_Shape_Rec16; 00106 Finley_ShapeFunction_Evaluation Finley_Shape_Tet4; 00107 Finley_ShapeFunction_Evaluation Finley_Shape_Tet10; 00108 Finley_ShapeFunction_Evaluation Finley_Shape_Tet16; 00109 Finley_ShapeFunction_Evaluation Finley_Shape_Hex8; 00110 Finley_ShapeFunction_Evaluation Finley_Shape_Hex20; 00111 Finley_ShapeFunction_Evaluation Finley_Shape_Hex27; 00112 Finley_ShapeFunction_Evaluation Finley_Shape_Hex32; 00113 00114 Finley_ShapeFunction* Finley_ShapeFunction_alloc(Finley_ShapeFunctionTypeId id,int numQuadDim, int numQuadNodes, double *QuadNodes, double *QuadWeights); 00115 void Finley_ShapeFunction_dealloc(Finley_ShapeFunction*); 00116 Finley_ShapeFunctionTypeId Finley_ShapeFunction_getTypeId(char*); 00117 Finley_ShapeFunction* Finley_ShapeFunction_reference(Finley_ShapeFunction* in); 00118 Finley_ShapeFunctionInfo* Finley_ShapeFunction_getInfo(Finley_ShapeFunctionTypeId id); 00119 #endif /* #ifndef INC_FINLEY_SHAPEFUNCTIONS */