GemaCoreLib
The GeMA Core library
gmHexIntegrationRule.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
26 #ifndef _GEMA_HEX_INT_RULE_H_
27 #define _GEMA_HEX_INT_RULE_H_
28 
29 #include "gmIntegrationRule.h"
31 #include "gmBarIntegrationRule.h" // Needed by edge rules
32 #include "gmQuadIntegrationRule.h" // Needed by face rules
33 
37 
38 //--------------------------------------------------------
39 // Element rules
40 //--------------------------------------------------------
41 
42 
45 {
46 public:
51  GmHexGaussIntegrationRule(int xiRule, int etaRule, int zetaRule)
53  xiRule, GmGaussIntegrationTables::lineRuleTable(xiRule), GmGaussIntegrationTables::lineRuleDegree(xiRule),
54  etaRule, GmGaussIntegrationTables::lineRuleTable(etaRule), GmGaussIntegrationTables::lineRuleDegree(etaRule),
55  zetaRule, GmGaussIntegrationTables::lineRuleTable(zetaRule), GmGaussIntegrationTables::lineRuleDegree(zetaRule))
56  {
57  }
58 
60  GmHexGaussIntegrationRule(GmIntegrationRuleType irType, int rule1, int rule2, int rule3)
61  : GmHexGaussIntegrationRule(rule1, rule2, rule3)
62  {
63  assert(irType == GM_GAUSS_RULE_TYPE); Q_UNUSED(irType);
64  }
65 };
66 
69 {
70 public:
75  GmHexNewtonIntegrationRule(int xiRule, int etaRule, int zetaRule, bool closed)
77  xiRule, GmNewtonIntegrationTables::lineRuleTable(xiRule, closed), GmNewtonIntegrationTables::lineRuleDegree(xiRule),
78  etaRule, GmNewtonIntegrationTables::lineRuleTable(etaRule, closed), GmNewtonIntegrationTables::lineRuleDegree(etaRule),
79  zetaRule, GmNewtonIntegrationTables::lineRuleTable(zetaRule, closed), GmNewtonIntegrationTables::lineRuleDegree(zetaRule))
80  {
81  }
82 
84  GmHexNewtonIntegrationRule(GmIntegrationRuleType irType, int rule1, int rule2, int rule3)
85  : GmHexNewtonIntegrationRule(rule1, rule2, rule3, irType == GM_CLOSED_NEWTON_RULE_TYPE)
86  {
87  assert(irType == GM_CLOSED_NEWTON_RULE_TYPE || irType == GM_OPEN_NEWTON_RULE_TYPE);
88  }
89 };
90 
93 {
94 public:
99  GmHexLobattoIntegrationRule(int xiRule, int etaRule, int zetaRule)
101  xiRule, GmLobattoIntegrationTables::lineRuleTable(xiRule), GmLobattoIntegrationTables::lineRuleDegree(xiRule),
102  etaRule, GmLobattoIntegrationTables::lineRuleTable(etaRule), GmLobattoIntegrationTables::lineRuleDegree(etaRule),
103  zetaRule, GmLobattoIntegrationTables::lineRuleTable(zetaRule), GmLobattoIntegrationTables::lineRuleDegree(zetaRule))
104  {
105  }
106 
108  GmHexLobattoIntegrationRule(GmIntegrationRuleType irType, int rule1, int rule2, int rule3)
109  : GmHexLobattoIntegrationRule(rule1, rule2, rule3)
110  {
111  assert(irType == GM_LOBATTO_RULE_TYPE); Q_UNUSED(irType);
112  }
113 };
114 
115 //--------------------------------------------------------
116 // Border rules
117 //--------------------------------------------------------
118 
125 {
126 protected:
129  : GmProxyBorderIntegrationRule(type, 3, ir, true) {}
130 };
131 
134 {
135 public:
137  GmHexGaussFaceIntegrationRule(GmCellType type, int rule1, int rule2)
138  : GmHexFaceIntegrationRule(type, new GmQuadGaussIntegrationRule(rule1, rule2)) {}
139 
141  GmHexGaussFaceIntegrationRule(GmCellType type, GmCellFaceType faceType, GmIntegrationRuleType irType, int rule1, int rule2)
142  : GmHexGaussFaceIntegrationRule(type, rule1, rule2) { Q_UNUSED(faceType); Q_UNUSED(irType); }
143 };
144 
147 {
148 public:
150  GmHexLobattoFaceIntegrationRule(GmCellType type, int rule1, int rule2)
151  : GmHexFaceIntegrationRule(type, new GmQuadLobattoIntegrationRule(rule1, rule2)) {}
152 
155  : GmHexLobattoFaceIntegrationRule(type, rule1, rule2) { Q_UNUSED(faceType); Q_UNUSED(irType); }
156 };
157 
164 {
165 protected:
168  : GmProxyBorderIntegrationRule(type, 3, ir, false) {}
169 };
170 
173 {
174 public:
178 
181  : GmHexGaussEdgeIntegrationRule(type, rule) { Q_UNUSED(irType); }
182 };
183 
186 {
187 public:
191 
194  : GmHexLobattoEdgeIntegrationRule(type, rule) { Q_UNUSED(irType); }
195 };
196 
197 
198 #endif
199 
GmHexNewtonIntegrationRule(GmIntegrationRuleType irType, int rule1, int rule2, int rule3)
Standard constructor to enable the class use with GmCellIntegrationRuleSet.
Definition: gmHexIntegrationRule.h:84
GmIntegrationRuleType
The type of desired integration rule (Gauss quadrature, Lobatto quadrature, etc)
Definition: gmIntegrationRule.h:67
GmHexEdgeIntegrationRule(GmCellType type, GmIntegrationRule *ir)
Constructor. See comments about parameters in GmProxyBorderIntegrationRule.
Definition: gmHexIntegrationRule.h:167
Declaration of the GmBorderIntegrationRule and GmProxyBorderIntegrationRule classes.
Lobatto integration rule for Hex element borders (faces)
Definition: gmHexIntegrationRule.h:146
GmHexGaussEdgeIntegrationRule(GmCellType type, GmIntegrationRuleType irType, int rule)
Standard constructor to enable the class use with GmCellIntegrationRuleSet.
Definition: gmHexIntegrationRule.h:180
Declaration of the set of tables defining Newton Cotes integration rule points and weights Content wa...
GmHexNewtonIntegrationRule(int xiRule, int etaRule, int zetaRule, bool closed)
Basic constructor for a 3D Hex integration rule using Newton Cotes rules. Rule from 1 to 5....
Definition: gmHexIntegrationRule.h:75
1D Lobatto Integration rules (for bar elements)
Definition: gmBarIntegrationRule.h:83
GmHexLobattoFaceIntegrationRule(GmCellType type, GmCellFaceType faceType, GmIntegrationRuleType irType, int rule1, int rule2)
Standard constructor to enable the class use with GmCellIntegrationRuleSet.
Definition: gmHexIntegrationRule.h:154
GmHexLobattoIntegrationRule(int xiRule, int etaRule, int zetaRule)
Basic constructor for a 3D Hex integration rule using Lobatto rules. Rule from 1 to 11....
Definition: gmHexIntegrationRule.h:99
Gauss rules.
Definition: gmIntegrationRule.h:75
GmCellFaceType
The type of a 3D element's face.
Definition: gmCellType.h:135
GmHexLobattoFaceIntegrationRule(GmCellType type, int rule1, int rule2)
Constructor.
Definition: gmHexIntegrationRule.h:150
GmHexLobattoIntegrationRule(GmIntegrationRuleType irType, int rule1, int rule2, int rule3)
Standard constructor to enable the class use with GmCellIntegrationRuleSet.
Definition: gmHexIntegrationRule.h:108
GmHexGaussIntegrationRule(int xiRule, int etaRule, int zetaRule)
Basic constructor for a 3D Hex integration rule using Gauss rules. Rule from 1 to 5....
Definition: gmHexIntegrationRule.h:51
GmHexLobattoEdgeIntegrationRule(GmCellType type, GmIntegrationRuleType irType, int rule)
Standard constructor to enable the class use with GmCellIntegrationRuleSet.
Definition: gmHexIntegrationRule.h:193
3D Isotropic / anisotropic Lobatto integration rules for Hex elements
Definition: gmHexIntegrationRule.h:92
2D Isotropic / anisotropic Lobatto integration rules for Quad elements
Definition: gmQuadIntegrationRule.h:88
Integration rule for Hex element faces.
Definition: gmHexIntegrationRule.h:124
Lobatto rules.
Definition: gmIntegrationRule.h:76
Declaration of the GmIntegrationRule class and its helper decendants.
3D Isotropic / anisotropic Gauss integration rules for Hex elements
Definition: gmHexIntegrationRule.h:44
2D Isotropic / anisotropic Gauss integration rules for Quad elements
Definition: gmQuadIntegrationRule.h:42
Gauss integration rule for Hex element borders (edges)
Definition: gmHexIntegrationRule.h:172
Integration rule base classe.
Definition: gmIntegrationRule.h:88
Lobatto integration rule for Hex element borders (edges)
Definition: gmHexIntegrationRule.h:185
GmHexGaussIntegrationRule(GmIntegrationRuleType irType, int rule1, int rule2, int rule3)
Standard constructor to enable the class use with GmCellIntegrationRuleSet.
Definition: gmHexIntegrationRule.h:60
Base cache key for 3D Gauss hex rules.
Definition: gmIntegrationRule.h:45
A class storing tables with (position, weight) pairs for line, triangle and tetrahedron Gauss integra...
Definition: gmGaussIntegrationTables.h:36
3D Isotropic / anisotropic Newton cotes integration rules for Hex elements
Definition: gmHexIntegrationRule.h:68
Base cache key for 3D Newton cotes hex rules.
Definition: gmIntegrationRule.h:54
Common code for border integration rules based on a given integration rule that is used to implement ...
Definition: gmBorderIntegrationRule.h:74
Gauss integration rule for Hex element borders (faces)
Definition: gmHexIntegrationRule.h:133
GmHexLobattoEdgeIntegrationRule(GmCellType type, int rule)
Constructor.
Definition: gmHexIntegrationRule.h:189
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
Declaration of the set of tables defining Lobatto integration rule points and weights Content was pre...
Declaration of the GmQuadXxxxIntegrationRule family of classes, including border rules....
GmHexGaussFaceIntegrationRule(GmCellType type, int rule1, int rule2)
Constructor.
Definition: gmHexIntegrationRule.h:137
GmCellType
Mesh Cell types. Don't change type orders or add types without reading comments below.
Definition: gmCellType.h:30
A helper class used to combine 1, 2 or 3 single "line" integration rule tables into a multi-dimension...
Definition: gmIntegrationRule.h:191
GmHexGaussEdgeIntegrationRule(GmCellType type, int rule)
Constructor.
Definition: gmHexIntegrationRule.h:176
GmHexGaussFaceIntegrationRule(GmCellType type, GmCellFaceType faceType, GmIntegrationRuleType irType, int rule1, int rule2)
Standard constructor to enable the class use with GmCellIntegrationRuleSet.
Definition: gmHexIntegrationRule.h:141
Declaration of the set of tables defining Gauss integration rule points and weights Content was previ...
Base cache key for 3D Lobatto hex rules.
Definition: gmIntegrationRule.h:60
Open Newton-Cotes rules.
Definition: gmIntegrationRule.h:78
A class storing tables with (position, weight) pairs for line Lobatto integration rules.
Definition: gmLobattoIntegrationTables.h:35
Integration rule for Hex element edges.
Definition: gmHexIntegrationRule.h:163
Closed Newton-Cotes rules.
Definition: gmIntegrationRule.h:77
1D Gauss Integration rules (for bar elements)
Definition: gmBarIntegrationRule.h:36
Declaration of the GmLineXxxxIntegrationRule family of classes Content previously in gmIntegrationRul...
A class storing tables with (position, weight) pairs for line, triangle and tetrahedron Open & closed...
Definition: gmNewtonCotesIntegrationTables.h:36
GmHexFaceIntegrationRule(GmCellType type, GmIntegrationRule *ir)
Constructor. See comments about parameters in GmProxyBorderIntegrationRule.
Definition: gmHexIntegrationRule.h:128