![]() |
Reference documentation for deal.II version 9.6.0
|
#include <deal.II/fe/mapping_q_internal.h>
Public Member Functions | |
InverseQuadraticApproximation (const ArrayView< const Point< spacedim > > &real_support_points, const std::vector< Point< dim > > &unit_support_points) | |
InverseQuadraticApproximation (const InverseQuadraticApproximation &)=default | |
template<typename Number > | |
Point< dim, Number > | compute (const Point< spacedim, Number > &p) const |
Static Public Attributes | |
static constexpr unsigned int | n_functions |
Private Attributes | |
const Point< spacedim > | normalization_shift |
const double | normalization_length |
std::array< Point< dim >, n_functions > | coefficients |
bool | is_affine |
A class to compute a quadratic approximation to the inverse map from real to unit points by a least-squares fit along the mapping support points. The least squares fit is special in the sense that the approximation is constructed for the inverse function of a MappingQ, which is generally a rational function. This allows for a very cheap evaluation of the inverse map by a simple polynomial interpolation, which can be used as a better initial guess for transforming points from real to unit coordinates than an affine approximation.
Far away outside the unit cell, this approximation can become inaccurate for non-affine cell shapes. This must be expected from a fit of a polynomial to a rational function, and due to the fact that the region of the least squares fit, the unit cell, is left. Hence, use this function with care in those situations.
Definition at line 34 of file manifold_lib.h.
|
inline |
Constructor.
real_support_points | The position of the mapping support points in real space, queried by MappingQ::compute_mapping_support_points(). |
unit_support_points | The location of the support points in reference coordinates \([0, 1]^d\) that map to the mapping support points in real space by a polynomial map. |
Definition at line 835 of file mapping_q_internal.h.
|
default |
Copy constructor.
|
inline |
Evaluate the quadratic approximation.
Definition at line 972 of file mapping_q_internal.h.
|
staticconstexpr |
Number of basis functions in the quadratic approximation.
Definition at line 821 of file mapping_q_internal.h.
|
private |
In order to guarantee a good conditioning, we need to apply a transformation to the points in real space that is computed by a shift vector normalization_shift (first point of the mapping support points in real space) and an inverse length scale called length_normalization
as the distance between the first two points.
Definition at line 1027 of file mapping_q_internal.h.
|
private |
See the documentation of normalization_shift
above.
Definition at line 1032 of file mapping_q_internal.h.
|
private |
The vector of coefficients in the quadratic approximation.
Definition at line 1037 of file mapping_q_internal.h.
|
private |
In case the quadratic approximation is not possible due to an insufficient number of support points, we switch to an affine approximation that always works but is less accurate.
Definition at line 1044 of file mapping_q_internal.h.