Reference documentation for deal.II version 8.4.2
grid_tools.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2001 - 2016 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii__grid_tools_H
17 #define dealii__grid_tools_H
18 
19 
20 #include <deal.II/base/config.h>
21 #include <deal.II/fe/mapping.h>
22 #include <deal.II/grid/tria.h>
23 #include <deal.II/grid/tria_accessor.h>
24 #include <deal.II/grid/tria_iterator.h>
25 #include <deal.II/fe/mapping_q1.h>
26 
27 #include <bitset>
28 #include <list>
29 #include <set>
30 
31 DEAL_II_NAMESPACE_OPEN
32 
33 
34 template <int, int> class DoFHandler;
35 template <int, int> class Mapping;
36 namespace hp
37 {
38  template <int, int> class DoFHandler;
39  template <int, int> class MappingCollection;
40 }
41 
42 class SparsityPattern;
43 
44 namespace internal
45 {
46  template<int dim, int spacedim, class MeshType>
47  class ActiveCellIterator
48  {
49  public:
50  typedef typename MeshType::active_cell_iterator type;
51  };
52 
53  template<int dim, int spacedim>
54  class ActiveCellIterator<dim, spacedim, ::DoFHandler<dim, spacedim> >
55  {
56  public:
57 #ifndef _MSC_VER
58  typedef typename ::DoFHandler<dim, spacedim>::active_cell_iterator type;
59 #else
61 #endif
62  };
63 
64  template<int dim, int spacedim>
65  class ActiveCellIterator<dim, spacedim, ::hp::DoFHandler<dim, spacedim> >
66  {
67  public:
68 #ifndef _MSC_VER
69  typedef typename ::hp::DoFHandler<dim, spacedim>::active_cell_iterator type;
70 #else
72 #endif
73  };
74 }
75 
84 namespace GridTools
85 {
90 
97  template <int dim, int spacedim>
98  double diameter (const Triangulation<dim, spacedim> &tria);
99 
126  template <int dim, int spacedim>
127  double volume (const Triangulation<dim,spacedim> &tria,
129 
134  template <int dim, int spacedim>
135  double
137 
141  template <int dim, int spacedim>
142  double
144 
154  template <int dim>
155  double cell_measure (const std::vector<Point<dim> > &all_vertices,
156  const unsigned int (&vertex_indices)[GeometryInfo<dim>::vertices_per_cell]);
157 
163 
180  template <int dim, int spacedim>
181  void delete_unused_vertices (std::vector<Point<spacedim> > &vertices,
182  std::vector<CellData<dim> > &cells,
183  SubCellData &subcelldata);
184 
200  template <int dim, int spacedim>
201  void delete_duplicated_vertices (std::vector<Point<spacedim> > &all_vertices,
202  std::vector<CellData<dim> > &cells,
203  SubCellData &subcelldata,
204  std::vector<unsigned int> &considered_vertices,
205  const double tol=1e-12);
206 
212 
236  template <int dim, typename Transformation, int spacedim>
237  void transform (const Transformation &transformation,
238  Triangulation<dim,spacedim> &triangulation);
239 
245  template <int dim, int spacedim>
246  void shift (const Tensor<1,spacedim> &shift_vector,
247  Triangulation<dim,spacedim> &triangulation);
248 
249 
257  void rotate (const double angle,
258  Triangulation<2> &triangulation);
259 
295  template <int dim>
296  void laplace_transform (const std::map<unsigned int,Point<dim> > &new_points,
297  Triangulation<dim> &tria,
298  const Function<dim,double> *coefficient = 0);
299 
305  template <int dim, int spacedim>
306  std::map<unsigned int,Point<spacedim> >
308 
316  template <int dim, int spacedim>
317  void scale (const double scaling_factor,
318  Triangulation<dim, spacedim> &triangulation);
319 
330  template <int dim, int spacedim>
331  void distort_random (const double factor,
332  Triangulation<dim, spacedim> &triangulation,
333  const bool keep_boundary=true);
334 
340 
352  template <int dim, template <int, int> class MeshType, int spacedim>
353  unsigned int
354  find_closest_vertex (const MeshType<dim, spacedim> &mesh,
355  const Point<spacedim> &p);
356 
381  template<int dim, template <int, int> class MeshType, int spacedim>
382 #ifndef _MSC_VER
383  std::vector<typename MeshType<dim, spacedim>::active_cell_iterator>
384 #else
385  std::vector<typename ::internal::ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim> >::type>
386 #endif
387  find_cells_adjacent_to_vertex (const MeshType<dim,spacedim> &container,
388  const unsigned int vertex_index);
389 
390 
423  template <int dim, template <int,int> class MeshType, int spacedim>
424 #ifndef _MSC_VER
425  typename MeshType<dim,spacedim>::active_cell_iterator
426 #else
427  typename ::internal::ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim> >::type
428 #endif
429  find_active_cell_around_point (const MeshType<dim,spacedim> &mesh,
430  const Point<spacedim> &p);
431 
477  template <int dim, template<int, int> class MeshType, int spacedim>
478 #ifndef _MSC_VER
479  std::pair<typename MeshType<dim, spacedim>::active_cell_iterator, Point<dim> >
480 #else
481  std::pair<typename ::internal::ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim> >::type, Point<dim> >
482 #endif
484  const MeshType<dim,spacedim> &mesh,
485  const Point<spacedim> &p);
486 
508  template <int dim, int spacedim>
509  std::pair<typename hp::DoFHandler<dim, spacedim>::active_cell_iterator, Point<dim> >
511  const hp::DoFHandler<dim,spacedim> &mesh,
512  const Point<spacedim> &p);
513 
535  template <class MeshType>
536  std::vector<typename MeshType::active_cell_iterator>
537  get_active_child_cells (const typename MeshType::cell_iterator &cell);
538 
549  template <class MeshType>
550  void
551  get_active_neighbors (const typename MeshType::active_cell_iterator &cell,
552  std::vector<typename MeshType::active_cell_iterator> &active_neighbors);
553 
605  template <class MeshType>
606  std::vector<typename MeshType::active_cell_iterator>
608  (const MeshType &mesh,
609  const std_cxx11::function<bool (const typename MeshType::active_cell_iterator &)> &predicate);
610 
626  template <class MeshType>
627  std::vector<typename MeshType::active_cell_iterator>
628  compute_ghost_cell_halo_layer (const MeshType &mesh);
629 
630 
639  template <int dim, int spacedim>
640  std::vector<std::set<typename Triangulation<dim,spacedim>::active_cell_iterator> >
641  vertex_to_cell_map(const Triangulation<dim,spacedim> &triangulation);
642 
654  template <int dim, int spacedim>
655  std::map<unsigned int, types::global_vertex_index>
658 
659 
665 
674  template <int dim, int spacedim>
675  void
677  DynamicSparsityPattern &connectivity);
678 
684  template <int dim, int spacedim>
685  void
687  SparsityPattern &connectivity) DEAL_II_DEPRECATED;
688 
697  template <int dim, int spacedim>
698  void
700  DynamicSparsityPattern &connectivity);
701 
714  template <int dim, int spacedim>
715  void
716  partition_triangulation (const unsigned int n_partitions,
717  Triangulation<dim, spacedim> &triangulation);
718 
761  template <int dim, int spacedim>
762  void
763  partition_triangulation (const unsigned int n_partitions,
764  const SparsityPattern &cell_connection_graph,
765  Triangulation<dim,spacedim> &triangulation);
766 
777  template <int dim, int spacedim>
778  void
780  std::vector<types::subdomain_id> &subdomain);
781 
796  template <int dim, int spacedim>
797  unsigned int
799  const types::subdomain_id subdomain);
800 
801 
831  template <int dim, int spacedim>
832  std::vector<bool>
834 
840 
869  template <typename MeshType>
870  std::list<std::pair<typename MeshType::cell_iterator,
871  typename MeshType::cell_iterator> >
872  get_finest_common_cells (const MeshType &mesh_1,
873  const MeshType &mesh_2);
874 
884  template <int dim, int spacedim>
885  bool
887  const Triangulation<dim, spacedim> &mesh_2);
888 
898  template <typename MeshType>
899  bool
900  have_same_coarse_mesh (const MeshType &mesh_1,
901  const MeshType &mesh_2);
902 
908 
924  template <int dim, int spacedim>
927  Triangulation<dim,spacedim> &triangulation);
928 
929 
930 
931 
938 
939 
979  template <class MeshType>
980  std::vector<typename MeshType::active_cell_iterator>
981  get_patch_around_cell(const typename MeshType::active_cell_iterator &cell);
982 
983 
1007  template <class Container>
1008  std::vector<typename Container::cell_iterator>
1009  get_cells_at_coarsest_common_level(const std::vector<typename Container::active_cell_iterator> &patch_cells);
1010 
1072  template <class Container>
1073  void
1075  const std::vector<typename Container::active_cell_iterator> &patch,
1078  typename Container::active_cell_iterator> &patch_to_global_tria_map);
1079 
1116  template <class DoFHandlerType>
1117  std::map< types::global_dof_index,std::vector<typename DoFHandlerType::active_cell_iterator> >
1118  get_dof_to_support_patch_map(DoFHandlerType &dof_handler);
1119 
1120 
1126 
1127 
1128 #ifdef _MSC_VER
1129  // Microsoft's VC++ has a bug where it doesn't want to recognize that
1130  // an implementation (definition) of the extract_boundary_mesh function
1131  // matches a declaration. This can apparently only be avoided by
1132  // doing some contortion with the return type using the following
1133  // intermediate type. This is only used when using MS VC++ and uses
1134  // the direct way of doing it otherwise
1135  template <template <int,int> class MeshType, int dim, int spacedim>
1136  struct ExtractBoundaryMesh
1137  {
1138  typedef
1139  std::map<typename MeshType<dim-1,spacedim>::cell_iterator,
1140  typename MeshType<dim,spacedim>::face_iterator>
1141  return_type;
1142  };
1143 #endif
1144 
1150 
1156  template<typename CellIterator>
1157  struct PeriodicFacePair
1158  {
1162  CellIterator cell[2];
1163 
1168  unsigned int face_idx[2];
1169 
1175  std::bitset<3> orientation;
1176 
1190  };
1191 
1192 
1258  template<typename FaceIterator>
1259  bool
1260  orthogonal_equality (std::bitset<3> &orientation,
1261  const FaceIterator &face1,
1262  const FaceIterator &face2,
1263  const int direction,
1266  const FullMatrix<double> &matrix = FullMatrix<double>());
1267 
1268 
1272  template<typename FaceIterator>
1273  bool
1274  orthogonal_equality (const FaceIterator &face1,
1275  const FaceIterator &face2,
1276  const int direction,
1279  const FullMatrix<double> &matrix = FullMatrix<double>());
1280 
1281 
1334  template <typename MeshType>
1335  void
1337  (const MeshType &mesh,
1338  const types::boundary_id b_id1,
1339  const types::boundary_id b_id2,
1340  const int direction,
1341  std::vector<PeriodicFacePair<typename MeshType::cell_iterator> > &matched_pairs,
1343  const FullMatrix<double> &matrix = FullMatrix<double>());
1344 
1345 
1368  template <typename MeshType>
1369  void
1371  (const MeshType &mesh,
1372  const types::boundary_id b_id,
1373  const int direction,
1374  std::vector<PeriodicFacePair<typename MeshType::cell_iterator> > &matched_pairs,
1375  const ::Tensor<1,MeshType::space_dimension> &offset = ::Tensor<1,MeshType::space_dimension>(),
1376  const FullMatrix<double> &matrix = FullMatrix<double>());
1377 
1383 
1406  template <int dim, int spacedim>
1408  const bool reset_boundary_ids=false);
1409 
1441  template <int dim, int spacedim>
1443  const bool compute_face_ids=false);
1444 
1445 
1451 
1452 
1456  DeclException1 (ExcInvalidNumberOfPartitions,
1457  int,
1458  << "The number of partitions you gave is " << arg1
1459  << ", but must be greater than zero.");
1463  DeclException1 (ExcNonExistentSubdomain,
1464  int,
1465  << "The subdomain id " << arg1
1466  << " has no cells associated with it.");
1470  DeclException0 (ExcTriangulationHasBeenRefined);
1471 
1475  DeclException1 (ExcScalingFactorNotPositive,
1476  double,
1477  << "The scaling factor must be positive, but is " << arg1);
1481  template <int N>
1482  DeclException1 (ExcPointNotFoundInCoarseGrid,
1483  Point<N>,
1484  << "The point <" << arg1
1485  << "> could not be found inside any of the "
1486  << "coarse grid cells.");
1490  template <int N>
1491  DeclException1 (ExcPointNotFound,
1492  Point<N>,
1493  << "The point <" << arg1
1494  << "> could not be found inside any of the "
1495  << "subcells of a coarse grid cell.");
1496 
1500  DeclException1 (ExcVertexNotUsed,
1501  unsigned int,
1502  << "The given vertex " << arg1
1503  << " is not used in the given triangulation");
1504 
1505 
1508 } /*namespace GridTools*/
1509 
1510 
1511 
1512 /* ----------------- Template function --------------- */
1513 
1514 #ifndef DOXYGEN
1515 
1516 namespace GridTools
1517 {
1518 
1519  template <int dim, typename Predicate, int spacedim>
1520  void transform (const Predicate &predicate,
1521  Triangulation<dim, spacedim> &triangulation)
1522  {
1523  std::vector<bool> treated_vertices (triangulation.n_vertices(),
1524  false);
1525 
1526  // loop over all active cells, and
1527  // transform those vertices that
1528  // have not yet been touched. note
1529  // that we get to all vertices in
1530  // the triangulation by only
1531  // visiting the active cells.
1533  cell = triangulation.begin_active (),
1534  endc = triangulation.end ();
1535  for (; cell!=endc; ++cell)
1536  for (unsigned int v=0; v<GeometryInfo<dim>::vertices_per_cell; ++v)
1537  if (treated_vertices[cell->vertex_index(v)] == false)
1538  {
1539  // transform this vertex
1540  cell->vertex(v) = predicate(cell->vertex(v));
1541  // and mark it as treated
1542  treated_vertices[cell->vertex_index(v)] = true;
1543  };
1544 
1545 
1546  // now fix any vertices on hanging nodes so that we don't create any holes
1547  if (dim==2)
1548  {
1550  cell = triangulation.begin_active(),
1551  endc = triangulation.end();
1552  for (; cell!=endc; ++cell)
1553  for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
1554  if (cell->face(face)->has_children() &&
1555  !cell->face(face)->at_boundary())
1556  {
1557  // this line has children
1558  cell->face(face)->child(0)->vertex(1)
1559  = (cell->face(face)->vertex(0) +
1560  cell->face(face)->vertex(1)) / 2;
1561  }
1562  }
1563  else if (dim==3)
1564  {
1566  cell = triangulation.begin_active(),
1567  endc = triangulation.end();
1568  for (; cell!=endc; ++cell)
1569  for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; ++face)
1570  if (cell->face(face)->has_children() &&
1571  !cell->face(face)->at_boundary())
1572  {
1573  // this face has hanging nodes
1574  cell->face(face)->child(0)->vertex(1)
1575  = (cell->face(face)->vertex(0) + cell->face(face)->vertex(1)) / 2.0;
1576  cell->face(face)->child(0)->vertex(2)
1577  = (cell->face(face)->vertex(0) + cell->face(face)->vertex(2)) / 2.0;
1578  cell->face(face)->child(1)->vertex(3)
1579  = (cell->face(face)->vertex(1) + cell->face(face)->vertex(3)) / 2.0;
1580  cell->face(face)->child(2)->vertex(3)
1581  = (cell->face(face)->vertex(2) + cell->face(face)->vertex(3)) / 2.0;
1582 
1583  // center of the face
1584  cell->face(face)->child(0)->vertex(3)
1585  = (cell->face(face)->vertex(0) + cell->face(face)->vertex(1)
1586  + cell->face(face)->vertex(2) + cell->face(face)->vertex(3)) / 4.0;
1587  }
1588  }
1589  }
1590 
1591 
1592 
1593  template <class MeshType>
1594  std::vector<typename MeshType::active_cell_iterator>
1595  get_active_child_cells (const typename MeshType::cell_iterator &cell)
1596  {
1597  std::vector<typename MeshType::active_cell_iterator> child_cells;
1598 
1599  if (cell->has_children())
1600  {
1601  for (unsigned int child=0;
1602  child<cell->n_children(); ++child)
1603  if (cell->child (child)->has_children())
1604  {
1605  const std::vector<typename MeshType::active_cell_iterator>
1606  children = get_active_child_cells<MeshType> (cell->child(child));
1607  child_cells.insert (child_cells.end(),
1608  children.begin(), children.end());
1609  }
1610  else
1611  child_cells.push_back (cell->child(child));
1612  }
1613 
1614  return child_cells;
1615  }
1616 
1617 
1618 
1619  template <class MeshType>
1620  void
1621  get_active_neighbors(const typename MeshType::active_cell_iterator &cell,
1622  std::vector<typename MeshType::active_cell_iterator> &active_neighbors)
1623  {
1624  active_neighbors.clear ();
1625  for (unsigned int n=0; n<GeometryInfo<MeshType::dimension>::faces_per_cell; ++n)
1626  if (! cell->at_boundary(n))
1627  {
1628  if (MeshType::dimension == 1)
1629  {
1630  // check children of neighbor. note
1631  // that in 1d children of the neighbor
1632  // may be further refined. In 1d the
1633  // case is simple since we know what
1634  // children bound to the present cell
1635  typename MeshType::cell_iterator
1636  neighbor_child = cell->neighbor(n);
1637  if (!neighbor_child->active())
1638  {
1639  while (neighbor_child->has_children())
1640  neighbor_child = neighbor_child->child (n==0 ? 1 : 0);
1641 
1642  Assert (neighbor_child->neighbor(n==0 ? 1 : 0)==cell,
1643  ExcInternalError());
1644  }
1645  active_neighbors.push_back (neighbor_child);
1646  }
1647  else
1648  {
1649  if (cell->face(n)->has_children())
1650  // this neighbor has children. find
1651  // out which border to the present
1652  // cell
1653  for (unsigned int c=0; c<cell->face(n)->number_of_children(); ++c)
1654  active_neighbors.push_back (cell->neighbor_child_on_subface(n,c));
1655  else
1656  {
1657  // the neighbor must be active
1658  // himself
1659  Assert(cell->neighbor(n)->active(), ExcInternalError());
1660  active_neighbors.push_back(cell->neighbor(n));
1661  }
1662  }
1663  }
1664  }
1665 
1666 
1667 
1668 // declaration of explicit specializations
1669 
1670  template <>
1671  double
1672  cell_measure<3>(const std::vector<Point<3> > &all_vertices,
1673  const unsigned int (&vertex_indices) [GeometryInfo<3>::vertices_per_cell]);
1674 
1675  template <>
1676  double
1677  cell_measure<2>(const std::vector<Point<2> > &all_vertices,
1678  const unsigned int (&vertex_indices) [GeometryInfo<2>::vertices_per_cell]);
1679 }
1680 
1681 #endif
1682 
1683 DEAL_II_NAMESPACE_CLOSE
1684 
1685 /*---------------------------- grid_tools.h ---------------------------*/
1686 /* end of #ifndef dealii__grid_tools_H */
1687 #endif
1688 /*---------------------------- grid_tools.h ---------------------------*/
unsigned int n_vertices() const
std::map< unsigned int, Point< spacedim > > get_all_vertices_at_boundary(const Triangulation< dim, spacedim > &tria)
Definition: grid_tools.cc:706
void copy_boundary_to_manifold_id(Triangulation< dim, spacedim > &tria, const bool reset_boundary_ids=false)
Definition: grid_tools.cc:3696
double diameter(const Triangulation< dim, spacedim > &tria)
Definition: grid_tools.cc:66
void distort_random(const double factor, Triangulation< dim, spacedim > &triangulation, const bool keep_boundary=true)
Definition: grid_tools.cc:738
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)
Definition: grid_tools.cc:422
double maximal_cell_diameter(const Triangulation< dim, spacedim > &triangulation)
Definition: grid_tools.cc:2253
bool have_same_coarse_mesh(const Triangulation< dim, spacedim > &mesh_1, const Triangulation< dim, spacedim > &mesh_2)
Definition: grid_tools.cc:2196
void get_subdomain_association(const DoFHandlerType &dof_handler, std::vector< types::subdomain_id > &subdomain)
Definition: dof_tools.cc:1252
bool orthogonal_equality(std::bitset< 3 > &orientation, const FaceIterator &face1, const FaceIterator &face2, const int direction, const Tensor< 1, FaceIterator::AccessorType::space_dimension > &offset=Tensor< 1, FaceIterator::AccessorType::space_dimension >(), const FullMatrix< double > &matrix=FullMatrix< double >())
Definition: grid_tools.cc:3438
void scale(const double scaling_factor, Triangulation< dim, spacedim > &triangulation)
Definition: grid_tools.cc:566
double volume(const Triangulation< dim, spacedim > &tria, const Mapping< dim, spacedim > &mapping=(StaticMappingQ1< dim, spacedim >::mapping))
Definition: grid_tools.cc:121
std::vector< std::set< typename Triangulation< dim, spacedim >::active_cell_iterator > > vertex_to_cell_map(const Triangulation< dim, spacedim > &triangulation)
Definition: grid_tools.cc:1550
void laplace_transform(const std::map< unsigned int, Point< dim > > &new_points, Triangulation< dim > &tria, const Function< dim, double > *coefficient=0)
std::vector< typename MeshType::active_cell_iterator > get_active_child_cells(const typename MeshType::cell_iterator &cell)
active_cell_iterator begin_active(const unsigned int level=0) const
Definition: tria.cc:10397
std::map< unsigned int, types::global_vertex_index > compute_local_to_global_vertex_index_map(const parallel::distributed::Triangulation< dim, spacedim > &triangulation)
Definition: grid_tools.cc:1594
std::bitset< 3 > orientation
Definition: grid_tools.h:1175
void get_vertex_connectivity_of_cells(const Triangulation< dim, spacedim > &triangulation, DynamicSparsityPattern &connectivity)
Definition: grid_tools.cc:1933
cell_iterator end() const
Definition: tria.cc:10465
#define DEAL_II_DEPRECATED
Definition: config.h:88
double cell_measure(const std::vector< Point< dim > > &all_vertices, const unsigned int(&vertex_indices)[GeometryInfo< dim >::vertices_per_cell])
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:542
#define Assert(cond, exc)
Definition: exceptions.h:294
Abstract base class for mapping classes.
Definition: dof_tools.h:52
void get_active_neighbors(const typename MeshType::active_cell_iterator &cell, std::vector< typename MeshType::active_cell_iterator > &active_neighbors)
void collect_periodic_faces(const MeshType &mesh, const types::boundary_id b_id1, const types::boundary_id b_id2, const 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 >())
Definition: grid_tools.cc:3568
#define DeclException0(Exception0)
Definition: exceptions.h:522
void 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)
Definition: grid_tools.cc:2916
void copy_material_to_manifold_id(Triangulation< dim, spacedim > &tria, const bool compute_face_ids=false)
Definition: grid_tools.cc:3739
void rotate(const double angle, Triangulation< 2 > &triangulation)
Definition: grid_tools.cc:556
void partition_triangulation(const unsigned int n_partitions, Triangulation< dim, spacedim > &triangulation)
Definition: grid_tools.cc:1959
Triangulation< dim, spacedim >::DistortedCellList fix_up_distorted_child_cells(const typename Triangulation< dim, spacedim >::DistortedCellList &distorted_cells, Triangulation< dim, spacedim > &triangulation)
Definition: grid_tools.cc:2797
unsigned int subdomain_id
Definition: types.h:42
Definition: hp.h:102
std::vector< typename MeshType::active_cell_iterator > compute_ghost_cell_halo_layer(const MeshType &mesh)
Definition: grid_tools.cc:1528
double minimal_cell_diameter(const Triangulation< dim, spacedim > &triangulation)
Definition: grid_tools.cc:2238
void transform(const InputIterator &begin_in, const InputIterator &end_in, OutputIterator out, Predicate &predicate, const unsigned int grainsize)
Definition: parallel.h:182
std::map< types::global_dof_index, std::vector< typename DoFHandlerType::active_cell_iterator > > get_dof_to_support_patch_map(DoFHandlerType &dof_handler)
Definition: grid_tools.cc:3054
unsigned int find_closest_vertex(const MeshType< dim, spacedim > &mesh, const Point< spacedim > &p)
Definition: grid_tools.cc:960
std::vector< typename MeshType< dim, spacedim >::active_cell_iterator > find_cells_adjacent_to_vertex(const MeshType< dim, spacedim > &container, const unsigned int vertex_index)
Definition: grid_tools.cc:1007
void get_face_connectivity_of_cells(const Triangulation< dim, spacedim > &triangulation, DynamicSparsityPattern &connectivity)
Definition: grid_tools.cc:1874
void delete_unused_vertices(std::vector< Point< spacedim > > &vertices, std::vector< CellData< dim > > &cells, SubCellData &subcelldata)
Definition: grid_tools.cc:366
FullMatrix< double > matrix
Definition: grid_tools.h:1189
std::vector< bool > get_locally_owned_vertices(const Triangulation< dim, spacedim > &triangulation)
Definition: grid_tools.cc:2075
std::vector< typename Container::cell_iterator > get_cells_at_coarsest_common_level(const std::vector< typename Container::active_cell_iterator > &patch_cells)
Definition: grid_tools.cc:2877
unsigned char boundary_id
Definition: types.h:110
std::vector< typename MeshType::active_cell_iterator > compute_active_cell_halo_layer(const MeshType &mesh, const std_cxx11::function< bool(const typename MeshType::active_cell_iterator &)> &predicate)
Definition: grid_tools.cc:1490
std::list< std::pair< typename MeshType::cell_iterator, typename MeshType::cell_iterator > > get_finest_common_cells(const MeshType &mesh_1, const MeshType &mesh_2)
Definition: grid_tools.cc:2105
MeshType< dim, spacedim >::active_cell_iterator find_active_cell_around_point(const MeshType< dim, spacedim > &mesh, const Point< spacedim > &p)
Definition: grid_tools.cc:1205
unsigned int count_cells_with_subdomain_association(const Triangulation< dim, spacedim > &triangulation, const types::subdomain_id subdomain)
Definition: grid_tools.cc:2058
std::vector< typename MeshType::active_cell_iterator > get_patch_around_cell(const typename MeshType::active_cell_iterator &cell)
Definition: grid_tools.cc:2834