GaussLegendreQuadrature.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2012-2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_MATH_GAUSSLEGENDREQUADRATURE_H
#define SURGSIM_MATH_GAUSSLEGENDREQUADRATURE_H
#include <array>
#include <utility>
namespace SurgSim
{
namespace Math
{
struct gaussQuadraturePoint
{
gaussQuadraturePoint(double p, double w) : point(p), weight(w){}
const double point;
const double weight;
};
struct gaussQuadratureTrianglePoint
{
gaussQuadratureTrianglePoint(double xi, double eta, double w) : coordinateXi(xi), coordinateEta(eta), weight(w){}
const double coordinateXi;
const double coordinateEta;
const double weight;
};
extern const std::array<gaussQuadraturePoint, 1> gaussQuadrature1Point;
extern const std::array<gaussQuadraturePoint, 2> gaussQuadrature2Points;
extern const std::array<gaussQuadraturePoint, 3> gaussQuadrature3Points;
extern const std::array<gaussQuadraturePoint, 4> gaussQuadrature4Points;
extern const std::array<gaussQuadraturePoint, 5> gaussQuadrature5Points;
extern const std::array<gaussQuadraturePoint, 100> gaussQuadrature100Points;
// http://math2.uncc.edu/~shaodeng/TEACHING/math5172/Lectures/Lect_15.PDF
// "Quadrature Formulas in Two Dimensions"
// \int_0^1 \int_0^{1-eta} f(xi, eta) dxi deta = 1/2 sum_i w[i] f(xi[i], eta[i])
extern const std::array<gaussQuadratureTrianglePoint, 3> gaussQuadrature2DTriangle3Points;
extern const std::array<gaussQuadratureTrianglePoint, 6> gaussQuadrature2DTriangle6Points;
extern const std::array<gaussQuadratureTrianglePoint, 12> gaussQuadrature2DTriangle12Points;
}; // namespace Math
}; // namespace SurgSim
#endif // SURGSIM_MATH_GAUSSLEGENDREQUADRATURE_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Math::gaussQuadrature1Point
const std::array< gaussQuadraturePoint, 1 > gaussQuadrature1Point
1D 1-point Gauss-Legendre quadrature
Definition: GaussLegendreQuadrature.cpp:25
SurgSim::Math::gaussQuadrature2DTriangle3Points
const std::array< gaussQuadratureTrianglePoint, 3 > gaussQuadrature2DTriangle3Points
2D triangle Gauss-Legendre quadrature 3-points
Definition: GaussLegendreQuadrature.cpp:164
SurgSim::Math::gaussQuadratureTrianglePoint::coordinateEta
const double coordinateEta
, must verify
Definition: GaussLegendreQuadrature.h:48
SurgSim::Math::gaussQuadratureTrianglePoint::weight
const double weight
Definition: GaussLegendreQuadrature.h:49
SurgSim::Math::gaussQuadratureTrianglePoint::gaussQuadratureTrianglePoint
gaussQuadratureTrianglePoint(double xi, double eta, double w)
Definition: GaussLegendreQuadrature.h:45
SurgSim::Math::gaussQuadraturePoint::point
const double point
Definition: GaussLegendreQuadrature.h:36
SurgSim::Math::gaussQuadraturePoint::gaussQuadraturePoint
gaussQuadraturePoint(double p, double w)
Definition: GaussLegendreQuadrature.h:34
SurgSim::Math::gaussQuadrature2Points
const std::array< gaussQuadraturePoint, 2 > gaussQuadrature2Points
1D 2-points Gauss-Legendre quadrature
Definition: GaussLegendreQuadrature.cpp:30
SurgSim::Math::gaussQuadratureTrianglePoint::coordinateXi
const double coordinateXi
, must verify
Definition: GaussLegendreQuadrature.h:47
SurgSim::Math::gaussQuadrature100Points
const std::array< gaussQuadraturePoint, 100 > gaussQuadrature100Points
1D 100-points Gauss-Legendre quadrature
Definition: GaussLegendreQuadrature.cpp:60
SurgSim::Math::gaussQuadratureTrianglePoint
2D Gauss-Legendre quadrature on a triangle
Definition: GaussLegendreQuadrature.h:43
SurgSim::Math::gaussQuadrature2DTriangle6Points
const std::array< gaussQuadratureTrianglePoint, 6 > gaussQuadrature2DTriangle6Points
2D triangle Gauss-Legendre quadrature 6-points
Definition: GaussLegendreQuadrature.cpp:171
SurgSim::Math::gaussQuadrature5Points
const std::array< gaussQuadraturePoint, 5 > gaussQuadrature5Points
1D 5-points Gauss-Legendre quadrature
Definition: GaussLegendreQuadrature.cpp:51
SurgSim::Math::gaussQuadrature4Points
const std::array< gaussQuadraturePoint, 4 > gaussQuadrature4Points
1D 4-points Gauss-Legendre quadrature
Definition: GaussLegendreQuadrature.cpp:43
SurgSim::Math::gaussQuadrature2DTriangle12Points
const std::array< gaussQuadratureTrianglePoint, 12 > gaussQuadrature2DTriangle12Points
2D triangle Gauss-Legendre quadrature 12-points
Definition: GaussLegendreQuadrature.cpp:181
SurgSim::Math::gaussQuadrature3Points
const std::array< gaussQuadraturePoint, 3 > gaussQuadrature3Points
1D 3-points Gauss-Legendre quadrature
Definition: GaussLegendreQuadrature.cpp:36
SurgSim::Math::gaussQuadraturePoint::weight
const double weight
Definition: GaussLegendreQuadrature.h:37
SurgSim::Math::gaussQuadraturePoint
1D Gauss-Legendre quadrature
Definition: GaussLegendreQuadrature.h:32