case 0:
{
if (*this == ReferenceCells::Vertex)
- return Point<dim>(0);
+ return Point<dim>();
break;
}
case 1:
template class QGaussSimplex<1>;
template class QGaussSimplex<2>;
template class QGaussSimplex<3>;
+template class QGaussWedge<0>;
template class QGaussWedge<1>;
template class QGaussWedge<2>;
template class QGaussWedge<3>;
+template class QGaussPyramid<0>;
template class QGaussPyramid<1>;
template class QGaussPyramid<2>;
template class QGaussPyramid<3>;
return in;
}
-
+// explicitly instantiate dimension 0 quadrature in addition to the standard
+// dimensions
+template Quadrature<0>
+ReferenceCell::get_gauss_type_quadrature(const unsigned n_points_1D) const;
+template const Quadrature<0> &
+ReferenceCell::get_nodal_type_quadrature() const;
#include "reference_cell.inst"
{
initlog();
+ {
+ deallog.push("0D");
+ // It doesn't make sense to integrate in 0D, but make sure that
+ // get_gauss_type_quadrature() still works
+ deallog << "0D quadrature size: "
+ << ReferenceCells::Vertex.get_gauss_type_quadrature<0>(1).size()
+ << std::endl;
+ deallog.pop();
+ }
+
{
deallog.push("1D");
test<1>(ReferenceCells::Line);
+DEAL:0D::0D quadrature size: 1
DEAL:1D::ReferenceCell: Line
DEAL:1D:: computed barycenter = 0.500000
DEAL:1D:: self-reported barycenter = 0.500000
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2023 - 2023 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+// Test ReferenceCell::get_nodal_type_quadrature()
+
+#include <deal.II/base/quadrature.h>
+
+#include <deal.II/grid/reference_cell.h>
+
+#include "../tests.h"
+
+using namespace dealii;
+
+template <int dim>
+void
+test(const ReferenceCell reference_cell)
+{
+ const Quadrature<dim> &quad =
+ reference_cell.template get_nodal_type_quadrature<dim>();
+
+ for (unsigned int q = 0; q < quad.size(); ++q)
+ {
+ // There is nothing to print for dim = 0 in the point
+ if (dim > 0)
+ deallog << quad.point(q) << ' ';
+ deallog << quad.weight(q) << ' ';
+ deallog << std::endl;
+ }
+}
+
+int
+main()
+{
+ initlog();
+
+ {
+ deallog.push("0d");
+ deallog.pop();
+ }
+ {
+ deallog.push("1d");
+ test<1>(ReferenceCells::Line);
+ deallog.pop();
+ }
+ {
+ deallog.push("2d-1");
+ test<2>(ReferenceCells::Triangle);
+ deallog.pop();
+ }
+ {
+ deallog.push("2d-2");
+ test<2>(ReferenceCells::Quadrilateral);
+ deallog.pop();
+ }
+ {
+ deallog.push("3d-1");
+ test<3>(ReferenceCells::Tetrahedron);
+ deallog.pop();
+ }
+ {
+ deallog.push("3d-2");
+ test<3>(ReferenceCells::Pyramid);
+ deallog.pop();
+ }
+ {
+ deallog.push("3d-2");
+ test<3>(ReferenceCells::Wedge);
+ deallog.pop();
+ }
+ {
+ deallog.push("3d-3");
+ test<3>(ReferenceCells::Hexahedron);
+ deallog.pop();
+ }
+}
--- /dev/null
+
+DEAL:1d::0.00000 inf
+DEAL:1d::1.00000 inf
+DEAL:2d-1::0.00000 0.00000 inf
+DEAL:2d-1::1.00000 0.00000 inf
+DEAL:2d-1::0.00000 1.00000 inf
+DEAL:2d-2::0.00000 0.00000 inf
+DEAL:2d-2::1.00000 0.00000 inf
+DEAL:2d-2::0.00000 1.00000 inf
+DEAL:2d-2::1.00000 1.00000 inf
+DEAL:3d-1::0.00000 0.00000 0.00000 inf
+DEAL:3d-1::1.00000 0.00000 0.00000 inf
+DEAL:3d-1::0.00000 1.00000 0.00000 inf
+DEAL:3d-1::0.00000 0.00000 1.00000 inf
+DEAL:3d-2::-1.00000 -1.00000 0.00000 inf
+DEAL:3d-2::1.00000 -1.00000 0.00000 inf
+DEAL:3d-2::-1.00000 1.00000 0.00000 inf
+DEAL:3d-2::1.00000 1.00000 0.00000 inf
+DEAL:3d-2::0.00000 0.00000 1.00000 inf
+DEAL:3d-2::0.00000 0.00000 0.00000 inf
+DEAL:3d-2::1.00000 0.00000 0.00000 inf
+DEAL:3d-2::0.00000 1.00000 0.00000 inf
+DEAL:3d-2::0.00000 0.00000 1.00000 inf
+DEAL:3d-2::1.00000 0.00000 1.00000 inf
+DEAL:3d-2::0.00000 1.00000 1.00000 inf
+DEAL:3d-3::0.00000 0.00000 0.00000 inf
+DEAL:3d-3::1.00000 0.00000 0.00000 inf
+DEAL:3d-3::0.00000 1.00000 0.00000 inf
+DEAL:3d-3::1.00000 1.00000 0.00000 inf
+DEAL:3d-3::0.00000 0.00000 1.00000 inf
+DEAL:3d-3::1.00000 0.00000 1.00000 inf
+DEAL:3d-3::0.00000 1.00000 1.00000 inf
+DEAL:3d-3::1.00000 1.00000 1.00000 inf