deal.II version GIT relicensing-2291-g668cd86249 2024-12-24 11:30:00+00:00
|
#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 821 of file mapping_q_internal.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 841 of file mapping_q_internal.h.
|
default |
Copy constructor.
|
inline |
Evaluate the quadratic approximation.
Definition at line 978 of file mapping_q_internal.h.
|
staticconstexpr |
Number of basis functions in the quadratic approximation.
Definition at line 827 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 1033 of file mapping_q_internal.h.
|
private |
See the documentation of normalization_shift
above.
Definition at line 1038 of file mapping_q_internal.h.
|
private |
The vector of coefficients in the quadratic approximation.
Definition at line 1043 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 1050 of file mapping_q_internal.h.