Reference documentation for deal.II version 9.5.0
\(\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// Copyright (C) 1998 - 2023 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_quadrature_lib_h
17#define dealii_quadrature_lib_h
18
19
20#include <deal.II/base/config.h>
21
23
25
39template <int dim>
40class QGauss : public Quadrature<dim>
41{
42public:
47 QGauss(const unsigned int n);
48};
49
50
73template <int dim>
74class QGaussLobatto : public Quadrature<dim>
75{
76public:
81 QGaussLobatto(const unsigned int n);
82};
83
84
85
95template <int dim>
96class QMidpoint : public Quadrature<dim>
97{
98public:
99 QMidpoint();
100};
101
102
107template <int dim>
108class QSimpson : public Quadrature<dim>
109{
110public:
111 QSimpson();
112};
113
114
115
124template <int dim>
125class QTrapezoid : public Quadrature<dim>
126{
127public:
128 QTrapezoid();
129};
130
131
138template <int dim>
139class QMilne : public Quadrature<dim>
140{
141public:
142 QMilne();
143};
144
145
152template <int dim>
153class QWeddle : public Quadrature<dim>
154{
155public:
156 QWeddle();
157};
158
159
160
174template <int dim>
175class QGaussLog : public Quadrature<dim>
176{
177public:
181 QGaussLog(const unsigned int n, const bool revert = false);
182
183private:
187 static std::vector<double>
188 get_quadrature_points(const unsigned int n);
189
193 static std::vector<double>
194 get_quadrature_weights(const unsigned int n);
195};
196
197
198
235template <int dim>
236class QGaussLogR : public Quadrature<dim>
237{
238public:
246 QGaussLogR(const unsigned int n,
247 const Point<dim> & x0 = Point<dim>(),
248 const double alpha = 1,
249 const bool factor_out_singular_weight = false);
250
256 QGaussLogR(QGaussLogR<dim> &&) noexcept = default;
257
258protected:
263 const double fraction;
264};
265
266
290template <int dim>
291class QGaussOneOverR : public Quadrature<dim>
292{
293public:
326 QGaussOneOverR(const unsigned int n,
327 const Point<dim> & singularity,
328 const bool factor_out_singular_weight = false);
363 QGaussOneOverR(const unsigned int n,
364 const unsigned int vertex_index,
365 const bool factor_out_singular_weight = false);
366
367private:
373 static unsigned int
374 quad_size(const Point<dim> &singularity, const unsigned int n);
375};
376
377
378
388template <int dim>
389class QSorted : public Quadrature<dim>
390{
391public:
396 QSorted(const Quadrature<dim> &quad);
397
398private:
404 bool
405 compare_weights(const unsigned int a, const unsigned int b) const;
406};
407
462template <int dim>
463class QTelles : public Quadrature<dim>
464{
465public:
472 QTelles(const Quadrature<1> &base_quad, const Point<dim> &singularity);
478 QTelles(const unsigned int n, const Point<dim> &singularity);
479};
480
492template <int dim>
493class QGaussChebyshev : public Quadrature<dim>
494{
495public:
497 QGaussChebyshev(const unsigned int n);
498};
499
500
515template <int dim>
517{
518public:
519 /* EndPoint is used to specify which of the two endpoints of the unit interval
520 * is used also as quadrature point
521 */
523 {
531 right
532 };
534 QGaussRadauChebyshev(const unsigned int n,
535 EndPoint ep = QGaussRadauChebyshev::left);
536
542
543private:
544 const EndPoint ep;
545};
546
560template <int dim>
562{
563public:
565 QGaussLobattoChebyshev(const unsigned int n);
566};
567
601template <int dim>
602class QSimplex : public Quadrature<dim>
603{
604public:
611 QSimplex(const Quadrature<dim> &quad);
612
641 template <int spacedim = dim>
643 compute_affine_transformation(
644 const std::array<Point<spacedim>, dim + 1> &vertices) const;
645
658 template <int spacedim = dim>
660 mapped_quadrature(
661 const std::vector<std::array<Point<spacedim>, dim + 1>> &simplices) const;
662};
663
682class QTrianglePolar : public QSimplex<2>
683{
684public:
692 QTrianglePolar(const Quadrature<1> &radial_quadrature,
693 const Quadrature<1> &angular_quadrature);
694
701 QTrianglePolar(const unsigned int n);
702};
703
736class QDuffy : public QSimplex<2>
737{
738public:
753 QDuffy(const Quadrature<1> &radial_quadrature,
754 const Quadrature<1> &angular_quadrature,
755 const double beta = 1.0);
756
764 QDuffy(const unsigned int n, const double beta);
765};
766
771template <int dim>
772class QSplit : public Quadrature<dim>
773{
774public:
809 QSplit(const QSimplex<dim> &base, const Point<dim> &split_point);
810};
811
837template <int dim>
838class QGaussSimplex : public QSimplex<dim>
839{
840public:
845 explicit QGaussSimplex(const unsigned int n_points_1D);
846};
847
879template <int dim>
881{
882public:
889 explicit QWitherdenVincentSimplex(const unsigned int n_points_1D,
890 const bool use_odd_order = true);
891};
892
900template <int dim>
901class QIteratedSimplex : public Quadrature<dim>
902{
903public:
904 QIteratedSimplex(const Quadrature<dim> &base_quadrature,
905 const unsigned int n_copies);
906};
907
911template <int dim>
912class QGaussWedge : public Quadrature<dim>
913{
914public:
920 explicit QGaussWedge(const unsigned int n_points_1D);
921};
922
926template <int dim>
927class QGaussPyramid : public Quadrature<dim>
928{
929public:
935 explicit QGaussPyramid(const unsigned int n_points_1D);
936};
937
940/* -------------- declaration of explicit specializations ------------- */
941
942#ifndef DOXYGEN
943template <>
944QGauss<1>::QGauss(const unsigned int n);
945template <>
946QGaussLobatto<1>::QGaussLobatto(const unsigned int n);
947
948template <>
949std::vector<double>
950QGaussLog<1>::get_quadrature_points(const unsigned int);
951template <>
952std::vector<double>
953QGaussLog<1>::get_quadrature_weights(const unsigned int);
954
955template <>
957template <>
959template <>
961template <>
963template <>
965template <>
966QGaussLog<1>::QGaussLog(const unsigned int n, const bool revert);
967template <>
968QGaussLogR<1>::QGaussLogR(const unsigned int n,
969 const Point<1> & x0,
970 const double alpha,
971 const bool flag);
972template <>
973QGaussOneOverR<2>::QGaussOneOverR(const unsigned int n,
974 const unsigned int index,
975 const bool flag);
976template <>
977QTelles<1>::QTelles(const Quadrature<1> &base_quad,
978 const Point<1> & singularity);
979#endif // DOXYGEN
980
981
982
984#endif
Definition point.h:112
QGaussLobatto(const unsigned int n)
const double fraction
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
QGauss(const unsigned int n)
QTelles(const Quadrature< 1 > &base_quad, const Point< dim > &singularity)
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
Point< 3 > vertices[4]