Reference documentation for deal.II version 9.4.1
\(\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
manifold_lib.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2014 - 2020 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.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16
17#ifndef dealii_occ_manifold_lib_h
18#define dealii_occ_manifold_lib_h
19
20#include <deal.II/base/config.h>
21
22#ifdef DEAL_II_WITH_OPENCASCADE
23
25
27
28// opencascade needs "HAVE_CONFIG_H" to be exported...
29# define HAVE_CONFIG_H
30# include <Adaptor3d_Curve.hxx>
31# if !DEAL_II_OPENCASCADE_VERSION_GTE(7, 6, 0)
32# include <Adaptor3d_HCurve.hxx>
33# endif
34# include <BRepAdaptor_Curve.hxx>
35# undef HAVE_CONFIG_H
36
38
44namespace OpenCASCADE
45{
65 template <int dim, int spacedim>
66 class NormalProjectionManifold : public FlatManifold<dim, spacedim>
67 {
68 public:
76 NormalProjectionManifold(const TopoDS_Shape &sh,
77 const double tolerance = 1e-7);
78
82 virtual std::unique_ptr<Manifold<dim, spacedim>>
83 clone() const override;
84
94 virtual Point<spacedim>
96 const ArrayView<const Point<spacedim>> &surrounding_points,
97 const Point<spacedim> & candidate) const override;
98
99
100 protected:
107 const TopoDS_Shape sh;
108
112 const double tolerance;
113 };
114
134 template <int dim, int spacedim>
135 class DirectionalProjectionManifold : public FlatManifold<dim, spacedim>
136 {
137 public:
142 DirectionalProjectionManifold(const TopoDS_Shape & sh,
144 const double tolerance = 1e-7);
145
149 virtual std::unique_ptr<Manifold<dim, spacedim>>
150 clone() const override;
151
161 virtual Point<spacedim>
163 const ArrayView<const Point<spacedim>> &surrounding_points,
164 const Point<spacedim> & candidate) const override;
165
166 protected:
173 const TopoDS_Shape sh;
174
179
183 const double tolerance;
184 };
185
186
229 template <int dim, int spacedim>
230 class NormalToMeshProjectionManifold : public FlatManifold<dim, spacedim>
231 {
232 public:
238 NormalToMeshProjectionManifold(const TopoDS_Shape &sh,
239 const double tolerance = 1e-7);
240
244 virtual std::unique_ptr<Manifold<dim, spacedim>>
245 clone() const override;
246
253 virtual Point<spacedim>
255 const ArrayView<const Point<spacedim>> &surrounding_points,
256 const Point<spacedim> & candidate) const override;
257
258 protected:
265 const TopoDS_Shape sh;
266
270 const double tolerance;
271 };
272
290 template <int dim, int spacedim>
291 class ArclengthProjectionLineManifold : public ChartManifold<dim, spacedim, 1>
292 {
293 public:
297 ArclengthProjectionLineManifold(const TopoDS_Shape &sh,
298 const double tolerance = 1e-7);
299
303 virtual std::unique_ptr<Manifold<dim, spacedim>>
304 clone() const override;
305
311 virtual Point<1>
312 pull_back(const Point<spacedim> &space_point) const override;
313
317 virtual Point<spacedim>
318 push_forward(const Point<1> &chart_point) const override;
319
320 protected:
324 const TopoDS_Shape sh;
325
330# if DEAL_II_OPENCASCADE_VERSION_GTE(7, 6, 0)
331 Handle_Adaptor3d_Curve curve;
332# else
333 Handle_Adaptor3d_HCurve curve;
334# endif
335
339 const double tolerance;
340
345 const double length;
346 };
347
353 template <int dim, int spacedim>
354 class NURBSPatchManifold : public ChartManifold<dim, spacedim, 2>
355 {
356 public:
362 NURBSPatchManifold(const TopoDS_Face &face, const double tolerance = 1e-7);
363
367 virtual std::unique_ptr<Manifold<dim, spacedim>>
368 clone() const override;
369
374 virtual Point<2>
375 pull_back(const Point<spacedim> &space_point) const override;
376
381 virtual Point<spacedim>
382 push_forward(const Point<2> &chart_point) const override;
383
397 push_forward_gradient(const Point<2> &chart_point) const override;
398
399 protected:
404 std::tuple<double, double, double, double>
405 get_uv_bounds() const;
406
410 TopoDS_Face face;
411
416 double tolerance;
417 };
418
419} // namespace OpenCASCADE
420
424
425
426#endif // DEAL_II_WITH_OPENCASCADE
427#endif // dealii_occ_manifold_lib_h
Definition: point.h:111
Definition: tensor.h:503
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
virtual Point< spacedim > project_to_manifold(const ArrayView< const Point< spacedim > > &surrounding_points, const Point< spacedim > &candidate) const override
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
std::tuple< double, double, double, double > get_uv_bounds() const
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual Point< spacedim > push_forward(const Point< 1 > &chart_point) const override
virtual Point< spacedim > project_to_manifold(const ArrayView< const Point< spacedim > > &surrounding_points, const Point< spacedim > &candidate) const override
const Tensor< 1, spacedim > direction
Definition: manifold_lib.h:178
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual Point< 2 > pull_back(const Point< spacedim > &space_point) const override
virtual Point< spacedim > push_forward(const Point< 2 > &chart_point) const override
virtual Point< 1 > pull_back(const Point< spacedim > &space_point) const override
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual Point< spacedim > project_to_manifold(const ArrayView< const Point< spacedim > > &surrounding_points, const Point< spacedim > &candidate) const override
virtual DerivativeForm< 1, 2, spacedim > push_forward_gradient(const Point< 2 > &chart_point) const override
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override