Reference documentation for deal.II version 9.6.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
grid_tools_topology.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_grid_tools_topology_h
16#define dealii_grid_tools_topology_h
17
18#include <deal.II/base/config.h>
19
20#include <deal.II/base/point.h>
22
23#include <deal.II/grid/tria.h>
25
27
28#include <list>
29#include <map>
30#include <set>
31#include <tuple>
32#include <utility>
33#include <vector>
34
36
37namespace GridTools
38{
59 template <int dim, int spacedim>
60 std::
61 tuple<std::vector<Point<spacedim>>, std::vector<CellData<dim>>, SubCellData>
63
80 template <int dim, int spacedim>
81 void
83 std::vector<CellData<dim>> &cells,
84 SubCellData &subcelldata);
85
104 template <int dim, int spacedim>
105 void
106 delete_duplicated_vertices(std::vector<Point<spacedim>> &all_vertices,
107 std::vector<CellData<dim>> &cells,
108 SubCellData &subcelldata,
109 std::vector<unsigned int> &considered_vertices,
110 const double tol = 1e-12);
111
119 template <int dim>
120 void
122 const double tol = 1e-12);
123
142 template <int dim, int spacedim>
143 void
145 const std::vector<Point<spacedim>> &all_vertices,
146 std::vector<CellData<dim>> &cells);
147
157 template <int dim, int spacedim>
158 std::size_t
160 const std::vector<Point<spacedim>> &all_vertices,
161 std::vector<CellData<dim>> &cells);
162
174 template <int dim>
175 void
176 consistently_order_cells(std::vector<CellData<dim>> &cells);
177
183 template <int dim, int spacedim>
184 std::map<unsigned int, Point<spacedim>>
186
220 template <int dim, int spacedim>
221 void
223 const bool isotropic = false,
224 const unsigned int max_iterations = 100);
225
250 template <int dim, int spacedim>
251 void
253 const double max_ratio = 1.6180339887,
254 const unsigned int max_iterations = 5);
255
292 template <int dim, int spacedim>
293 std::map<unsigned int, Point<spacedim>>
295 const Triangulation<dim, spacedim> &container,
296 const Mapping<dim, spacedim> &mapping =
298#ifndef _MSC_VER
300#else
302#endif
303 ));
304
313 template <int dim, int spacedim>
314 std::vector<
315 std::set<typename Triangulation<dim, spacedim>::active_cell_iterator>>
317
326 template <int dim, int spacedim>
327 void
330 DynamicSparsityPattern &connectivity);
331
340 template <int dim, int spacedim>
341 void
344 DynamicSparsityPattern &connectivity);
345
354 template <int dim, int spacedim>
355 void
358 const unsigned int level,
359 DynamicSparsityPattern &connectivity);
360
403 template <typename MeshType>
405 std::list<std::pair<
406 typename MeshType::cell_iterator,
407 typename MeshType::cell_iterator>> get_finest_common_cells(const MeshType
408 &mesh_1,
409 const MeshType
410 &mesh_2);
411
421 template <int dim, int spacedim>
422 bool
424 const Triangulation<dim, spacedim> &mesh_2);
425
437 template <typename MeshType>
439 bool have_same_coarse_mesh(const MeshType &mesh_1, const MeshType &mesh_2);
440
455 "The edges of the mesh are not consistently orientable.");
456
458} // namespace GridTools
459
461
462#endif
Abstract base class for mapping classes.
Definition mapping.h:318
Definition point.h:111
const Mapping< dim, spacedim > & get_default_linear_mapping() const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:177
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
Point< 3 > vertices[4]
unsigned int level
Definition grid_out.cc:4626
static ::ExceptionBase & ExcMeshNotOrientable()
#define DeclExceptionMsg(Exception, defaulttext)
Definition exceptions.h:494
void consistently_order_cells(std::vector< CellData< dim > > &cells)
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
Definition mapping.cc:294
void get_face_connectivity_of_cells(const Triangulation< dim, spacedim > &triangulation, DynamicSparsityPattern &connectivity)
void delete_unused_vertices(std::vector< Point< spacedim > > &vertices, std::vector< CellData< dim > > &cells, SubCellData &subcelldata)
std::map< unsigned int, Point< spacedim > > get_all_vertices_at_boundary(const Triangulation< dim, spacedim > &tria)
std::map< unsigned int, Point< spacedim > > extract_used_vertices(const Triangulation< dim, spacedim > &container, const Mapping< dim, spacedim > &mapping=(ReferenceCells::get_hypercube< dim >() .template get_default_linear_mapping< dim, spacedim >()))
std::list< std::pair< typename MeshType::cell_iterator, typename MeshType::cell_iterator > > get_finest_common_cells(const MeshType &mesh_1, const MeshType &mesh_2)
void remove_anisotropy(Triangulation< dim, spacedim > &tria, const double max_ratio=1.6180339887, const unsigned int max_iterations=5)
void remove_hanging_nodes(Triangulation< dim, spacedim > &tria, const bool isotropic=false, const unsigned int max_iterations=100)
std::size_t invert_cells_with_negative_measure(const std::vector< Point< spacedim > > &all_vertices, std::vector< CellData< dim > > &cells)
void delete_duplicated_vertices(std::vector< Point< spacedim > > &all_vertices, std::vector< CellData< dim > > &cells, SubCellData &subcelldata, std::vector< unsigned int > &considered_vertices, const double tol=1e-12)
std::vector< std::set< typename Triangulation< dim, spacedim >::active_cell_iterator > > vertex_to_cell_map(const Triangulation< dim, spacedim > &triangulation)
bool have_same_coarse_mesh(const Triangulation< dim, spacedim > &mesh_1, const Triangulation< dim, spacedim > &mesh_2)
void get_vertex_connectivity_of_cells(const Triangulation< dim, spacedim > &triangulation, DynamicSparsityPattern &connectivity)
void get_vertex_connectivity_of_cells_on_level(const Triangulation< dim, spacedim > &triangulation, const unsigned int level, DynamicSparsityPattern &connectivity)
void invert_all_negative_measure_cells(const std::vector< Point< spacedim > > &all_vertices, std::vector< CellData< dim > > &cells)
std::tuple< std::vector< Point< spacedim > >, std::vector< CellData< dim > >, SubCellData > get_coarse_mesh_description(const Triangulation< dim, spacedim > &tria)
constexpr const ReferenceCell & get_hypercube()
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation