Reference documentation for deal.II version 9.1.0-pre
Public Member Functions | Private Attributes | List of all members
FunctionManifold< dim, spacedim, chartdim > Class Template Reference

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

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

Public Member Functions

 FunctionManifold (const Function< chartdim > &push_forward_function, const Function< spacedim > &pull_back_function, const Tensor< 1, chartdim > &periodicity=Tensor< 1, chartdim >(), const double tolerance=1e-10)
 
 FunctionManifold (const std::string push_forward_expression, const std::string pull_back_expression, const Tensor< 1, chartdim > &periodicity=Tensor< 1, chartdim >(), const typename FunctionParser< spacedim >::ConstMap=typename FunctionParser< spacedim >::ConstMap(), const std::string chart_vars=FunctionParser< chartdim >::default_variable_names(), const std::string space_vars=FunctionParser< spacedim >::default_variable_names(), const double tolerance=1e-10, const double h=1e-8)
 
virtual ~FunctionManifold () override
 
virtual std::unique_ptr< Manifold< dim, spacedim > > clone () const override
 
virtual Point< spacedim > push_forward (const Point< chartdim > &chart_point) const override
 
virtual DerivativeForm< 1, chartdim, spacedim > push_forward_gradient (const Point< chartdim > &chart_point) const override
 
virtual Point< chartdim > pull_back (const Point< spacedim > &space_point) const override
 
- Public Member Functions inherited from ChartManifold< dim, spacedim, chartdim >
 ChartManifold (const Tensor< 1, chartdim > &periodicity=Tensor< 1, chartdim >())
 
virtual ~ChartManifold () override=default
 
virtual Point< spacedim > get_intermediate_point (const Point< spacedim > &p1, const Point< spacedim > &p2, const double w) 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
 
const Tensor< 1, chartdim > & get_periodicity () const
 
- Public Member Functions inherited from Manifold< dim, spacedim >
virtual ~Manifold () override=default
 
virtual Point< spacedim > project_to_manifold (const ArrayView< const 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
 
virtual Tensor< 1, spacedim > normal_vector (const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) 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 (const char *identifier=nullptr) const
 
void unsubscribe (const char *identifier=nullptr) 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)
 

Private Attributes

const FunctionParser< spacedim >::ConstMap const_map
 
SmartPointer< const Function< chartdim >, FunctionManifold< dim, spacedim, chartdim > > push_forward_function
 
SmartPointer< const Function< spacedim >, FunctionManifold< dim, spacedim, chartdim > > pull_back_function
 
const double tolerance
 
const bool owns_pointers
 
const std::string push_forward_expression
 
const std::string pull_back_expression
 
const std::string chart_vars
 
const std::string space_vars
 
const double finite_difference_step
 

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::ExceptionBase & ExcInUse (int arg1, std::string arg2, std::string arg3)
 
static::ExceptionBase & ExcNoSubscriber (std::string arg1, std::string arg2)
 

Detailed Description

template<int dim, int spacedim = dim, int chartdim = dim>
class FunctionManifold< dim, spacedim, chartdim >

Manifold description derived from ChartManifold, based on explicit Function<spacedim> and Function<chartdim> objects describing the push_forward() and pull_back() functions.

You can use this Manifold object to describe any arbitrary shape domain, as long as you can express it in terms of an invertible map, for which you provide both the forward expression, and the inverse expression.

In debug mode, a check is performed to verify that the transformations are actually one the inverse of the other.

Author
Luca Heltai, 2014

Definition at line 483 of file manifold_lib.h.

Constructor & Destructor Documentation

template<int dim, int spacedim, int chartdim>
FunctionManifold< dim, spacedim, chartdim >::FunctionManifold ( const Function< chartdim > &  push_forward_function,
const Function< spacedim > &  pull_back_function,
const Tensor< 1, chartdim > &  periodicity = Tensor<1, chartdim>(),
const double  tolerance = 1e-10 
)

Explicit functions constructor. Takes a push_forward function of spacedim components, and a pull_back function of chartdim components. See the documentation of the base class ChartManifold for the meaning of the optional periodicity argument.

The tolerance argument is used in debug mode to actually check that the two functions are one the inverse of the other.

Definition at line 1155 of file manifold_lib.cc.

template<int dim, int spacedim, int chartdim>
FunctionManifold< dim, spacedim, chartdim >::FunctionManifold ( const std::string  push_forward_expression,
const std::string  pull_back_expression,
const Tensor< 1, chartdim > &  periodicity = Tensor<1, chartdim>(),
const typename FunctionParser< spacedim >::ConstMap  const_map = typename FunctionParser<spacedim>::ConstMap(),
const std::string  chart_vars = FunctionParser<chartdim>::default_variable_names(),
const std::string  space_vars = FunctionParser<spacedim>::default_variable_names(),
const double  tolerance = 1e-10,
const double  h = 1e-8 
)

Expressions constructor. Takes the expressions of the push_forward function of spacedim components, and of the pull_back function of chartdim components. See the documentation of the base class ChartManifold for the meaning of the optional periodicity argument.

The strings should be the readable by the default constructor of the FunctionParser classes. You can specify custom variable expressions with the last two optional arguments. If you don't, the default names are used, i.e., "x,y,z".

