Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Protected Attributes | List of all members
OpenCASCADE::NormalProjectionManifold< dim, spacedim > Class Template Reference

#include <deal.II/opencascade/manifold_lib.h>

Inheritance diagram for OpenCASCADE::NormalProjectionManifold< dim, spacedim >:
[legend]

Public Member Functions

 NormalProjectionManifold (const TopoDS_Shape &sh, const double tolerance=1e-7)
 
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
 
- Public Member Functions inherited from FlatManifold< dim, spacedim >
 FlatManifold (const Tensor< 1, spacedim > &periodicity=Tensor< 1, spacedim >(), const double tolerance=1e-10)
 
virtual Point< spacedim > get_new_point (const ArrayView< const Point< spacedim >> &surrounding_points, const ArrayView< const double > &weights) const override
 
virtual void get_new_points (const ArrayView< const Point< spacedim >> &surrounding_points, const Table< 2, double > &weights, ArrayView< Point< spacedim >> new_points) const override
 
virtual Tensor< 1, spacedim > get_tangent_vector (const Point< spacedim > &x1, const Point< spacedim > &x2) const override
 
virtual Tensor< 1, spacedim > normal_vector (const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const override
 
virtual void get_normals_at_vertices (const typename Triangulation< dim, spacedim >::face_iterator &face, typename Manifold< dim, spacedim >::FaceVertexNormals &face_vertex_normals) const override
 
const Tensor< 1, spacedim > & get_periodicity () const
 
- Public Member Functions inherited from Manifold< dim, spacedim >
virtual ~Manifold () override=default
 
virtual Point< spacedim > get_intermediate_point (const Point< spacedim > &p1, const Point< spacedim > &p2, const double w) const
 
virtual Point< spacedim > get_new_point_on_line (const typename Triangulation< dim, spacedim >::line_iterator &line) const
 
virtual Point< spacedim > get_new_point_on_quad (const typename Triangulation< dim, spacedim >::quad_iterator &quad) const
 
virtual Point< spacedim > get_new_point_on_hex (const typename Triangulation< dim, spacedim >::hex_iterator &hex) const
 
Point< spacedim > get_new_point_on_face (const typename Triangulation< dim, spacedim >::face_iterator &face) const
 
Point< spacedim > get_new_point_on_cell (const typename Triangulation< dim, spacedim >::cell_iterator &cell) const
 
virtual void get_normals_at_vertices (const typename Triangulation< dim, spacedim >::face_iterator &face, FaceVertexNormals &face_vertex_normals) const
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
template<typename StreamType >
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Protected Attributes

const TopoDS_Shape sh
 
const double tolerance
 

Additional Inherited Members

- Public Types inherited from Manifold< dim, spacedim >
using FaceVertexNormals = std::array< Tensor< 1, spacedim >, GeometryInfo< dim >::vertices_per_face >
 
- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

Detailed Description

template<int dim, int spacedim>
class OpenCASCADE::NormalProjectionManifold< dim, spacedim >

A Manifold object based on OpenCASCADE TopoDS_Shape where new points are first computed by averaging the surrounding points in the same way as FlatManifold does, and are then projected in the normal direction using OpenCASCADE utilities.

This class makes no assumptions on the shape you pass to it, and the topological dimension of the Manifold is inferred from the TopoDS_Shape itself. In debug mode there is a sanity check to make sure that the surrounding points (the ones used in project_to_manifold()) actually live on the Manifold, i.e., calling OpenCASCADE::closest_point() on those points leaves them untouched. If this is not the case, an ExcPointNotOnManifold is thrown.

This could happen, for example, if you are trying to use a shape of type TopoDS_Edge when projecting on a face. In this case, the vertices of the face would be collapsed to the edge, and your surrounding points would not be lying on the given shape, raising an exception.

Author
Luca Heltai, Andrea Mola, 2011–2014.

Definition at line 66 of file manifold_lib.h.

Constructor & Destructor Documentation

◆ NormalProjectionManifold()

template<int dim, int spacedim>
OpenCASCADE::NormalProjectionManifold< dim, spacedim >::NormalProjectionManifold ( const TopoDS_Shape &  sh,
const double  tolerance = 1e-7 
)

The standard constructor takes a generic TopoDS_Shape sh, and a tolerance used to compute distances internally.

The TopoDS_Shape can be arbitrary, i.e., a collection of shapes, faces, edges or a single face or edge.

Definition at line 81 of file manifold_lib.cc.

Member Function Documentation

◆ clone()

template<int dim, int spacedim>
std::unique_ptr< Manifold< dim, spacedim > > OpenCASCADE::NormalProjectionManifold< dim, spacedim >::clone ( ) const
overridevirtual

Clone the current Manifold.

Reimplemented from FlatManifold< dim, spacedim >.

Reimplemented in OpenCASCADE::NormalProjectionBoundary< dim, spacedim >.

Definition at line 94 of file manifold_lib.cc.

◆ project_to_manifold()

template<int dim, int spacedim>
Point< spacedim > OpenCASCADE::NormalProjectionManifold< dim, spacedim >::project_to_manifold ( const ArrayView< const Point< spacedim >> &  surrounding_points,
const Point< spacedim > &  candidate 
) const
overridevirtual

Perform the actual projection onto the manifold. This function, in debug mode, checks that each of the surrounding_points is within tolerance from the given TopoDS_Shape. If this is not the case, an exception is thrown.

The projected point is computed using OpenCASCADE normal projection algorithms.

Reimplemented from FlatManifold< dim, spacedim >.

Definition at line 104 of file manifold_lib.cc.

Member Data Documentation

◆ sh

template<int dim, int spacedim>
const TopoDS_Shape OpenCASCADE::NormalProjectionManifold< dim, spacedim >::sh
protected

The topological shape which is used internally to project points. You can construct such a shape by calling the OpenCASCADE::read_IGES() function, which will create a TopoDS_Shape with the geometry contained in the IGES file.

Definition at line 107 of file manifold_lib.h.

◆ tolerance

template<int dim, int spacedim>
const double OpenCASCADE::NormalProjectionManifold< dim, spacedim >::tolerance
protected

Relative tolerance used by this class to compute distances.

Definition at line 112 of file manifold_lib.h.


The documentation for this class was generated from the following files: