deal.II version GIT relicensing-2169-gec1b43f35b 2024-11-22 07:10:00+00:00
\(\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
Namespaces | Functions
grid_tools_dof_handlers.cc File Reference
#include <deal.II/base/geometry_info.h>
#include <deal.II/base/point.h>
#include <deal.II/base/tensor.h>
#include <deal.II/distributed/fully_distributed_tria.h>
#include <deal.II/distributed/shared_tria.h>
#include <deal.II/distributed/tria.h>
#include <deal.II/dofs/dof_accessor.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/fe/mapping_q.h>
#include <deal.II/grid/filtered_iterator.h>
#include <deal.II/grid/grid_tools.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/hp/mapping_collection.h>
#include <deal.II/lac/full_matrix.h>
#include <algorithm>
#include <array>
#include <cmath>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <optional>
#include <set>
#include <vector>
#include "grid_tools_dof_handlers.inst"

Go to the source code of this file.

Namespaces

namespace  GridTools
 

Functions

template<typename CellIterator >
void GridTools::match_periodic_face_pairs (std::set< std::pair< CellIterator, unsigned int > > &pairs1, std::set< std::pair< std_cxx20::type_identity_t< CellIterator >, unsigned int > > &pairs2, const unsigned int direction, std::vector< PeriodicFacePair< CellIterator > > &matched_pairs, const ::Tensor< 1, CellIterator::AccessorType::space_dimension > &offset, const FullMatrix< double > &matrix)
 
template<typename MeshType >
void GridTools::collect_periodic_faces (const MeshType &mesh, const types::boundary_id b_id, const unsigned int direction, std::vector< PeriodicFacePair< typename MeshType::cell_iterator > > &matched_pairs, const Tensor< 1, MeshType::space_dimension > &offset, const FullMatrix< double > &matrix)
 
template<int spacedim>
bool GridTools::orthogonal_equality (const Point< spacedim > &point1, const Point< spacedim > &point2, const unsigned int direction, const Tensor< 1, spacedim > &offset, const FullMatrix< double > &matrix)
 
Finding cells and vertices of a triangulation
template<int dim, template< int, int > class MeshType, int spacedim>
unsigned int GridTools::find_closest_vertex (const MeshType< dim, spacedim > &mesh, const Point< spacedim > &p, const std::vector< bool > &marked_vertices={})
 
template<int dim, template< int, int > class MeshType, int spacedim>
unsigned int GridTools::find_closest_vertex (const Mapping< dim, spacedim > &mapping, const MeshType< dim, spacedim > &mesh, const Point< spacedim > &p, const std::vector< bool > &marked_vertices={})
 
template<typename MeshType >
std::vector< typename MeshType::active_cell_iterator > GridTools::find_cells_adjacent_to_vertex (const MeshType &container, const unsigned int vertex_index)
 
template<int dim, template< int, int > class MeshType, int spacedim>
MeshType< dim, spacedim >::active_cell_iterator GridTools::find_active_cell_around_point (const MeshType< dim, spacedim > &mesh, const Point< spacedim > &p, const std::vector< bool > &marked_vertices={}, const double tolerance=1.e-10)
 
template<int dim, template< int, int > class MeshType, int spacedim>
std::pair< typename MeshType< dim, spacedim >::active_cell_iterator, Point< dim > > GridTools::find_active_cell_around_point (const Mapping< dim, spacedim > &mapping, const MeshType< dim, spacedim > &mesh, const Point< spacedim > &p, const std::vector< bool > &marked_vertices={}, const double tolerance=1.e-10)
 
template<int dim, template< int, int > class MeshType, int spacedim>
std::vector< std::pair< typename MeshType< dim, spacedim >::active_cell_iterator, Point< dim > > > GridTools::find_all_active_cells_around_point (const Mapping< dim, spacedim > &mapping, const MeshType< dim, spacedim > &mesh, const Point< spacedim > &p, const double tolerance=1e-10, const std::vector< bool > &marked_vertices={})
 
template<int dim, template< int, int > class MeshType, int spacedim>
std::vector< std::pair< typename MeshType< dim, spacedim >::active_cell_iterator, Point< dim > > > GridTools::find_all_active_cells_around_point (const Mapping< dim, spacedim > &mapping, const MeshType< dim, spacedim > &mesh, const Point< spacedim > &p, const double tolerance, const std::pair< typename MeshType< dim, spacedim >::active_cell_iterator, Point< dim > > &first_cell, const std::vector< std::set< typename MeshType< dim, spacedim >::active_cell_iterator > > *vertex_to_cells=nullptr)
 
template<typename MeshType >
std::vector< typename MeshType::active_cell_iterator > GridTools::compute_active_cell_halo_layer (const MeshType &mesh, const std::function< bool(const typename MeshType::active_cell_iterator &)> &predicate)
 
template<typename MeshType >
std::vector< typename MeshType::cell_iterator > GridTools::compute_cell_halo_layer_on_level (const MeshType &mesh, const std::function< bool(const typename MeshType::cell_iterator &)> &predicate, const unsigned int level)
 
template<typename MeshType >
std::vector< typename MeshType::active_cell_iterator > GridTools::compute_ghost_cell_halo_layer (const MeshType &mesh)
 
template<typename MeshType >
std::vector< typename MeshType::active_cell_iterator > GridTools::compute_active_cell_layer_within_distance (const MeshType &mesh, const std::function< bool(const typename MeshType::active_cell_iterator &)> &predicate, const double layer_thickness)
 
template<typename MeshType >
std::vector< typename MeshType::active_cell_iterator > GridTools::compute_ghost_cell_layer_within_distance (const MeshType &mesh, const double layer_thickness)
 
template<int dim, int spacedim>
std::pair< typename DoFHandler< dim, spacedim >::active_cell_iterator, Point< dim > > GridTools::find_active_cell_around_point (const hp::MappingCollection< dim, spacedim > &mapping, const DoFHandler< dim, spacedim > &mesh, const Point< spacedim > &p, const double tolerance=1.e-10)
 
Information about meshes and cells
template<typename MeshType >
std::pair< Point< MeshType::space_dimension >, Point< MeshType::space_dimension > > GridTools::compute_bounding_box (const MeshType &mesh, const std::function< bool(const typename MeshType::active_cell_iterator &)> &predicate)
 
Comparing different meshes
template<typename MeshType >
std::list< std::pair< typename MeshType::cell_iterator, typename MeshType::cell_iterator > > GridTools::get_finest_common_cells (const MeshType &mesh_1, const MeshType &mesh_2)
 
template<int dim, int spacedim>
bool GridTools::have_same_coarse_mesh (const Triangulation< dim, spacedim > &mesh_1, const Triangulation< dim, spacedim > &mesh_2)
 
template<typename MeshType >
bool GridTools::have_same_coarse_mesh (const MeshType &mesh_1, const MeshType &mesh_2)
 
Extracting and creating patches of cells

These functions extract and create patches of cells surrounding a single cell, and creating triangulation out of them.

template<typename MeshType >
std::vector< typename MeshType::active_cell_iterator > GridTools::get_patch_around_cell (const typename MeshType::active_cell_iterator &cell)
 
template<class Container >
std::vector< typename Container::cell_iterator > GridTools::get_cells_at_coarsest_common_level (const std::vector< typename Container::active_cell_iterator > &patch_cells)
 
template<class Container >
void GridTools::build_triangulation_from_patch (const std::vector< typename Container::active_cell_iterator > &patch, Triangulation< Container::dimension, Container::space_dimension > &local_triangulation, std::map< typename Triangulation< Container::dimension, Container::space_dimension >::active_cell_iterator, typename Container::active_cell_iterator > &patch_to_global_tria_map)
 
template<int dim, int spacedim>
std::map< types::global_dof_index, std::vector< typename DoFHandler< dim, spacedim >::active_cell_iterator > > GridTools::get_dof_to_support_patch_map (DoFHandler< dim, spacedim > &dof_handler)
 
Dealing with periodic domains
template<typename MeshType >
void GridTools::collect_periodic_faces (const MeshType &mesh, const types::boundary_id b_id1, const types::boundary_id b_id2, const unsigned int direction, std::vector< PeriodicFacePair< typename MeshType::cell_iterator > > &matched_pairs, const Tensor< 1, MeshType::space_dimension > &offset=::Tensor< 1, MeshType::space_dimension >(), const FullMatrix< double > &matrix=FullMatrix< double >())
 
template<typename FaceIterator >
std::optional< unsigned char > GridTools::orthogonal_equality (const FaceIterator &face1, const FaceIterator &face2, const unsigned int direction, const Tensor< 1, FaceIterator::AccessorType::space_dimension > &offset=Tensor< 1, FaceIterator::AccessorType::space_dimension >(), const FullMatrix< double > &matrix=FullMatrix< double >())