escript
Revision_
|
00001 00002 /***************************************************************************** 00003 * 00004 * Copyright (c) 2003-2014 by University of Queensland 00005 * http://www.uq.edu.au 00006 * 00007 * Primary Business: Queensland, Australia 00008 * Licensed under the Open Software License version 3.0 00009 * http://www.opensource.org/licenses/osl-3.0.php 00010 * 00011 * Development until 2012 by Earth Systems Science Computational Center (ESSCC) 00012 * Development 2012-2013 by School of Earth Sciences 00013 * Development from 2014 by Centre for Geoscience Computing (GeoComp) 00014 * 00015 *****************************************************************************/ 00016 00017 #ifndef __FINLEY_SHAPEFUNCTIONS_H__ 00018 #define __FINLEY_SHAPEFUNCTIONS_H__ 00019 00020 #include "Finley.h" 00021 00022 #include <boost/shared_ptr.hpp> 00023 00024 #define S_INDEX(_J_,_I_,_NUMNODES_) INDEX2(_J_,_I_,_NUMNODES_) 00025 #define DSDV_INDEX(_J_,_K_,_I_,_NUMNODES_,_DIM_) INDEX3(_J_,_K_,_I_,_NUMNODES_,_DIM_) 00026 00027 namespace finley { 00028 00029 typedef enum { 00030 Point1Shape, 00031 Line2Shape, 00032 Line3Shape, 00033 Line4Shape, 00034 Tri3Shape, 00035 Tri6Shape, 00036 Tri9Shape, 00037 Tri10Shape, 00038 Rec4Shape, 00039 Rec8Shape, 00040 Rec9Shape, 00041 Rec12Shape, 00042 Rec16Shape, 00043 Tet4Shape, 00044 Tet10Shape, 00045 Tet16Shape, 00046 Hex8Shape, 00047 Hex20Shape, 00048 Hex27Shape, 00049 Hex32Shape, 00050 NoShape // marks end of list 00051 } ShapeFunctionTypeId; 00052 00053 00054 typedef void (ShapeFunction_Evaluation) (int, double*, double*, double*); 00055 00057 struct ShapeFunctionInfo { 00059 ShapeFunctionTypeId TypeId; 00061 const char* Name; 00063 int numDim; 00065 int numShapes; 00067 int numOrder; 00069 int numVertices; 00071 ShapeFunction_Evaluation* getValues; 00072 }; 00073 00074 00076 struct ShapeFunction { 00077 ShapeFunction(ShapeFunctionTypeId id, int numQuadDim, int numQuadNodes, 00078 const std::vector<double>& QuadNodes, 00079 const std::vector<double>& QuadWeights); 00080 00081 ShapeFunctionTypeId getTypeId(const char*); 00082 00083 static const ShapeFunctionInfo* getInfo(ShapeFunctionTypeId id); 00084 00086 const ShapeFunctionInfo* Type; 00088 int numQuadNodes; 00090 std::vector<double> QuadNodes; 00092 std::vector<double> QuadWeights; 00094 std::vector<double> S; 00096 std::vector<double> dSdv; 00097 }; 00098 00099 typedef boost::shared_ptr<const ShapeFunction> const_ShapeFunction_ptr; 00100 00101 ShapeFunction_Evaluation Shape_Point1; 00102 ShapeFunction_Evaluation Shape_Line2; 00103 ShapeFunction_Evaluation Shape_Line3; 00104 ShapeFunction_Evaluation Shape_Line4; 00105 ShapeFunction_Evaluation Shape_Tri3; 00106 ShapeFunction_Evaluation Shape_Tri6; 00107 ShapeFunction_Evaluation Shape_Tri9; 00108 ShapeFunction_Evaluation Shape_Tri10; 00109 ShapeFunction_Evaluation Shape_Rec4; 00110 ShapeFunction_Evaluation Shape_Rec8; 00111 ShapeFunction_Evaluation Shape_Rec9; 00112 ShapeFunction_Evaluation Shape_Rec12; 00113 ShapeFunction_Evaluation Shape_Rec16; 00114 ShapeFunction_Evaluation Shape_Tet4; 00115 ShapeFunction_Evaluation Shape_Tet10; 00116 ShapeFunction_Evaluation Shape_Tet16; 00117 ShapeFunction_Evaluation Shape_Hex8; 00118 ShapeFunction_Evaluation Shape_Hex20; 00119 ShapeFunction_Evaluation Shape_Hex27; 00120 ShapeFunction_Evaluation Shape_Hex32; 00121 00122 } // namespace finley 00123 00124 #endif // __FINLEY_SHAPEFUNCTIONS_H__ 00125