]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Merge pull request #11601 from bangerth/ref-cell-6
authorBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 22 Jan 2021 03:25:19 +0000 (22:25 -0500)
committerGitHub <noreply@github.com>
Fri, 22 Jan 2021 03:25:19 +0000 (22:25 -0500)
Let ReferenceCell::get_nodal_type_quadrature() return a 'const' reference

1  2 
include/deal.II/grid/reference_cell.h
source/grid/reference_cell.cc

Simple merge
index 76202e33de19a6dfcad6173e207acc78ba19c387,4643d48c7c489e6498a87de57ee2fadb4f523089..81a1820a0995eaeceb0a725f868677e22cd939bb
@@@ -241,10 -222,8 +241,10 @@@ namespace ReferenceCel
      return Quadrature<dim>(); // never reached
    }
  
 +
 +
    template <int dim>
-   Quadrature<dim> &
+   const Quadrature<dim> &
    get_nodal_type_quadrature(const Type &reference_cell)
    {
      AssertDimension(dim, reference_cell.get_dimension());
        return Quadrature<dim>(tria.get_vertices());
      };
  
 -    if (reference_cell == get_hypercube(dim))
 +    if (reference_cell == Type::get_hypercube<dim>())
        {
-         static Quadrature<dim> quadrature = create_quadrature(reference_cell);
+         static const Quadrature<dim> quadrature =
+           create_quadrature(reference_cell);
          return quadrature;
        }
      else if (reference_cell == Type::Tri || reference_cell == Type::Tet)

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.