|
| 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 |
|
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 |
|
Tensor< 1, 1 > | normal_vector (const Triangulation< 1, 1 >::face_iterator &, const Point< 1 > &) const |
|
Tensor< 1, 2 > | normal_vector (const Triangulation< 1, 2 >::face_iterator &, const Point< 2 > &) const |
|
Tensor< 1, 3 > | normal_vector (const Triangulation< 1, 3 >::face_iterator &, const Point< 3 > &) const |
|
Tensor< 1, 2 > | normal_vector (const Triangulation< 2, 2 >::face_iterator &face, const Point< 2 > &p) const |
|
Tensor< 1, 3 > | normal_vector (const Triangulation< 3, 3 >::face_iterator &face, const Point< 3 > &p) const |
|
virtual void | get_normals_at_vertices (const typename Triangulation< dim, spacedim >::face_iterator &face, typename Manifold< dim, spacedim >::FaceVertexNormals &face_vertex_normals) const override |
|
void | get_normals_at_vertices (const Triangulation< 1 >::face_iterator &, Manifold< 1, 1 >::FaceVertexNormals &) const |
|
void | get_normals_at_vertices (const Triangulation< 1, 2 >::face_iterator &, Manifold< 1, 2 >::FaceVertexNormals &) const |
|
void | get_normals_at_vertices (const Triangulation< 1, 3 >::face_iterator &, Manifold< 1, 3 >::FaceVertexNormals &) const |
|
void | get_normals_at_vertices (const Triangulation< 2 >::face_iterator &face, Manifold< 2, 2 >::FaceVertexNormals &face_vertex_normals) const |
|
void | get_normals_at_vertices (const Triangulation< 2, 3 >::face_iterator &, Manifold< 2, 3 >::FaceVertexNormals &) const |
|
void | get_normals_at_vertices (const Triangulation< 3 >::face_iterator &face, Manifold< 3, 3 >::FaceVertexNormals &face_vertex_normals) const |
|
void | get_normals_at_vertices (const Triangulation< 2, 2 >::face_iterator &face, FaceVertexNormals &n) const |
|
void | get_normals_at_vertices (const Triangulation< 3, 3 >::face_iterator &face, FaceVertexNormals &n) const |
|
const Tensor< 1, spacedim > & | get_periodicity () const |
|
Point< 1 > | get_new_point_on_quad (const Triangulation< 1, 1 >::quad_iterator &) const |
|
Point< 2 > | get_new_point_on_quad (const Triangulation< 1, 2 >::quad_iterator &) const |
|
Point< 3 > | get_new_point_on_quad (const Triangulation< 1, 3 >::quad_iterator &) const |
|
Point< 3 > | get_new_point_on_hex (const Triangulation< 3, 3 >::hex_iterator &hex) const |
|
Point< 1 > | get_new_point_on_face (const Triangulation< 1, 1 >::face_iterator &) const |
|
Point< 2 > | get_new_point_on_face (const Triangulation< 1, 2 >::face_iterator &) const |
|
Point< 3 > | get_new_point_on_face (const Triangulation< 1, 3 >::face_iterator &) const |
|
|
virtual void | get_normals_at_vertices (const typename Triangulation< dim, spacedim >::face_iterator &face, FaceVertexNormals &face_vertex_normals) const |
|
|
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 |
|
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.
Definition at line 66 of file manifold_lib.h.
Let the new point be the average sum of surrounding vertices.
This particular implementation constructs the weighted average of the surrounding points, and then calls internally the function project_to_manifold(). The reason why we do it this way, is to allow lazy programmers to implement only the project_to_manifold() function for their own Manifold classes which are small (or trivial) perturbations of a flat manifold. This is the case whenever the coarse mesh is a decent approximation of the manifold geometry. In this case, the middle point of a cell is close to true middle point of the manifold, and a projection may suffice.
For most simple geometries, it is possible to get reasonable results by deriving your own Manifold class from FlatManifold, and write a new interface only for the project_to_manifold function. You will have good approximations also with large deformations, as long as in the coarsest mesh size you are trying to refine, the middle point is not too far from the manifold mid point, i.e., as long as the coarse mesh size is small enough.
Reimplemented from Manifold< dim, spacedim >.
virtual Point< spacedim > Manifold< dim, spacedim >::get_intermediate_point |
( |
const Point< spacedim > & |
p1, |
|
|
const Point< spacedim > & |
p2, |
|
|
const double |
w |
|
) |
| const |
|
virtualinherited |
Return an intermediate point between two given points. Overloading this function allows the default pair-wise reduction implementation of the method get_new_point() that takes a Quadrature object as input to work properly.
An implementation of this function should returns a parametric curve on the manifold, joining the points p1
and p2
, with parameter w
in the interval [0,1]. In particular get_intermediate_point(p1, p2, 0.0)
should return p1
and get_intermediate_point(p1, p2, 1.0)
should return p2
.
In its default implementation, this function calls the project_to_manifold() method with the convex combination of p1
and p2
. User classes can get away by simply implementing the project_to_manifold() method.
Reimplemented in ChartManifold< dim, dim, dim >, ChartManifold< dim, dim, 3 >, ChartManifold< dim, spacedim, 1 >, ChartManifold< dim, spacedim, 2 >, ChartManifold< dim, spacedim_A+spacedim_B, chartdim_A+chartdim_B >, ChartManifold< dim, 3, 3 >, ChartManifold< dim_A, spacedim_A, chartdim_A >, and ChartManifold< dim_B, spacedim_B, chartdim_B >.
virtual Point< spacedim > Manifold< dim, spacedim >::get_new_point_on_quad |
( |
const typename Triangulation< dim, spacedim >::quad_iterator & |
quad | ) |
const |
|
virtualinherited |
Backward compatibility interface. Return the point which shall become the common point of the four children of a quad at the boundary in three or more spatial dimensions. This function therefore is only useful in at least three dimensions and should not be called for lower dimensions.
This function is called after the four lines bounding the given quad
are refined, so you may want to use the information provided by quad->line(i)->child(j)
, i=0...3
, j=0,1
.
The default implementation of this function passes its argument to the Manifolds::get_default_points_and_weights() function, and then calls the Manifold<dim,spacedim>::get_new_point() function. User derived classes can overload Manifold<dim,spacedim>::get_new_point() or Manifold<dim,spacedim>::project_to_manifold(), which is called by the default implementation of Manifold<dim,spacedim>::get_new_point().
virtual Point< spacedim > Manifold< dim, spacedim >::get_new_point_on_hex |
( |
const typename Triangulation< dim, spacedim >::hex_iterator & |
hex | ) |
const |
|
virtualinherited |
Backward compatibility interface. Return the point which shall become the common point of the eight children of a hex in three or spatial dimensions. This function therefore is only useful in at least three dimensions and should not be called for lower dimensions.
This function is called after the all the bounding objects of the given hex
are refined, so you may want to use the information provided by hex->quad(i)->line(j)->child(k)
, i=0...5
, j=0...3
, k=0,1
.
The default implementation of this function passes its argument to the Manifolds::get_default_points_and_weights() function, and then calls the Manifold<dim,spacedim>::get_new_point() function. User derived classes can overload Manifold<dim,spacedim>::get_new_point() or Manifold<dim,spacedim>::project_to_manifold(), which is called by the default implementation of Manifold<dim,spacedim>::get_new_point().
The periodicity of this Manifold. Periodicity affects the way a middle point is computed. It is assumed that if two points are more than half period distant, then the distance should be computed by crossing the periodicity boundary, i.e., the average is computed by adding a full period to the sum of the two. For example, if along direction 0 we have 2*pi periodicity, then the average of (2*pi-eps) and (eps) is not pi, but 2*pi (or zero), since, on a periodic manifold, these two points are at distance 2*eps and not (2*pi-eps).
A periodicity 0 along one direction means no periodicity. This is the default value for all directions.
Definition at line 794 of file manifold.h.