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

Legend:
Removed from v.3981  
changed lines
  Added in v.5097

  ViewVC Help
Powered by ViewVC 1.1.26