The tolerance argument is used in debug mode to actually check that the two functions are one the inverse of the other.

Definition at line 1174 of file manifold_lib.cc.

template<int dim, int spacedim, int chartdim>
FunctionManifold< dim, spacedim, chartdim >::~FunctionManifold ( )
overridevirtual

If needed, we delete the pointers we own.

Definition at line 1204 of file manifold_lib.cc.

Member Function Documentation

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

Make a clone of this Manifold object.

Implements Manifold< dim, spacedim >.

Definition at line 1222 of file manifold_lib.cc.

template<int dim, int spacedim, int chartdim>
Point< spacedim > FunctionManifold< dim, spacedim, chartdim >::push_forward ( const Point< chartdim > &  chart_point) const
overridevirtual

Given a point in the chartdim coordinate system, uses the push_forward_function to compute the push_forward of points in chartdim space dimensions to spacedim space dimensions.

Implements ChartManifold< dim, spacedim, chartdim >.

Definition at line 1258 of file manifold_lib.cc.

template<int dim, int spacedim, int chartdim>
DerivativeForm< 1, chartdim, spacedim > FunctionManifold< dim, spacedim, chartdim >::push_forward_gradient ( const Point< chartdim > &  chart_point) const
overridevirtual

Given a point in the chartdim dimensional Euclidean space, this method returns the derivatives of the function \(F\) that maps from the sub_manifold coordinate system to the Euclidean coordinate system. In other words, it is a matrix of size \(\text{spacedim}\times\text{chartdim}\).

This function is used in the computations required by the get_tangent_vector() function. The default implementation calls the get_gradient() method of the FunctionManifold::push_forward_function() member class. If you construct this object using the constructor that takes two string expression, then the default implementation of this method uses a finite difference scheme to compute the gradients(see the AutoDerivativeFunction() class for details), and you can specify the size of the spatial step size at construction time with the h parameter.

Refer to the general documentation of this class for more information.

Reimplemented from ChartManifold< dim, spacedim, chartdim >.

Definition at line 1286 of file manifold_lib.cc.

template<int dim, int spacedim, int chartdim>
Point< chartdim > FunctionManifold< dim, spacedim, chartdim >::pull_back ( const Point< spacedim > &  space_point) const
overridevirtual

Given a point in the spacedim coordinate system, uses the pull_back_function to compute the pull_back of points in spacedim space dimensions to chartdim space dimensions.

Implements ChartManifold< dim, spacedim, chartdim >.

Definition at line 1303 of file manifold_lib.cc.

Member Data Documentation

template<int dim, int spacedim = dim, int chartdim = dim>
const FunctionParser<spacedim>::ConstMap FunctionManifold< dim, spacedim, chartdim >::const_map
private

Constants for the FunctionParser classes.

Definition at line 582 of file manifold_lib.h.

template<int dim, int spacedim = dim, int chartdim = dim>
SmartPointer<const Function<chartdim>, FunctionManifold<dim, spacedim, chartdim> > FunctionManifold< dim, spacedim, chartdim >::push_forward_function
private

Pointer to the push_forward function.

Definition at line 589 of file manifold_lib.h.

template<int dim, int spacedim = dim, int chartdim = dim>
SmartPointer<const Function<spacedim>, FunctionManifold<dim, spacedim, chartdim> > FunctionManifold< dim, spacedim, chartdim >::pull_back_function
private

Pointer to the pull_back function.

Definition at line 596 of file manifold_lib.h.

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

Relative tolerance. In debug mode, we check that the two functions provided at construction time are actually one the inverse of the other. This value is used as relative tolerance in this check.

Definition at line 603 of file manifold_lib.h.

template<int dim, int spacedim = dim, int chartdim = dim>
const bool FunctionManifold< dim, spacedim, chartdim >::owns_pointers
private

Check ownership of the smart pointers. Indicates whether this class is the owner of the objects pointed to by the previous two member variables. This value is set in the constructor of the class. If true, then the destructor will delete the function objects pointed to be the two pointers.

Definition at line 612 of file manifold_lib.h.

template<int dim, int spacedim = dim, int chartdim = dim>
const std::string FunctionManifold< dim, spacedim, chartdim >::push_forward_expression
private

The expression used to construct the push_forward function.

Definition at line 617 of file manifold_lib.h.

template<int dim, int spacedim = dim, int chartdim = dim>
const std::string FunctionManifold< dim, spacedim, chartdim >::pull_back_expression
private

The expression used to construct the pull_back function.

Definition at line 622 of file manifold_lib.h.

template<int dim, int spacedim = dim, int chartdim = dim>
const std::string FunctionManifold< dim, spacedim, chartdim >::chart_vars
private

Variable names in the chart domain.

Definition at line 627 of file manifold_lib.h.

template<int dim, int spacedim = dim, int chartdim = dim>
const std::string FunctionManifold< dim, spacedim, chartdim >::space_vars
private

Variable names in the space domain.

Definition at line 632 of file manifold_lib.h.

template<int dim, int spacedim = dim, int chartdim = dim>
const double FunctionManifold< dim, spacedim, chartdim >::finite_difference_step
private

The finite difference step to use internally.

Definition at line 637 of file manifold_lib.h.


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