Reference documentation for deal.II version 9.1.1
|
#include <deal.II/grid/manifold_lib.h>
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 () |
Subscriptor & | operator= (const Subscriptor &) |
Subscriptor & | operator= (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) |
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) |
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.
Definition at line 585 of file manifold_lib.h.
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 1305 of file manifold_lib.cc.
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 1324 of file manifold_lib.cc.
|
overridevirtual |
If needed, we delete the pointers we own.
Definition at line 1354 of file manifold_lib.cc.
|
overridevirtual |
Make a clone of this Manifold object.
Implements Manifold< dim, spacedim >.
Definition at line 1372 of file manifold_lib.cc.
|
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 1408 of file manifold_lib.cc.
|
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 1436 of file manifold_lib.cc.
|
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 1453 of file manifold_lib.cc.
|
private |
Constants for the FunctionParser classes.
Definition at line 684 of file manifold_lib.h.
|
private |
Pointer to the push_forward function.
Definition at line 691 of file manifold_lib.h.
|
private |
Pointer to the pull_back function.
Definition at line 698 of file manifold_lib.h.
|
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 705 of file manifold_lib.h.
|
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 714 of file manifold_lib.h.
|
private |
The expression used to construct the push_forward function.
Definition at line 719 of file manifold_lib.h.
|
private |
The expression used to construct the pull_back function.
Definition at line 724 of file manifold_lib.h.
|
private |
Variable names in the chart domain.
Definition at line 729 of file manifold_lib.h.
|
private |
Variable names in the space domain.
Definition at line 734 of file manifold_lib.h.
|
private |
The finite difference step to use internally.
Definition at line 739 of file manifold_lib.h.