Reference documentation for deal.II version 9.4.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\}}\)
quadrature_lib.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2022 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 
28 
37 template <int dim>
38 class QGauss : public Quadrature<dim>
39 {
40 public:
45  QGauss(const unsigned int n);
46 };
47 
48 
71 template <int dim>
72 class QGaussLobatto : public Quadrature<dim>
73 {
74 public:
79  QGaussLobatto(const unsigned int n);
80 };
81 
82 
83 
93 template <int dim>
94 class QMidpoint : public Quadrature<dim>
95 {
96 public:
97  QMidpoint();
98 };
99 
100 
105 template <int dim>
106 class QSimpson : public Quadrature<dim>
107 {
108 public:
109  QSimpson();
110 };
111 
112 
113 
122 template <int dim>
123 class QTrapezoid : public Quadrature<dim>
124 {
125 public:
126  QTrapezoid();
127 };
128 
129 
141 template <int dim>
143 
144 
145 
152 template <int dim>
153 class QMilne : public Quadrature<dim>
154 {
155 public:
156  QMilne();
157 };
158 
159 
166 template <int dim>
167 class QWeddle : public Quadrature<dim>
168 {
169 public:
170  QWeddle();
171 };
172 
173 
174 
188 template <int dim>
189 class QGaussLog : public Quadrature<dim>
190 {
191 public:
195  QGaussLog(const unsigned int n, const bool revert = false);
196 
197 private:
201  static std::vector<double>
202  get_quadrature_points(const unsigned int n);
203 
207  static std::vector<double>
208  get_quadrature_weights(const unsigned int n);
209 };
210 
211 
212 
249 template <int dim>
250 class QGaussLogR : public Quadrature<dim>
251 {
252 public:
260  QGaussLogR(const unsigned int n,
261  const Point<dim> & x0 = Point<dim>(),
262  const double alpha = 1,
263  const bool factor_out_singular_weight = false);
264 
270  QGaussLogR(QGaussLogR<dim> &&) noexcept = default;
271 
272 protected:
277  const double fraction;
278 };
279 
280 
304 template <int dim>
305 class QGaussOneOverR : public Quadrature<dim>
306 {
307 public:
340  QGaussOneOverR(const unsigned int n,
341  const Point<dim> & singularity,
342  const bool factor_out_singular_weight = false);
377  QGaussOneOverR(const unsigned int n,
378  const unsigned int vertex_index,
379  const bool factor_out_singular_weight = false);
380 
381 private:
387  static unsigned int
388  quad_size(const Point<dim> &singularity, const unsigned int n);
389 };
390 
391 
392 
402 template <int dim>
403 class QSorted : public Quadrature<dim>
404 {
405 public:
410  QSorted(const Quadrature<dim> &quad);
411 
412 private:
418  bool
419  compare_weights(const unsigned int a, const unsigned int b) const;
420 };
421 
476 template <int dim>
477 class QTelles : public Quadrature<dim>
478 {
479 public:
486  QTelles(const Quadrature<1> &base_quad, const Point<dim> &singularity);
492  QTelles(const unsigned int n, const Point<dim> &singularity);
493 };
494 
506 template <int dim>
507 class QGaussChebyshev : public Quadrature<dim>
508 {
509 public:
511  QGaussChebyshev(const unsigned int n);
512 };
513 
514 
529 template <int dim>
530 class QGaussRadauChebyshev : public Quadrature<dim>
531 {
532 public:
533  /* EndPoint is used to specify which of the two endpoints of the unit interval
534  * is used also as quadrature point
535  */
536  enum EndPoint
537  {
545  right
546  };
548  QGaussRadauChebyshev(const unsigned int n,
549  EndPoint ep = QGaussRadauChebyshev::left);
550 
556 
557 private:
558  const EndPoint ep;
559 };
560 
574 template <int dim>
576 {
577 public:
579  QGaussLobattoChebyshev(const unsigned int n);
580 };
581 
615 template <int dim>
616 class QSimplex : public Quadrature<dim>
617 {
618 public:
625  QSimplex(const Quadrature<dim> &quad);
626 
651  compute_affine_transformation(
652  const std::array<Point<dim>, dim + 1> &vertices) const;
653 };
654 
673 class QTrianglePolar : public QSimplex<2>
674 {
675 public:
683  QTrianglePolar(const Quadrature<1> &radial_quadrature,
684  const Quadrature<1> &angular_quadrature);
685 
692  QTrianglePolar(const unsigned int n);
693 };
694 
727 class QDuffy : public QSimplex<2>
728 {
729 public:
744  QDuffy(const Quadrature<1> &radial_quadrature,
745  const Quadrature<1> &angular_quadrature,
746  const double beta = 1.0);
747 
755  QDuffy(const unsigned int n, const double beta);
756 };
757 
762 template <int dim>
763 class QSplit : public Quadrature<dim>
764 {
765 public:
800  QSplit(const QSimplex<dim> &base, const Point<dim> &split_point);
801 };
802 
827 template <int dim>
828 class QGaussSimplex : public QSimplex<dim>
829 {
830 public:
835  explicit QGaussSimplex(const unsigned int n_points_1D);
836 };
837 
868 template <int dim>
870 {
871 public:
878  explicit QWitherdenVincentSimplex(const unsigned int n_points_1D,
879  const bool use_odd_order = true);
880 };
881 
889 template <int dim>
890 class QIteratedSimplex : public Quadrature<dim>
891 {
892 public:
893  QIteratedSimplex(const Quadrature<dim> &base_quadrature,
894  const unsigned int n_copies);
895 };
896 
900 template <int dim>
901 class QGaussWedge : public Quadrature<dim>
902 {
903 public:
909  explicit QGaussWedge(const unsigned int n_points_1D);
910 };
911 
915 template <int dim>
916 class QGaussPyramid : public Quadrature<dim>
917 {
918 public:
924  explicit QGaussPyramid(const unsigned int n_points_1D);
925 };
926 
929 /* -------------- declaration of explicit specializations ------------- */
930 
931 #ifndef DOXYGEN
932 template <>
933 QGauss<1>::QGauss(const unsigned int n);
934 template <>
935 QGaussLobatto<1>::QGaussLobatto(const unsigned int n);
936 
937 template <>
938 std::vector<double>
939 QGaussLog<1>::get_quadrature_points(const unsigned int);
940 template <>
941 std::vector<double>
942 QGaussLog<1>::get_quadrature_weights(const unsigned int);
943 
944 template <>
946 template <>
948 template <>
950 template <>
952 template <>
954 template <>
955 QGaussLog<1>::QGaussLog(const unsigned int n, const bool revert);
956 template <>
957 QGaussLogR<1>::QGaussLogR(const unsigned int n,
958  const Point<1> & x0,
959  const double alpha,
960  const bool flag);
961 template <>
962 QGaussOneOverR<2>::QGaussOneOverR(const unsigned int n,
963  const unsigned int index,
964  const bool flag);
965 template <>
966 QTelles<1>::QTelles(const Quadrature<1> &base_quad,
967  const Point<1> & singularity);
968 #endif // DOXYGEN
969 
970 
971 
973 #endif
Definition: point.h:111
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_DEPRECATED
Definition: config.h:164
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
Point< 3 > vertices[4]
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
void split_point(const Point< dim1+dim2 > &source, Point< dim1 > &p1, Point< dim2 > &p2)