compute_local_to_global_vertex_index_map(
const parallel::distributed::Triangulation<dim, spacedim> &triangulation);
- /**
- * Return the highest value among ratios between extents in each of the
- * coordinate directions of a @p cell. Moreover, return the dimension
- * relative to the highest elongation.
- *
- * @param[in] cell an iterator pointing to the cell.
- *
- * @return A std::pair<unsigned int, double> such that the @p first value
- * is the dimension of the highest elongation and the @p second value is the
- * ratio among the dimensions of the @p cell.
- */
- template <int dim, int spacedim>
- std::pair<unsigned int, double>
- get_longest_direction(
- typename Triangulation<dim, spacedim>::active_cell_iterator cell);
-
/** @} */
/**
* @name Partitions and subdomains of triangulations
#include <algorithm>
#include <array>
#include <cmath>
+#include <utility>
#include <vector>
DEAL_II_NAMESPACE_OPEN
cell_measure(const std::vector<Point<dim>> &all_vertices,
const ArrayView<const unsigned int> &vertex_indices);
+ /**
+ * Return the highest value among ratios between extents in each of the
+ * coordinate directions of a @p cell. Moreover, return the dimension
+ * relative to the highest elongation.
+ *
+ * @param[in] cell an iterator pointing to the cell.
+ *
+ * @return A std::pair<unsigned int, double> such that the @p first value
+ * is the dimension of the highest elongation and the @p second value is the
+ * ratio among the dimensions of the @p cell.
+ */
+ template <int dim, int spacedim>
+ std::pair<unsigned int, double>
+ get_longest_direction(
+ typename Triangulation<dim, spacedim>::active_cell_iterator cell);
+
/**
* This function computes an affine approximation of the map from the unit
* coordinates to the real coordinates of the form $p_\text{real} = A
- template <int dim, int spacedim>
- std::pair<unsigned int, double>
- get_longest_direction(
- typename Triangulation<dim, spacedim>::active_cell_iterator cell)
- {
- double max_ratio = 1;
- unsigned int index = 0;
-
- for (unsigned int i = 0; i < dim; ++i)
- for (unsigned int j = i + 1; j < dim; ++j)
- {
- unsigned int ax = i % dim;
- unsigned int next_ax = j % dim;
-
- double ratio =
- cell->extent_in_direction(ax) / cell->extent_in_direction(next_ax);
-
- if (ratio > max_ratio)
- {
- max_ratio = ratio;
- index = ax;
- }
- else if (1.0 / ratio > max_ratio)
- {
- max_ratio = 1.0 / ratio;
- index = next_ax;
- }
- }
- return std::make_pair(index, max_ratio);
- }
-
-
template <int dim, int spacedim>
void
remove_hanging_nodes(Triangulation<dim, spacedim> &tria,
#endif
}
-
-for (deal_II_dimension : DIMENSIONS)
- {
- template std::pair<unsigned int, double>
- GridTools::get_longest_direction<deal_II_dimension, deal_II_dimension>(
- Triangulation<deal_II_dimension>::active_cell_iterator);
-
- template void
- GridTools::remove_hanging_nodes<deal_II_dimension, deal_II_dimension>(
- Triangulation<deal_II_dimension> & tria, bool, unsigned int);
-
- template void
- GridTools::remove_anisotropy<deal_II_dimension, deal_II_dimension>(
- Triangulation<deal_II_dimension> &, double, unsigned int);
-
-#if deal_II_dimension < 3
- template std::pair<unsigned int, double>
- GridTools::get_longest_direction<deal_II_dimension,
- deal_II_dimension + 1>(
- Triangulation<deal_II_dimension,
- deal_II_dimension + 1>::active_cell_iterator);
-
- template void
- GridTools::remove_hanging_nodes<deal_II_dimension, deal_II_dimension + 1>(
- Triangulation<deal_II_dimension, deal_II_dimension + 1> & tria,
- bool,
- unsigned int);
-
- template void
- GridTools::remove_anisotropy<deal_II_dimension, deal_II_dimension + 1>(
- Triangulation<deal_II_dimension, deal_II_dimension + 1> &,
- double,
- unsigned int);
-#endif
- }
-
for (deal_II_vec : REAL_NONBLOCK_VECTORS; deal_II_dimension : DIMENSIONS)
{
template class GridTools::MarchingCubeAlgorithm<deal_II_dimension,
+ template <int dim, int spacedim>
+ std::pair<unsigned int, double>
+ get_longest_direction(
+ typename Triangulation<dim, spacedim>::active_cell_iterator cell)
+ {
+ double max_ratio = 1;
+ unsigned int index = 0;
+
+ for (unsigned int i = 0; i < dim; ++i)
+ for (unsigned int j = i + 1; j < dim; ++j)
+ {
+ unsigned int ax = i % dim;
+ unsigned int next_ax = j % dim;
+
+ double ratio =
+ cell->extent_in_direction(ax) / cell->extent_in_direction(next_ax);
+
+ if (ratio > max_ratio)
+ {
+ max_ratio = ratio;
+ index = ax;
+ }
+ else if (1.0 / ratio > max_ratio)
+ {
+ max_ratio = 1.0 / ratio;
+ index = next_ax;
+ }
+ }
+ return std::make_pair(index, max_ratio);
+ }
+
+
+
namespace
{
/**
const Quadrature<deal_II_space_dimension> &);
\}
}
+
+for (deal_II_dimension : DIMENSIONS)
+ {
+ template std::pair<unsigned int, double>
+ GridTools::get_longest_direction<deal_II_dimension, deal_II_dimension>(
+ Triangulation<deal_II_dimension>::active_cell_iterator);
+
+#if deal_II_dimension < 3
+ template std::pair<unsigned int, double>
+ GridTools::get_longest_direction<deal_II_dimension,
+ deal_II_dimension + 1>(
+ Triangulation<deal_II_dimension,
+ deal_II_dimension + 1>::active_cell_iterator);
+#endif
+ }