Reference documentation for deal.II version GIT relicensing-1308-g50a4ffc717 2024-07-25 10:40:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
quadrature_lib.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 1998 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_quadrature_lib_h
16#define dealii_quadrature_lib_h
17
18
19#include <deal.II/base/config.h>
20
22
24
38template <int dim>
39class QGauss : public Quadrature<dim>
40{
41public:
46 QGauss(const unsigned int n);
47};
48
78template <int dim>
79class QGaussRadau : public Quadrature<dim>
80{
81public:
87 {
95 right
96 };
103 QGaussRadau(const unsigned int n,
105
109 QGaussRadau(QGaussRadau<dim> &&) noexcept = default;
110
111private:
113};
114
115
138template <int dim>
139class QGaussLobatto : public Quadrature<dim>
140{
141public:
146 QGaussLobatto(const unsigned int n);
147};
148
149
150
160template <int dim>
161class QMidpoint : public Quadrature<dim>
162{
163public:
164 QMidpoint();
165};
166
167
172template <int dim>
173class QSimpson : public Quadrature<dim>
174{
175public:
176 QSimpson();
177};
178
179
180
189template <int dim>
190class QTrapezoid : public Quadrature<dim>
191{
192public:
193 QTrapezoid();
194};
195
196
203template <int dim>
204class QMilne : public Quadrature<dim>
205{
206public:
207 QMilne();
208};
209
210
217template <int dim>
218class QWeddle : public Quadrature<dim>
219{
220public:
221 QWeddle();
222};
223
224
225
239template <int dim>
240class QGaussLog : public Quadrature<dim>
241{
242public:
246 QGaussLog(const unsigned int n, const bool revert = false);
247
248private:
252 static std::vector<double>
253 get_quadrature_points(const unsigned int n);
254
258 static std::vector<double>
259 get_quadrature_weights(const unsigned int n);
260};
261
262
263
300template <int dim>
301class QGaussLogR : public Quadrature<dim>
302{
303public:
311 QGaussLogR(const unsigned int n,
312 const Point<dim> &x0 = Point<dim>(),
313 const double alpha = 1,
314 const bool factor_out_singular_weight = false);
315
321 QGaussLogR(QGaussLogR<dim> &&) noexcept = default;
322
323protected:
328 const double fraction;
329};
330
331
355template <int dim>
356class QGaussOneOverR : public Quadrature<dim>
357{
358public:
391 QGaussOneOverR(const unsigned int n,
392 const Point<dim> &singularity,
393 const bool factor_out_singular_weight = false);
428 QGaussOneOverR(const unsigned int n,
429 const unsigned int vertex_index,
430 const bool factor_out_singular_weight = false);
431
432private:
438 static unsigned int
439 quad_size(const Point<dim> &singularity, const unsigned int n);
440};
441
442
443
453template <int dim>
454class QSorted : public Quadrature<dim>
455{
456public:
461 QSorted(const Quadrature<dim> &quad);
462
463private:
469 bool
470 compare_weights(const unsigned int a, const unsigned int b) const;
471};
472
527template <int dim>
528class QTelles : public Quadrature<dim>
529{
530public:
537 QTelles(const Quadrature<1> &base_quad, const Point<dim> &singularity);
543 QTelles(const unsigned int n, const Point<dim> &singularity);
544};
545
557template <int dim>
558class QGaussChebyshev : public Quadrature<dim>
559{
560public:
562 QGaussChebyshev(const unsigned int n);
563};
564
565
580template <int dim>
582{
583public:
589 {
597 right
598 };
601 const unsigned int n,
602 const EndPoint end_point = QGaussRadauChebyshev::EndPoint::left);
603
608
609private:
610 const EndPoint end_point;
611};
612
626template <int dim>
628{
629public:
631 QGaussLobattoChebyshev(const unsigned int n);
632};
633
667template <int dim>
668class QSimplex : public Quadrature<dim>
669{
670public:
677 QSimplex(const Quadrature<dim> &quad);
678
707 template <int spacedim = dim>
709 compute_affine_transformation(
710 const std::array<Point<spacedim>, dim + 1> &vertices) const;
711
724 template <int spacedim = dim>
726 mapped_quadrature(
727 const std::vector<std::array<Point<spacedim>, dim + 1>> &simplices) const;
728};
729
748class QTrianglePolar : public QSimplex<2>
749{
750public:
758 QTrianglePolar(const Quadrature<1> &radial_quadrature,
759 const Quadrature<1> &angular_quadrature);
760
767 QTrianglePolar(const unsigned int n);
768};
769
802class QDuffy : public QSimplex<2>
803{
804public:
819 QDuffy(const Quadrature<1> &radial_quadrature,
820 const Quadrature<1> &angular_quadrature,
821 const double beta = 1.0);
822
830 QDuffy(const unsigned int n, const double beta);
831};
832
837template <int dim>
838class QSplit : public Quadrature<dim>
839{
840public:
875 QSplit(const QSimplex<dim> &base, const Point<dim> &split_point);
876};
877
903template <int dim>
904class QGaussSimplex : public QSimplex<dim>
905{
906public:
911 explicit QGaussSimplex(const unsigned int n_points_1D);
912};
913
945template <int dim>
947{
948public:
955 explicit QWitherdenVincentSimplex(const unsigned int n_points_1D,
956 const bool use_odd_order = true);
957};
958
966template <int dim>
967class QIteratedSimplex : public Quadrature<dim>
968{
969public:
970 QIteratedSimplex(const Quadrature<dim> &base_quadrature,
971 const unsigned int n_copies);
972};
973
977template <int dim>
978class QGaussWedge : public Quadrature<dim>
979{
980public:
986 explicit QGaussWedge(const unsigned int n_points_1D);
987};
988
992template <int dim>
993class QGaussPyramid : public Quadrature<dim>
994{
995public:
1001 explicit QGaussPyramid(const unsigned int n_points_1D);
1002};
1003
1006/* -------------- declaration of explicit specializations ------------- */
1007
1008#ifndef DOXYGEN
1009template <>
1010QGauss<1>::QGauss(const unsigned int n);
1011template <>
1012QGaussRadau<1>::QGaussRadau(const unsigned int n,
1013 const QGaussRadau<1>::EndPoint end_point);
1014template <>
1015QGaussLobatto<1>::QGaussLobatto(const unsigned int n);
1016
1017template <>
1018std::vector<double>
1019QGaussLog<1>::get_quadrature_points(const unsigned int);
1020template <>
1021std::vector<double>
1022QGaussLog<1>::get_quadrature_weights(const unsigned int);
1023
1024template <>
1026template <>
1028template <>
1030template <>
1032template <>
1034template <>
1035QGaussLog<1>::QGaussLog(const unsigned int n, const bool revert);
1036template <>
1037QGaussLogR<1>::QGaussLogR(const unsigned int n,
1038 const Point<1> &x0,
1039 const double alpha,
1040 const bool flag);
1041template <>
1042QGaussOneOverR<2>::QGaussOneOverR(const unsigned int n,
1043 const unsigned int index,
1044 const bool flag);
1045template <>
1046QTelles<1>::QTelles(const Quadrature<1> &base_quad,
1047 const Point<1> &singularity);
1048#endif // DOXYGEN
1049
1050
1051
1053#endif
Definition point.h:111
QGaussLobatto(const unsigned int n)
QGaussLogR(const unsigned int n, const Point< dim > &x0=Point< dim >(), const double alpha=1, const bool factor_out_singular_weight=false)
QGaussLogR(QGaussLogR< dim > &&) noexcept=default
QGaussLog(const unsigned int n, const bool revert=false)
static std::vector< double > get_quadrature_points(const unsigned int n)
static std::vector< double > get_quadrature_weights(const unsigned int n)
QGaussOneOverR(const unsigned int n, const unsigned int vertex_index, const bool factor_out_singular_weight=false)
QGaussOneOverR(const unsigned int n, const Point< dim > &singularity, const bool factor_out_singular_weight=false)
static unsigned int quad_size(const Point< dim > &singularity, const unsigned int n)
QGaussRadauChebyshev(QGaussRadauChebyshev< dim > &&) noexcept=default
const EndPoint end_point
QGaussRadau(QGaussRadau< dim > &&) noexcept=default
QGaussRadau(const unsigned int n, const EndPoint end_point=QGaussRadau::EndPoint::left)
QGauss(const unsigned int n)
QTelles(const Quadrature< 1 > &base_quad, const Point< dim > &singularity)
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
Point< 3 > vertices[4]