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

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

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

Public Member Functions

 SphericalManifold (const Point< spacedim > center=Point< spacedim >())
 
virtual Point< spacedim > pull_back (const Point< spacedim > &space_point) const
 
virtual Point< spacedim > push_forward (const Point< spacedim > &chart_point) const
 
virtual Point< spacedim > get_new_point (const Quadrature< spacedim > &quad) const
 
- Public Member Functions inherited from ChartManifold< dim, spacedim, spacedim >
 ChartManifold (const Point< chartdim > periodicity=Point< chartdim >())
 
virtual ~ChartManifold ()
 
virtual Point< spacedim > push_forward (const Point< chartdim > &chart_point) const=0
 
- Public Member Functions inherited from Manifold< dim, spacedim >
virtual ~Manifold ()
 
virtual Point< spacedim > project_to_manifold (const std::vector< Point< spacedim > > &surrounding_points, const Point< spacedim > &candidate) 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
 
- 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."<< "\"<< "(Additional information: "<< arg3<< ")\"<< "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)
 

Public Attributes

const Point< spacedim > center
 

Static Private Member Functions

static Point< spacedim > get_periodicity ()
 

Detailed Description

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

Manifold description for a spherical space coordinate system.

You can use this Manifold object to describe any sphere, circle, hypersphere or hyperdisc in two or three dimensions, both as a co-dimension one manifold descriptor or as co-dimension zero manifold descriptor.

The two template arguments match the meaning of the two template arguments in Triangulation<dim, spacedim>, however this Manifold can be used to describe both thin and thick objects, and the behavior is identical when dim <= spacedim, i.e., the functionality of SphericalManifold<2,3> is identical to SphericalManifold<3,3>.

The two dimensional implementation of this class works by transforming points to spherical coordinates, taking the average in that coordinate system, and then transforming back the point to Cartesian coordinates. For the three dimensional case, we use a simpler approach: we take the average of the norm of the points, and use this value to shift the average point along the radial direction. In order for this manifold to work correctly, it cannot be attached to cells containing the center of the coordinate system. This point is a singular point of the coordinate transformation, and there taking averages does not make any sense.

This class is used in step-1 and step-2 to describe the boundaries of circles. Its use is also discussed in the results section of step-6.

Author
Luca Heltai, 2014

Definition at line 58 of file manifold_lib.h.

Constructor & Destructor Documentation

§ SphericalManifold()

template<int dim, int spacedim>
SphericalManifold< dim, spacedim >::SphericalManifold ( const Point< spacedim >  center = Point<spacedim>())

The Constructor takes the center of the spherical coordinates system. This class uses the pull_back and push_forward mechanism to transform from Cartesian to spherical coordinate systems, taking into account the periodicity of base Manifold in two dimensions, while in three dimensions it takes the middle point, and project it along the radius using the average radius of the surrounding points.

Definition at line 27 of file manifold_lib.cc.

Member Function Documentation

§ pull_back()

template<int dim, int spacedim>
Point< spacedim > SphericalManifold< dim, spacedim >::pull_back ( const Point< spacedim > &  space_point) const
virtual

Pull back the given point from the Euclidean space. Will return the polar coordinates associated with the point space_point. Only used when spacedim = 2.

Implements ChartManifold< dim, spacedim, spacedim >.

Definition at line 103 of file manifold_lib.cc.

§ push_forward()

template<int dim, int spacedim>
Point< spacedim > SphericalManifold< dim, spacedim >::push_forward ( const Point< spacedim > &  chart_point) const
virtual

Given a point in the spherical coordinate system, this method returns the Euclidean coordinates associated to the polar coordinates chart_point. Only used when spacedim = 3.

Definition at line 72 of file manifold_lib.cc.

§ get_new_point()

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

Let the new point be the average sum of surrounding vertices.

In the two dimensional implementation, we use the pull_back and push_forward mechanism. For three dimensions, this does not work well, so we overload the get_new_point function directly.

Reimplemented from ChartManifold< dim, spacedim, spacedim >.

Definition at line 46 of file manifold_lib.cc.

§ get_periodicity()

template<int dim, int spacedim>
Point< spacedim > SphericalManifold< dim, spacedim >::get_periodicity ( )
staticprivate

Helper function which returns the periodicity associated with this coordinate system, according to dim, chartdim, and spacedim.

Definition at line 36 of file manifold_lib.cc.

Member Data Documentation

§ center

template<int dim, int spacedim = dim>
const Point<spacedim> SphericalManifold< dim, spacedim >::center

The center of the spherical coordinate system.

Definition at line 100 of file manifold_lib.h.


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