Reference documentation for deal.II version 9.0.0
tria_boundary.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2018 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 
83 template <int dim, int spacedim=dim>
84 class DEAL_II_DEPRECATED Boundary : public FlatManifold<dim, spacedim>
85 {
86 public:
87 
92  virtual ~Boundary () override = default;
93 
97  virtual std::unique_ptr<Manifold<dim,spacedim> > clone() const override;
98 
117  virtual
118  void
119  get_intermediate_points_on_line (const typename Triangulation<dim,spacedim>::line_iterator &line,
120  std::vector<Point<spacedim> > &points) const;
121 
142  virtual
143  void
144  get_intermediate_points_on_quad (const typename Triangulation<dim,spacedim>::quad_iterator &quad,
145  std::vector<Point<spacedim> > &points) const;
146 
153  void
154  get_intermediate_points_on_face (const typename Triangulation<dim,spacedim>::face_iterator &face,
155  std::vector<Point<spacedim> > &points) const;
156 
173  virtual
175  project_to_surface (const typename Triangulation<dim,spacedim>::line_iterator &line,
176  const Point<spacedim> &candidate) const;
177 
186  virtual
188  project_to_surface (const typename Triangulation<dim,spacedim>::quad_iterator &quad,
189  const Point<spacedim> &candidate) const;
190 
199  virtual
201  project_to_surface (const typename Triangulation<dim,spacedim>::hex_iterator &hex,
202  const Point<spacedim> &candidate) const;
203 
204 protected:
213  const std::vector<Point<1> > &
214  get_line_support_points (const unsigned int n_intermediate_points) const;
215 
216 private:
220  mutable std::vector<std::shared_ptr<QGaussLobatto<1> > > points;
221 
226 };
227 
228 
229 
247 template <int dim, int spacedim=dim>
248 class DEAL_II_DEPRECATED StraightBoundary : public Boundary<dim,spacedim>
249 {
250 public:
254  StraightBoundary ();
255 
259  virtual std::unique_ptr<Manifold<dim,spacedim> > clone() const override;
260 
267  virtual Point<spacedim>
268  get_new_point_on_line (const typename Triangulation<dim,spacedim>::line_iterator &line) const override;
269 
278  virtual
280  get_new_point_on_quad (const typename Triangulation<dim,spacedim>::quad_iterator &quad) const override;
281 
289  virtual
290  void
291  get_intermediate_points_on_line (const typename Triangulation<dim,spacedim>::line_iterator &line,
292  std::vector<Point<spacedim> > &points) const override;
293 
301  virtual
302  void
303  get_intermediate_points_on_quad (const typename Triangulation<dim,spacedim>::quad_iterator &quad,
304  std::vector<Point<spacedim> > &points) const override;
305 
312  virtual
315  const Point<spacedim> &p) const override;
316 
323  virtual
324  void
326  typename Boundary<dim,spacedim>::FaceVertexNormals &face_vertex_normals) const override;
327 
342  virtual
344  project_to_surface (const typename Triangulation<dim,spacedim>::line_iterator &line,
345  const Point<spacedim> &candidate) const override;
346 
358  virtual
360  project_to_surface (const typename Triangulation<dim,spacedim>::quad_iterator &quad,
361  const Point<spacedim> &candidate) const override;
362 
375  virtual
377  project_to_surface (const typename Triangulation<dim,spacedim>::hex_iterator &hex,
378  const Point<spacedim> &candidate) const override;
379 };
380 
381 
382 
383 /* -------------- declaration of explicit specializations ------------- */
384 
385 #ifndef DOXYGEN
386 
387 template <>
388 void
391  std::vector<Point<1> > &) const;
392 
393 template <>
394 void
397  std::vector<Point<2> > &) const;
398 
399 template <>
400 void
403  std::vector<Point<3> > &) 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
virtual Tensor< 1, spacedim > normal_vector(const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const override
Definition: manifold.cc:841
virtual void get_intermediate_points_on_line(const typename Triangulation< dim, spacedim >::line_iterator &line, std::vector< Point< spacedim > > &points) const
std::vector< std::shared_ptr< QGaussLobatto< 1 > > > points
virtual void get_intermediate_points_on_quad(const typename Triangulation< dim, spacedim >::quad_iterator &quad, std::vector< Point< spacedim > > &points) const
Definition: tria.h:45
virtual Point< spacedim > get_new_point_on_line(const typename Triangulation< dim, spacedim >::line_iterator &line) const
Definition: manifold.cc:306
virtual void get_intermediate_points_on_quad(const typename Triangulation< dim, spacedim >::quad_iterator &quad, std::vector< Point< spacedim > > &points) const override
void get_intermediate_points_on_face(const typename Triangulation< dim, spacedim >::face_iterator &face, std::vector< Point< spacedim > > &points) const
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
Definition: manifold.cc:518
Threads::Mutex mutex
virtual Point< spacedim > get_new_point_on_quad(const typename Triangulation< dim, spacedim >::quad_iterator &quad) const
Definition: manifold.cc:320
virtual void get_normals_at_vertices(const typename Triangulation< dim, spacedim >::face_iterator &face, typename Manifold< dim, spacedim >::FaceVertexNormals &face_vertex_normals) const override
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual Point< spacedim > get_new_point_on_quad(const typename Triangulation< dim, spacedim >::quad_iterator &quad) const override
virtual Point< spacedim > project_to_surface(const typename Triangulation< dim, spacedim >::line_iterator &line, const Point< spacedim > &candidate) const
virtual Point< spacedim > project_to_surface(const typename Triangulation< dim, spacedim >::line_iterator &line, const Point< spacedim > &candidate) const override