/[escript]/trunk/finley/src/Quadrature.h
ViewVC logotype

Diff of /trunk/finley/src/Quadrature.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2748 by gross, Tue Nov 17 07:32:59 2009 UTC revision 4499 by caltinay, Tue Jul 16 05:42:19 2013 UTC
# Line 1  Line 1 
1    
2  /*******************************************************  /*****************************************************************************
3  *  *
4  * Copyright (c) 2003-2009 by University of Queensland  * Copyright (c) 2003-2013 by University of Queensland
5  * Earth Systems Science Computational Center (ESSCC)  * http://www.uq.edu.au
 * http://www.uq.edu.au/esscc  
6  *  *
7  * Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
8  * Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
9  * http://www.opensource.org/licenses/osl-3.0.php  * 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    
17  /*   Finley: integration schemes for element shapes Tri, Quad, Hex, Tet, Line, Point */  /****************************************************************************
18    
19  /**************************************************************/    Finley: integration schemes for element shapes Tri, Quad, Hex, Tet, Line,
20              Point
21    
22  #ifndef INC_FINLEY_QUADRATURE  *****************************************************************************/
 #define INC_FINLEY_QUADRATURE  
23    
24  /**************************************************************/  #ifndef __FINLEY_QUADRATURE_H__
25    #define __FINLEY_QUADRATURE_H__
26    
27  #include "Finley.h"  #include "Finley.h"
28    
 /**************************************************************/  
   
