};
+/**
+ * Return a default linear mapping that works for the given triangulation.
+ * Internally, this function calls the function above for the reference
+ * cell used by the given triangulation, assuming that the triangulation
+ * uses only a single cell type. If the triangulation uses mixed cell
+ * types, then this function will trigger an exception.
+ */
+template <int dim, int spacedim>
+const Mapping<dim, spacedim> &
+get_default_linear_mapping(const Triangulation<dim, spacedim> &triangulation);
+
+
DEAL_II_NAMESPACE_CLOSE
#endif
// Forward declarations
#ifndef DOXYGEN
template <int dim, int spacedim>
-class Triangulation;
-template <int dim, int spacedim>
class Mapping;
+
template <int dim>
class Quadrature;
#endif
return {};
}
-/**
- * Return a default linear mapping that works for the given triangulation.
- * Internally, this function calls the function above for the reference
- * cell used by the given triangulation, assuming that the triangulation
- * uses only a single cell type. If the triangulation uses mixed cell
- * types, then this function will trigger an exception.
- */
-template <int dim, int spacedim>
-const Mapping<dim, spacedim> &
-get_default_linear_mapping(const Triangulation<dim, spacedim> &triangulation);
namespace internal
{
}
-/*------------------------------ InternalData ------------------------------*/
+/* ------------------------------ Global functions ------------------------- */
+
+template <int dim, int spacedim>
+const Mapping<dim, spacedim> &
+get_default_linear_mapping(const Triangulation<dim, spacedim> &triangulation)
+{
+ const auto &reference_cells = triangulation.get_reference_cells();
+ Assert(reference_cells.size() == 1,
+ ExcMessage(
+ "This function can only work for triangulations that "
+ "use only a single cell type -- for example, only triangles "
+ "or only quadrilaterals. For mixed meshes, there is no "
+ "single linear mapping object that can be used for all "
+ "cells of the triangulation. The triangulation you are "
+ "passing to this function uses multiple cell types."));
+
+ return reference_cells.front()
+ .template get_default_linear_mapping<dim, spacedim>();
+}
{
#if deal_II_dimension <= deal_II_space_dimension
template class Mapping<deal_II_dimension, deal_II_space_dimension>;
+
+ template const Mapping<deal_II_dimension, deal_II_space_dimension>
+ &get_default_linear_mapping(
+ const Triangulation<deal_II_dimension, deal_II_space_dimension>
+ &triangulation);
#endif
}
-template <int dim, int spacedim>
-const Mapping<dim, spacedim> &
-get_default_linear_mapping(const Triangulation<dim, spacedim> &triangulation)
-{
- const auto &reference_cells = triangulation.get_reference_cells();
- Assert(reference_cells.size() == 1,
- ExcMessage(
- "This function can only work for triangulations that "
- "use only a single cell type -- for example, only triangles "
- "or only quadrilaterals. For mixed meshes, there is no "
- "single linear mapping object that can be used for all "
- "cells of the triangulation. The triangulation you are "
- "passing to this function uses multiple cell types."));
-
- return reference_cells.front()
- .template get_default_linear_mapping<dim, spacedim>();
-}
-
-
-
template <int dim>
Quadrature<dim>
ReferenceCell::get_gauss_type_quadrature(const unsigned n_points_1D) const
template const Mapping<deal_II_dimension, deal_II_space_dimension>
&ReferenceCell::get_default_linear_mapping() const;
-
- template const Mapping<deal_II_dimension, deal_II_space_dimension>
- &get_default_linear_mapping(
- const Triangulation<deal_II_dimension, deal_II_space_dimension>
- &triangulation);
#endif
}