Reference documentation for deal.II version 8.4.1
Public Member Functions | Private Attributes | List of all members
FlatManifold< dim, spacedim > Class Template Reference

#include <deal.II/grid/manifold.h>

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

Public Member Functions

 FlatManifold (const Point< spacedim > periodicity=Point< spacedim >(), const double tolerance=1e-10)
 
virtual Point< spacedim > get_new_point (const Quadrature< spacedim > &quad) const
 
virtual Point< spacedim > project_to_manifold (const std::vector< Point< spacedim > > &points, const Point< spacedim > &candidate) const
 
- Public Member Functions inherited from Manifold< dim, spacedim >
virtual ~Manifold ()
 
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
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
void subscribe (const char *identifier=0) const
 
void unsubscribe (const char *identifier=0) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
 DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects."<< "\n\n"<< "(Additional information: "<< arg3<< ")\n\n"<< "See the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "a lot more information on what this error means and "<< "how to fix programs in which it happens.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier <"<< arg2<< "> subscribes to this object of class "<< arg1<< ". Consequently, it cannot be unsubscribed.")
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

const Point< spacedim > periodicity
 
const double tolerance
 

Detailed Description

template<int dim, int spacedim = dim>
class FlatManifold< dim, spacedim >

Specialization of Manifold<dim,spacedim>, which represent a possibly periodic Euclidean space of dimension dim embedded in the Euclidean space of spacedim dimensions. The main characteristic of this Manifold is the fact that the function FlatManifold<dim,spacedim>::project_to_manifold() is the identity function.

Author
Luca Heltai, 2014

Definition at line 219 of file manifold.h.

Constructor & Destructor Documentation

template<int dim, int spacedim>
FlatManifold< dim, spacedim >::FlatManifold ( const Point< spacedim >  periodicity = Point<spacedim>(),
const double  tolerance = 1e-10 
)

Default constructor. The optional argument can be used to specify the periodicity of the spacedim-dimensional manifold (one period per direction). A periodicity value of zero means that along that direction there is no periodicity. By default no periodicity is assumed.

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). Special cases are taken into account, to ensure that the behavior is always as expected. The third argument is used as a relative tolerance when computing distances.

Periodicity will be intended in the following way: the domain is considered to be the box contained in [Point<spacedim>(), periodicity) where the right extreme is excluded. If any of the components of this box has zero length, then no periodicity is computed in that direction. Whenever a function that tries to compute averages is called, an exception will be thrown if one of the points which you are using for the average lies outside the periodicity box. The return points are guaranteed to lie in the periodicity box plus or minus tolerance*periodicity.norm().

Definition at line 211 of file manifold.cc.

Member Function Documentation

template<int dim, int spacedim>
Point< spacedim > FlatManifold< dim, spacedim >::get_new_point ( const Quadrature< spacedim > &  quad) const
virtual

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 >.

Definition at line 220 of file manifold.cc.

template<int dim, int spacedim>
Point< spacedim > FlatManifold< dim, spacedim >::project_to_manifold ( const std::vector< Point< spacedim > > &  points,
const Point< spacedim > &  candidate 
) const
virtual

Project to FlatManifold. This is the identity function for flat, Euclidean spaces. Note however that this function can be overloaded by derived classes, which will then benefit from the logic behind the get_new_point class which are often very similar (if not identical) to the one implemented in this class.

Reimplemented from Manifold< dim, spacedim >.

Reimplemented in OpenCASCADE::NormalToMeshProjectionBoundary< dim, spacedim >, OpenCASCADE::DirectionalProjectionBoundary< dim, spacedim >, and OpenCASCADE::NormalProjectionBoundary< dim, spacedim >.

Definition at line 272 of file manifold.cc.

Member Data Documentation

template<int dim, int spacedim = dim>
const Point<spacedim> FlatManifold< dim, spacedim >::periodicity
private

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 301 of file manifold.h.

template<int dim, int spacedim = dim>
const double FlatManifold< dim, spacedim >::tolerance
private

Relative tolerance. This tolerance is used to compute distances in double precision.

Definition at line 312 of file manifold.h.


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