Reference documentation for deal.II version 9.6.0
\(\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// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2014 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15
16#ifndef dealii_occ_manifold_lib_h
17#define dealii_occ_manifold_lib_h
18
19#include <deal.II/base/config.h>
20
21#ifdef DEAL_II_WITH_OPENCASCADE
22
24
26
27// opencascade needs "HAVE_CONFIG_H" to be exported...
28# define HAVE_CONFIG_H
29# include <Adaptor3d_Curve.hxx>
30# if !DEAL_II_OPENCASCADE_VERSION_GTE(7, 6, 0)
31# include <Adaptor3d_HCurve.hxx>
32# endif
33# include <BRepAdaptor_Curve.hxx>
34# undef HAVE_CONFIG_H
35
37
43namespace OpenCASCADE
44{
64 template <int dim, int spacedim>
65 class NormalProjectionManifold : public FlatManifold<dim, spacedim>
66 {
67 public:
75 NormalProjectionManifold(const TopoDS_Shape &sh,
76 const double tolerance = 1e-7);
77
81 virtual std::unique_ptr<Manifold<dim, spacedim>>
82 clone() const override;
83
93 virtual Point<spacedim>
95 const ArrayView<const Point<spacedim>> &surrounding_points,
96 const Point<spacedim> &candidate) const override;
97
98
99 protected:
106 const TopoDS_Shape sh;
107
111 const double tolerance;
112 };
113
133 template <int dim, int spacedim>
134 class DirectionalProjectionManifold : public FlatManifold<dim, spacedim>
135 {
136 public:
141 DirectionalProjectionManifold(const TopoDS_Shape &sh,
143 const double tolerance = 1e-7);
144
148 virtual std::unique_ptr<Manifold<dim, spacedim>>
149 clone() const override;
150
160 virtual Point<spacedim>
162 const ArrayView<const Point<spacedim>> &surrounding_points,
163 const Point<spacedim> &candidate) const override;
164
165 protected:
172 const TopoDS_Shape sh;
173
178
182 const double tolerance;
183 };
184
185
228 template <int dim, int spacedim>
229 class NormalToMeshProjectionManifold : public FlatManifold<dim, spacedim>
230 {
231 public:
237 NormalToMeshProjectionManifold(const TopoDS_Shape &sh,
238 const double tolerance = 1e-7);
239
243 virtual std::unique_ptr<Manifold<dim, spacedim>>
244 clone() const override;
245
252 virtual Point<spacedim>
254 const ArrayView<const Point<spacedim>> &surrounding_points,
255 const Point<spacedim> &candidate) const override;
256
257 protected:
264 const TopoDS_Shape sh;
265
269 const double tolerance;
270 };
271
289 template <int dim, int spacedim>
290 class ArclengthProjectionLineManifold : public ChartManifold<dim, spacedim, 1>
291 {
292 public:
296 ArclengthProjectionLineManifold(const TopoDS_Shape &sh,
297 const double tolerance = 1e-7);
298
302 virtual std::unique_ptr<Manifold<dim, spacedim>>
303 clone() const override;
304
310 virtual Point<1>
311 pull_back(const Point<spacedim> &space_point) const override;
312
316 virtual Point<spacedim>
317 push_forward(const Point<1> &chart_point) const override;
318
319 protected:
323 const TopoDS_Shape sh;
324
329# if DEAL_II_OPENCASCADE_VERSION_GTE(7, 6, 0)
330 Handle_Adaptor3d_Curve curve;
331# else
332 Handle_Adaptor3d_HCurve curve;
333# endif
334
338 const double tolerance;
339
344 const double length;
345 };
346
352 template <int dim, int spacedim>
353 class NURBSPatchManifold : public ChartManifold<dim, spacedim, 2>
354 {
355 public:
361 NURBSPatchManifold(const TopoDS_Face &face, const double tolerance = 1e-7);
362
366 virtual std::unique_ptr<Manifold<dim, spacedim>>
367 clone() const override;
368
373 virtual Point<2>
374 pull_back(const Point<spacedim> &space_point) const override;
375
380 virtual Point<spacedim>
381 push_forward(const Point<2> &chart_point) const override;
382
396 push_forward_gradient(const Point<2> &chart_point) const override;
397
398 protected:
403 std::tuple<double, double, double, double>
404 get_uv_bounds() const;
405
409 TopoDS_Face face;
410
415 double tolerance;
416 };
417
418} // namespace OpenCASCADE
419
423
424
425#endif // DEAL_II_WITH_OPENCASCADE
426#endif // dealii_occ_manifold_lib_h
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual Point< spacedim > push_forward(const Point< 1 > &chart_point) const override
ArclengthProjectionLineManifold(const TopoDS_Shape &sh, const double tolerance=1e-7)
virtual Point< 1 > pull_back(const Point< spacedim > &space_point) const override
virtual Point< spacedim > project_to_manifold(const ArrayView< const Point< spacedim > > &surrounding_points, const Point< spacedim > &candidate) const override
DirectionalProjectionManifold(const TopoDS_Shape &sh, const Tensor< 1, spacedim > &direction, const double tolerance=1e-7)
const Tensor< 1, spacedim > direction
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
std::tuple< double, double, double, double > get_uv_bounds() const
virtual Point< 2 > pull_back(const Point< spacedim > &space_point) const override
virtual Point< spacedim > push_forward(const Point< 2 > &chart_point) const override
NURBSPatchManifold(const TopoDS_Face &face, const double tolerance=1e-7)
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
virtual Point< spacedim > project_to_manifold(const ArrayView< const Point< spacedim > > &surrounding_points, const Point< spacedim > &candidate) const override
NormalProjectionManifold(const TopoDS_Shape &sh, const double tolerance=1e-7)
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
NormalToMeshProjectionManifold(const TopoDS_Shape &sh, const double tolerance=1e-7)
Definition point.h:111
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504