ESScript  Revision_
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 #ifndef __FINLEY_SHAPEFUNCTIONS_H__
17 #define __FINLEY_SHAPEFUNCTIONS_H__
18 
19 #include "Finley.h"
20 
21 #include <boost/shared_ptr.hpp>
22 
23 #define S_INDEX(_J_,_I_,_NUMNODES_) INDEX2(_J_,_I_,_NUMNODES_)
24 #define DSDV_INDEX(_J_,_K_,_I_,_NUMNODES_,_DIM_) INDEX3(_J_,_K_,_I_,_NUMNODES_,_DIM_)
25 
26 namespace finley {
27 
28 typedef enum {
49  NoShape // marks end of list
51 
52 
53 typedef void (ShapeFunction_Evaluation) (int, double*, double*, double*);
54 
60  const char* Name;
62  int numDim;
64  int numShapes;
66  int numOrder;
71 };
72 
73 
75 struct ShapeFunction {
76  ShapeFunction(ShapeFunctionTypeId id, int numQuadDim, int numQuadNodes,
77  const std::vector<double>& QuadNodes,
78  const std::vector<double>& QuadWeights);
79 
80  ShapeFunctionTypeId getTypeId(const char*);
81 
83 
89  std::vector<double> QuadNodes;
91  std::vector<double> QuadWeights;
93  std::vector<double> S;
95  std::vector<double> dSdv;
96 };
97 
98 typedef boost::shared_ptr<const ShapeFunction> const_ShapeFunction_ptr;
99 
120 
121 } // namespace finley
122 
123 #endif // __FINLEY_SHAPEFUNCTIONS_H__
124