Reference documentation for deal.II version 8.5.1
tria_boundary.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 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__tria_boundary_h
17 #define dealii__tria_boundary_h
18 
19 
20 /*---------------------------- boundary-function.h ---------------------------*/
21 
22 #include <deal.II/base/config.h>
23 #include <deal.II/base/subscriptor.h>
24 #include <deal.II/base/quadrature_lib.h>
25 #include <deal.II/base/thread_management.h>
26 #include <deal.II/base/point.h>
27 #include <deal.II/grid/tria.h>
28 #include <deal.II/grid/manifold.h>
29 
30 DEAL_II_NAMESPACE_OPEN
31 
80 template <int dim, int spacedim=dim>
81 class Boundary : public FlatManifold<dim, spacedim>
82 {
83 public:
84 
89  virtual ~Boundary ();
90 
91 
110  virtual
111  void
112  get_intermediate_points_on_line (const typename Triangulation<dim,spacedim>::line_iterator &line,
113  std::vector<Point<spacedim> > &points) const;
114 
135  virtual
136  void
137  get_intermediate_points_on_quad (const typename Triangulation<dim,spacedim>::quad_iterator &quad,
138  std::vector<Point<spacedim> > &points) const;
139 
146  void
148  std::vector<Point<spacedim> > &points) const;
149 
166  virtual
168  project_to_surface (const typename Triangulation<dim,spacedim>::line_iterator &line,
169  const Point<spacedim> &candidate) const;
170 
179  virtual
181  project_to_surface (const typename Triangulation<dim,spacedim>::quad_iterator &quad,
182  const Point<spacedim> &candidate) const;
183 
192  virtual
194  project_to_surface (const typename Triangulation<dim,spacedim>::hex_iterator &hex,
195  const Point<spacedim> &candidate) const;
196 
197 protected:
206  const std::vector<Point<1> > &
207  get_line_support_points (const unsigned int n_intermediate_points) const;
208 
209 private:
213  mutable std::vector<std_cxx11::shared_ptr<QGaussLobatto<1> > > points;
214 
219 };
220 
221 
222 
237 template <int dim, int spacedim=dim>
238 class StraightBoundary : public Boundary<dim,spacedim>
239 {
240 public:
244  StraightBoundary ();
245 
252  virtual Point<spacedim>
253  get_new_point_on_line (const typename Triangulation<dim,spacedim>::line_iterator &line) const;
254 
263  virtual
265  get_new_point_on_quad (const typename Triangulation<dim,spacedim>::quad_iterator &quad) const;
266 
274  virtual
275  void
276  get_intermediate_points_on_line (const typename Triangulation<dim,spacedim>::line_iterator &line,
277  std::vector<Point<spacedim> > &points) const;
278 
286  virtual
287  void
288  get_intermediate_points_on_quad (const typename Triangulation<dim,spacedim>::quad_iterator &quad,
289  std::vector<Point<spacedim> > &points) const;
290 
297  virtual
300  const Point<spacedim> &p) const;
301 
308  virtual
309  void
311  typename Boundary<dim,spacedim>::FaceVertexNormals &face_vertex_normals) const;
312 
327  virtual
329  project_to_surface (const typename Triangulation<dim,spacedim>::line_iterator &line,
330  const Point<spacedim> &candidate) const;
331 
343  virtual
345  project_to_surface (const typename Triangulation<dim,spacedim>::quad_iterator &quad,
346  const Point<spacedim> &candidate) const;
347 
360  virtual
362  project_to_surface (const typename Triangulation<dim,spacedim>::hex_iterator &hex,
363  const Point<spacedim> &candidate) const;
364 };
365 
366 
367 
368 /* -------------- declaration of explicit specializations ------------- */
369 
370 #ifndef DOXYGEN
371 
372 template <>
373 void
376  std::vector<Point<1> > &) const;
377 
378 template <>
379 void
382  std::vector<Point<2> > &) const;
383 
384 template <>
385 void
388  std::vector<Point<3> > &) const;
389 template <>
390 void
394 template <>
395 void
398  Boundary<2,2>::FaceVertexNormals &face_vertex_normals) const;
399 template <>
400 void
403  Boundary<3,3>::FaceVertexNormals &face_vertex_normals) const;
404 
405 template <>
406 Point<3>
408 get_new_point_on_quad (const Triangulation<3,3>::quad_iterator &quad) const;
409 
410 template <>
411 void
413 get_intermediate_points_on_quad (const Triangulation<3,3>::quad_iterator &quad,
414  std::vector<Point<3> > &points) const;
415 
416 template <>
417 Point<3>
419 project_to_surface (const Triangulation<1, 3>::quad_iterator &quad,
420  const Point<3> &y) const;
421 
422 
423 #endif // DOXYGEN
424 
425 DEAL_II_NAMESPACE_CLOSE
426 
427 #endif
const std::vector< Point< 1 > > & get_line_support_points(const unsigned int n_intermediate_points) const
virtual Tensor< 1, spacedim > normal_vector(const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const
virtual void get_intermediate_points_on_line(const typename Triangulation< dim, spacedim >::line_iterator &line, std::vector< Point< spacedim > > &points) const
virtual Point< spacedim > get_new_point_on_line(const typename Triangulation< dim, spacedim >::line_iterator &line) const
virtual void get_intermediate_points_on_line(const typename Triangulation< dim, spacedim >::line_iterator &line, std::vector< Point< spacedim > > &points) const
virtual Point< spacedim > project_to_surface(const typename Triangulation< dim, spacedim >::line_iterator &line, const Point< spacedim > &candidate) const
virtual void get_intermediate_points_on_quad(const typename Triangulation< dim, spacedim >::quad_iterator &quad, std::vector< Point< spacedim > > &points) const
Definition: tria.h:52
virtual Point< spacedim > get_new_point_on_quad(const typename Triangulation< dim, spacedim >::quad_iterator &quad) const
std::vector< std_cxx11::shared_ptr< QGaussLobatto< 1 > > > points
virtual ~Boundary()
void get_intermediate_points_on_face(const typename Triangulation< dim, spacedim >::face_iterator &face, std::vector< Point< spacedim > > &points) const
Threads::Mutex mutex
virtual void get_intermediate_points_on_quad(const typename Triangulation< dim, spacedim >::quad_iterator &quad, std::vector< Point< spacedim > > &points) const
virtual Point< spacedim > project_to_surface(const typename Triangulation< dim, spacedim >::line_iterator &line, const Point< spacedim > &candidate) const
virtual void get_normals_at_vertices(const typename Triangulation< dim, spacedim >::face_iterator &face, typename Boundary< dim, spacedim >::FaceVertexNormals &face_vertex_normals) const