Reference documentation for deal.II version 9.2.0
|
#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 (std::unique_ptr< Function< chartdim >> push_forward, std::unique_ptr< Function< spacedim >> pull_back, 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, dim, dim > | |
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 |
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 |
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 |
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 |
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 |
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 |
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 593 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.
Note: the object constructed in this way stores pointers to the push_forward and pull_back functions. Therefore, one must guarantee that the function objects are destroyed only after the constructed manifold.
Definition at line 1360 of file manifold_lib.cc.
FunctionManifold< dim, spacedim, chartdim >::FunctionManifold | ( | std::unique_ptr< Function< chartdim >> | push_forward, |
std::unique_ptr< Function< spacedim >> | pull_back, | ||
const Tensor< 1, chartdim > & | periodicity = Tensor<1, chartdim>() , |
||
const double | tolerance = 1e-10 |
||
) |
Same as previous, except this constructor takes ownership of the Function objects passed as first and second argument, and is ultimately in charge of deleting the pointers when the FunctionManifold object is destroyed.
This constructor is useful because it allows creating function objects at the place of calling the constructor without having to name and later delete these objects. This allows the following idiom: FunctionManifold<dim> manifold(std_cxx14::make_unique<MyPushForward>(...), std_cxx14::make_unique<MyPullBack>(...));
Definition at line 1380 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 1400 of file manifold_lib.cc.
|
overridevirtual |
If needed, we delete the pointers we own.
Definition at line 1430 of file manifold_lib.cc.
|
overridevirtual |
Make a clone of this Manifold object.
Implements Manifold< dim, spacedim >.
Definition at line 1448 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, dim, dim >.
Definition at line 1488 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, dim, dim >.
Definition at line 1516 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, dim, dim >.
Definition at line 1533 of file manifold_lib.cc.
|
private |
Constants for the FunctionParser classes.
Definition at line 713 of file manifold_lib.h.
|
private |
Pointer to the push_forward function.
Definition at line 720 of file manifold_lib.h.
|
private |
Pointer to the pull_back function.
Definition at line 727 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 734 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 743 of file manifold_lib.h.
|
private |
The expression used to construct the push_forward function.
Definition at line 748 of file manifold_lib.h.
|
private |
The expression used to construct the pull_back function.
Definition at line 753 of file manifold_lib.h.
|
private |
Variable names in the chart domain.
Definition at line 758 of file manifold_lib.h.
|
private |
Variable names in the space domain.
Definition at line 763 of file manifold_lib.h.
|
private |
The finite difference step to use internally.
Definition at line 768 of file manifold_lib.h.