]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add more choices to QuadratureSelector 9039/head
authorDaniel Jodlbauer <daniel.jodlbauer@ricam.oeaw.ac.at>
Mon, 11 Nov 2019 14:11:58 +0000 (15:11 +0100)
committerDaniel Jodlbauer <daniel.jodlbauer@ricam.oeaw.ac.at>
Mon, 11 Nov 2019 14:45:22 +0000 (15:45 +0100)
doc/news/changes/minor/20191111DanielJodlbauer [new file with mode: 0644]
source/base/quadrature_selector.cc
tests/base/quadrature_selector.cc
tests/base/quadrature_selector.output

diff --git a/doc/news/changes/minor/20191111DanielJodlbauer b/doc/news/changes/minor/20191111DanielJodlbauer
new file mode 100644 (file)
index 0000000..fdfa147
--- /dev/null
@@ -0,0 +1,3 @@
+New: add more quadrature choices to QuadratureSelector class.
+<br>
+(Daniel Jodlbauer, 2019/11/11)
index ceac8d8c09ab35e17c3cc3f5cc825d5746965985..f08045430970b7466556623c7d529c1e00f57cd8 100644 (file)
@@ -25,10 +25,15 @@ QuadratureSelector<dim>::create_quadrature(const std::string &s,
                                            const unsigned int order)
 {
   if (s == "gauss")
-    {
-      AssertThrow(order >= 1, ExcInvalidQGaussOrder(order));
-      return QGauss<dim>(order);
-    }
+    return QGauss<dim>(order);
+  else if (s == "gauss_lobatto")
+    return QGaussLobatto<dim>(order);
+  else if (s == "gauss_chebyshev")
+    return QGaussChebyshev<dim>(order);
+  else if (s == "gauss_radau_chebyshev")
+    return QGaussRadauChebyshev<dim>(order);
+  else if (s == "gauss_lobatto_chebyshev")
+    return QGaussLobattoChebyshev<dim>(order);
   else
     {
       AssertThrow(order == 0, ExcInvalidOrder(s, order));
@@ -68,7 +73,8 @@ template <int dim>
 std::string
 QuadratureSelector<dim>::get_quadrature_names()
 {
-  return std::string("gauss|midpoint|milne|simpson|trapez|weddle");
+  return std::string(
+    "gauss|gauss_lobatto|gauss_chebyshev|gauss_radau_chebyshev|gauss_lobatto_chebyshev|midpoint|milne|simpson|trapez|weddle");
 }
 
 
index e57984825dac13db50d3c1fb6ba9cf0a7b2f6d84..5bf2e1e3d73a882435090a05306564c0c7d194cf 100644 (file)
@@ -53,4 +53,20 @@ main()
   check("gauss", 10, QGauss<3>(10));
 
   check("weddle", 0, QWeddle<2>());
+
+  check("gauss_lobatto", 2, QGaussLobatto<1>(2));
+  check("gauss_lobatto", 3, QGaussLobatto<2>(3));
+  check("gauss_lobatto", 4, QGaussLobatto<3>(4));
+
+  check("gauss_chebyshev", 2, QGaussChebyshev<1>(2));
+  check("gauss_chebyshev", 3, QGaussChebyshev<2>(3));
+  check("gauss_chebyshev", 4, QGaussChebyshev<3>(4));
+
+  check("gauss_radau_chebyshev", 2, QGaussRadauChebyshev<1>(2));
+  check("gauss_radau_chebyshev", 3, QGaussRadauChebyshev<2>(3));
+  check("gauss_radau_chebyshev", 4, QGaussRadauChebyshev<3>(4));
+
+  check("gauss_lobatto_chebyshev", 2, QGaussLobattoChebyshev<1>(2));
+  check("gauss_lobatto_chebyshev", 3, QGaussLobattoChebyshev<2>(3));
+  check("gauss_lobatto_chebyshev", 4, QGaussLobattoChebyshev<3>(4));
 }
index 6d38047d104d8b7c9472aa7fb1e24a69124fab1c..97c20aae718b9a2c743a130f4539b84cd875ad38 100644 (file)
@@ -6,3 +6,15 @@ DEAL::gauss 2 ok
 DEAL::gauss 6 ok
 DEAL::gauss 10 ok
 DEAL::weddle 0 ok
+DEAL::gauss_lobatto 2 ok
+DEAL::gauss_lobatto 3 ok
+DEAL::gauss_lobatto 4 ok
+DEAL::gauss_chebyshev 2 ok
+DEAL::gauss_chebyshev 3 ok
+DEAL::gauss_chebyshev 4 ok
+DEAL::gauss_radau_chebyshev 2 ok
+DEAL::gauss_radau_chebyshev 3 ok
+DEAL::gauss_radau_chebyshev 4 ok
+DEAL::gauss_lobatto_chebyshev 2 ok
+DEAL::gauss_lobatto_chebyshev 3 ok
+DEAL::gauss_lobatto_chebyshev 4 ok

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.