|
template<int dim, int spacedim> |
static void | compute_number_cache_dim (const Triangulation< dim, spacedim > &triangulation, const unsigned int level_objects, internal::TriangulationImplementation::NumberCache< 1 > &number_cache) |
|
template<int dim, int spacedim> |
static void | compute_number_cache_dim (const Triangulation< dim, spacedim > &triangulation, const unsigned int level_objects, internal::TriangulationImplementation::NumberCache< 2 > &number_cache) |
|
template<int dim, int spacedim> |
static void | compute_number_cache_dim (const Triangulation< dim, spacedim > &triangulation, const unsigned int level_objects, internal::TriangulationImplementation::NumberCache< 3 > &number_cache) |
|
template<int dim, int spacedim> |
static void | compute_number_cache (const Triangulation< dim, spacedim > &triangulation, const unsigned int level_objects, internal::TriangulationImplementation::NumberCache< dim > &number_cache) |
|
template<int spacedim> |
static void | update_neighbors (Triangulation< 1, spacedim > &) |
|
template<int dim, int spacedim> |
static void | update_neighbors (Triangulation< dim, spacedim > &triangulation) |
|
template<int dim, int spacedim> |
static void | create_triangulation (const std::vector< Point< spacedim > > &vertices, const std::vector< CellData< dim > > &cells, const SubCellData &subcelldata, Triangulation< dim, spacedim > &tria) |
|
template<int structdim, int spacedim, typename T > |
static void | process_subcelldata (const CRS< T > &crs, TriaObjects &obj, const std::vector< CellData< structdim > > &boundary_objects_in, const std::vector< Point< spacedim > > &vertex_locations) |
|
static void | reserve_space_ (TriaFaces &faces, const unsigned structdim, const unsigned int size) |
|
static void | reserve_space_ (TriaLevel &level, const unsigned int spacedim, const unsigned int size, const bool orientation_needed) |
|
static void | reserve_space_ (TriaObjects &obj, const unsigned int size) |
|
template<int spacedim> |
static void | delete_children (Triangulation< 1, spacedim > &triangulation, typename Triangulation< 1, spacedim >::cell_iterator &cell, std::vector< unsigned int > &, std::vector< unsigned int > &) |
|
template<int spacedim> |
static void | delete_children (Triangulation< 2, spacedim > &triangulation, typename Triangulation< 2, spacedim >::cell_iterator &cell, std::vector< unsigned int > &line_cell_count, std::vector< unsigned int > &) |
|
template<int spacedim> |
static void | delete_children (Triangulation< 3, spacedim > &triangulation, typename Triangulation< 3, spacedim >::cell_iterator &cell, std::vector< unsigned int > &line_cell_count, std::vector< unsigned int > &quad_cell_count) |
|
template<int spacedim> |
static void | create_children (Triangulation< 2, spacedim > &triangulation, unsigned int &next_unused_vertex, typename Triangulation< 2, spacedim >::raw_line_iterator &next_unused_line, typename Triangulation< 2, spacedim >::raw_cell_iterator &next_unused_cell, const typename Triangulation< 2, spacedim >::cell_iterator &cell) |
|
template<int dim, int spacedim> |
static Triangulation< dim, spacedim >::DistortedCellList | execute_refinement_isotropic (Triangulation< dim, spacedim > &triangulation, const bool check_for_distorted_cells) |
|
template<int spacedim> |
static Triangulation< 1, spacedim >::DistortedCellList | execute_refinement (Triangulation< 1, spacedim > &triangulation, const bool) |
|
template<int spacedim> |
static Triangulation< 2, spacedim >::DistortedCellList | execute_refinement (Triangulation< 2, spacedim > &triangulation, const bool check_for_distorted_cells) |
|
template<int spacedim> |
static Triangulation< 3, spacedim >::DistortedCellList | execute_refinement_isotropic (Triangulation< 3, spacedim > &triangulation, const bool check_for_distorted_cells) |
|
template<int spacedim> |
static Triangulation< 3, spacedim >::DistortedCellList | execute_refinement (Triangulation< 3, spacedim > &triangulation, const bool check_for_distorted_cells) |
|
template<int spacedim> |
static void | prevent_distorted_boundary_cells (Triangulation< 1, spacedim > &) |
|
template<int dim, int spacedim> |
static void | prevent_distorted_boundary_cells (Triangulation< dim, spacedim > &triangulation) |
|
template<int dim, int spacedim> |
static void | prepare_refinement_dim_dependent (const Triangulation< dim, spacedim > &) |
|
template<int spacedim> |
static void | prepare_refinement_dim_dependent (Triangulation< 3, spacedim > &triangulation) |
|
template<int dim, int spacedim> |
static bool | coarsening_allowed (const typename Triangulation< dim, spacedim >::cell_iterator &cell) |
|
A class into which we put many of the functions that implement functionality of the Triangulation class. The main reason for this class is as follows: the majority of the functions in Triangulation need to be implemented differently for dim==1, dim==2, and dim==3. However, their implementation is largly independent of the spacedim template parameter. So we would like to write things like
template <int spacedim>
virtual void create_triangulation(const std::vector< Point< spacedim > > &vertices, const std::vector< CellData< dim > > &cells, const SubCellData &subcelldata)
Unfortunately, C++ doesn't allow this: member functions of class templates have to be either not specialized at all, or fully specialized. No partial specialization is allowed. One possible solution would be to just duplicate the bodies of the functions and have equally implemented functions
but that is clearly an unsatisfactory solution. Rather, what we do is introduce the current Implementation class in which we can write these functions as member templates over spacedim, i.e. we can have
template <int dim_, int spacedim_>
template <int spacedim>
The outer template parameters are here unused, only the inner ones are of real interest.
One may ask why we put these functions into an class rather than an anonymous namespace, for example?
First, these implementation functions need to be friends of the Triangulation class. It is simpler to make the entire class a friend rather than listing all members of an implementation namespace as friends of the Triangulation class (there is no such thing as a "friend
namespace XXX" directive).
Ideally, we would make this class a member class of the Triangulation<dim,spacedim> class, since then our implementation functions have immediate access to the alias and static functions of the surrounding Triangulation class. I.e., we do not have to write "typename Triangulation<dim,spacedim>::active_cell_iterator" but can write "active_cell_iterator" right away. This is, in fact, the way it was implemented first, but we ran into a bug in gcc4.0:
Here, friendship (per C++ standard) is supposed to extend to all members of the befriended class, including its 'Implementation' member class. But gcc4.0 gets this wrong: the members of Triangulation::Implementation are not friends of TriaAccessor and the other way around. Ideally, one would fix this by saying
};
};
friend struct ::internal::TriangulationImplementation::Implementation
friend struct ::internal::TriaAccessorImplementation::Implementation
but that's not legal because in ** we don't know yet that TriaAccessor has a member class Implementation and so we can't make it a friend. The only way forward at this point was to make Implementation a class in the internal namespace so that we can forward declare it and make it a friend of the respective other outer class – not quite what we wanted but the only way I could see to make it work...
Definition at line 2689 of file tria.cc.