All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GaussLegendreQuadrature.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2012-2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
19 
20 #ifndef SURGSIM_MATH_GAUSSLEGENDREQUADRATURE_H
21 #define SURGSIM_MATH_GAUSSLEGENDREQUADRATURE_H
22 
23 #include <array>
24 #include <utility>
25 
26 namespace SurgSim
27 {
28 namespace Math
29 {
30 
32 {
33  gaussQuadraturePoint(double p, double w) : point(p), weight(w){}
34 
35  const double point;
36  const double weight;
37 };
38 
46 extern std::array<gaussQuadraturePoint, 1> gaussQuadrature1Point;
47 
55 extern std::array<gaussQuadraturePoint, 2> gaussQuadrature2Points;
56 
64 extern std::array<gaussQuadraturePoint, 3> gaussQuadrature3Points;
65 
73 extern std::array<gaussQuadraturePoint, 4> gaussQuadrature4Points;
74 
82 extern std::array<gaussQuadraturePoint, 5> gaussQuadrature5Points;
83 
91 extern std::array<gaussQuadraturePoint, 100> gaussQuadrature100Points;
92 
93 }; // namespace Math
94 }; // namespace SurgSim
95 
96 #endif // SURGSIM_MATH_GAUSSLEGENDREQUADRATURE_H
std::array< gaussQuadraturePoint, 2 > gaussQuadrature2Points
2-points Gauss-Legendre quadrature {, }
Definition: GaussLegendreQuadrature.cpp:30
const double point
Definition: GaussLegendreQuadrature.h:35
std::array< gaussQuadraturePoint, 100 > gaussQuadrature100Points
100-points Gauss-Legendre quadrature {, , , ..., }
Definition: GaussLegendreQuadrature.cpp:60
gaussQuadraturePoint(double p, double w)
Definition: GaussLegendreQuadrature.h:33
std::array< gaussQuadraturePoint, 1 > gaussQuadrature1Point
1-point Gauss-Legendre quadrature {}
Definition: GaussLegendreQuadrature.cpp:25
std::array< gaussQuadraturePoint, 3 > gaussQuadrature3Points
3-points Gauss-Legendre quadrature {, , }
Definition: GaussLegendreQuadrature.cpp:36
std::array< gaussQuadraturePoint, 4 > gaussQuadrature4Points
4-points Gauss-Legendre quadrature {, , , } ...
Definition: GaussLegendreQuadrature.cpp:43
std::array< gaussQuadraturePoint, 5 > gaussQuadrature5Points
5-points Gauss-Legendre quadrature {, , , , }
Definition: GaussLegendreQuadrature.cpp:51
const double weight
Definition: GaussLegendreQuadrature.h:36
Definition: GaussLegendreQuadrature.h:31