 Reference documentation for deal.II version Git 67353a5f2d 2021-01-26 18:33:38 +0100
internal::MappingQGenericImplementation::InverseQuadraticApproximation< dim, spacedim > Class Template Reference

#include <deal.II/fe/mapping_q_internal.h>

## Public Member Functions

InverseQuadraticApproximation (const std::vector< Point< spacedim >> &real_support_points, const std::vector< Point< dim >> &unit_support_points)

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_functionscoefficients

bool is_affine

## Detailed Description

### template<int dim, int spacedim> class internal::MappingQGenericImplementation::InverseQuadraticApproximation< dim, spacedim >

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 MappingQGeneric, 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 864 of file mapping_q_internal.h.

## Constructor & Destructor Documentation

template<int dim, int spacedim>
 internal::MappingQGenericImplementation::InverseQuadraticApproximation< dim, spacedim >::InverseQuadraticApproximation ( const std::vector< Point< spacedim >> & real_support_points, const std::vector< Point< dim >> & unit_support_points )
inline

Constructor.

Parameters
 real_support_points The position of the mapping support points in real space, queried by MappingQGeneric::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 884 of file mapping_q_internal.h.

template<int dim, int spacedim>
default

Copy constructor.

## ◆ compute()

template<int dim, int spacedim>
template<typename Number >
 Point internal::MappingQGenericImplementation::InverseQuadraticApproximation< dim, spacedim >::compute ( const Point< spacedim, Number > & p ) const
inline

Definition at line 1010 of file mapping_q_internal.h.

## ◆ n_functions

template<int dim, int spacedim>
 constexpr unsigned int internal::MappingQGenericImplementation::InverseQuadraticApproximation< dim, spacedim >::n_functions
static
Initial value:
=
(spacedim == 1 ? 3 : (spacedim == 2 ? 6 : 10))

Number of basis functions in the quadratic approximation.

Definition at line 870 of file mapping_q_internal.h.

## ◆ normalization_shift

template<int dim, int spacedim>
 const Point internal::MappingQGenericImplementation::InverseQuadraticApproximation< dim, spacedim >::normalization_shift
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 1045 of file mapping_q_internal.h.

## ◆ normalization_length

template<int dim, int spacedim>
 const double internal::MappingQGenericImplementation::InverseQuadraticApproximation< dim, spacedim >::normalization_length
private

See the documentation of normalization_shift above.

Definition at line 1050 of file mapping_q_internal.h.

## ◆ coefficients

template<int dim, int spacedim>
 std::array, n_functions> internal::MappingQGenericImplementation::InverseQuadraticApproximation< dim, spacedim >::coefficients
private

The vector of coefficients in the quadratic approximation.

Definition at line 1055 of file mapping_q_internal.h.

## ◆ is_affine

template<int dim, int spacedim>