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

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

  ViewVC Help
Powered by ViewVC 1.1.26