29  #define MAX_numQuadNodesLine 10  #define MAX_numQuadNodesLine 10
30    
31    namespace finley {
32    
33  typedef enum {  typedef enum {
34    PointQuad,      PointQuad,
35    LineQuad,      LineQuad,
36    TriQuad,      TriQuad,
37    RecQuad,      RecQuad,
38    TetQuad,      TetQuad,
39    HexQuad,      HexQuad,
40    NoQuad   /* marks end of list */      NoQuad   // marks end of list
41  } Finley_QuadTypeId;  } QuadTypeId;
42    
43  typedef void (Finley_Quad_getNodes) (dim_t,double*,double*);  typedef void (Quad_getNodes) (int, double*, double*);
44  typedef dim_t (Finley_Quad_getNumNodes) (dim_t);  typedef int (Quad_getNumNodes) (int);
45  typedef dim_t(Finley_Quad_getMacro)(dim_t numSubElements, int numQuadNodes, double* quadNodes, double* quadWeights,  typedef int (Quad_getMacro) (int numSubElements, int numQuadNodes,
46                                          dim_t numF, double* dFdv,                               const double* quadNodes,
47                      dim_t new_len, double* new_quadNodes, double* new_quadWeights,                               const double* quadWeights,
48                                          double* new_dFfv );                               int numF, const double* dFdv,
49                                 int new_len, double* new_quadNodes,
50  typedef struct Finley_QuadInfo {                               double* new_quadWeights, double* new_dFfv);
51    Finley_QuadTypeId TypeId;                  /* the id */  
52    char* Name;                                /* the name in text form e.g. Line,Rec,... */  struct QuadInfo {
53    dim_t numDim;                              /* spacial dimension */      /// quadrature type id
54    dim_t numVertices;                         /* number of vertices of the element */      QuadTypeId TypeId;
55    Finley_Quad_getNodes* getQuadNodes;        /* function to set the quadrature points for a given order */      /// the name in text form e.g. "Line", "Rec", ...
56    Finley_Quad_getNumNodes* getNumQuadNodes;  /* function selects the number of quadrature nodes for a given accuracy order */      const char* Name;
57    Finley_Quad_getMacro *getMacro;                /* transfers a given quadrature scheme to a macro element structure */      /// number of spatial dimensions
58  }  Finley_QuadInfo;      int numDim;
59        /// number of vertices of the element
60  /**************************************************************/      int numVertices;
61        /// function that returns the quadrature points for a given order
62  /*     Interfaces: */      Quad_getNodes* getQuadNodes;
63        /// function that returns the number of quadrature nodes for a given
64        /// accuracy order
65  Finley_Quad_getMacro Finley_Quad_MacroPoint;      Quad_getNumNodes* getNumQuadNodes;
66  Finley_Quad_getMacro Finley_Quad_MacroLine;      /// transfers a given quadrature scheme to a macro element structure
67  Finley_Quad_getMacro Finley_Quad_MacroTri;      Quad_getMacro *getMacro;
68  Finley_Quad_getMacro Finley_Quad_MacroRec;  };
69  Finley_Quad_getMacro Finley_Quad_MacroTet;  
70  Finley_Quad_getMacro Finley_Quad_MacroHex;  
71    /****** Interfaces ******/
72    
73  Finley_Quad_getNodes Finley_Quad_getNodesTri;  Quad_getMacro Quad_MacroPoint;
74  Finley_Quad_getNodes Finley_Quad_getNodesTet;  Quad_getMacro Quad_MacroLine;
75  Finley_Quad_getNodes Finley_Quad_getNodesRec;  Quad_getMacro Quad_MacroTri;
76  Finley_Quad_getNodes Finley_Quad_getNodesHex;  Quad_getMacro Quad_MacroRec;
77  Finley_Quad_getNodes Finley_Quad_getNodesLine;  Quad_getMacro Quad_MacroTet;
78  Finley_Quad_getNodes Finley_Quad_getNodesPoint;  Quad_getMacro Quad_MacroHex;
79  Finley_Quad_getNodes Finley_Quad_getNodesTriOnFace;  
80  Finley_Quad_getNodes Finley_Quad_getNodesRecOnFace;  Quad_getNodes Quad_getNodesTri;
81  Finley_Quad_getNodes Finley_Quad_getNodesLineOnFace;  Quad_getNodes Quad_getNodesTet;
82  Finley_Quad_getNodes Finley_Quad_getNodesPointOnFace;  Quad_getNodes Quad_getNodesRec;
83  Finley_Quad_getNodes Finley_Quad_getNodesTriMacro;  Quad_getNodes Quad_getNodesHex;
84  Finley_Quad_getNodes Finley_Quad_getNodesTetMacro;  Quad_getNodes Quad_getNodesLine;
85  Finley_Quad_getNodes Finley_Quad_getNodesRecMacro;  Quad_getNodes Quad_getNodesPoint;
86  Finley_Quad_getNodes Finley_Quad_getNodesHexMacro;  Quad_getNodes Quad_getNodesTriOnFace;
87  Finley_Quad_getNodes Finley_Quad_getNodesLineMacro;  Quad_getNodes Quad_getNodesRecOnFace;
88    Quad_getNodes Quad_getNodesLineOnFace;
89    Quad_getNodes Quad_getNodesPointOnFace;
90    Quad_getNodes Quad_getNodesTriMacro;
91  Finley_Quad_getNumNodes Finley_Quad_getNumNodesPoint;  Quad_getNodes Quad_getNodesTetMacro;
92  Finley_Quad_getNumNodes Finley_Quad_getNumNodesLine;  Quad_getNodes Quad_getNodesRecMacro;
93  Finley_Quad_getNumNodes Finley_Quad_getNumNodesTri;  Quad_getNodes Quad_getNodesHexMacro;
94  Finley_Quad_getNumNodes Finley_Quad_getNumNodesRec;  Quad_getNodes Quad_getNodesLineMacro;
95  Finley_Quad_getNumNodes Finley_Quad_getNumNodesTet;  
96  Finley_Quad_getNumNodes Finley_Quad_getNumNodesHex;  Quad_getNumNodes Quad_getNumNodesPoint;
97    Quad_getNumNodes Quad_getNumNodesLine;
98    Quad_getNumNodes Quad_getNumNodesTri;
99    Quad_getNumNodes Quad_getNumNodesRec;
100    Quad_getNumNodes Quad_getNumNodesTet;
101    Quad_getNumNodes Quad_getNumNodesHex;
102    
103    void Quad_makeNodesOnFace(int, int, double*, double*, Quad_getNodes);
104    const QuadInfo* QuadInfo_getInfo(QuadTypeId id);
105    
106  void Finley_Quad_makeNodesOnFace(dim_t, dim_t,double*,double*, Finley_Quad_getNodes);  } // namespace finley
 Finley_QuadInfo* Finley_QuadInfo_getInfo(Finley_QuadTypeId id);  
107    
108  #endif /* #ifndef INC_FINLEY_QUADRATURE */  #endif // __FINLEY_QUADRATURE_H__
109    

Legend:
Removed from v.2748  
changed lines
  Added in v.4499

  ViewVC Help
Powered by ViewVC 1.1.26