Reference documentation for deal.II version 9.6.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
internal::MappingQImplementation::InverseQuadraticApproximation< int, int > Class Template Reference

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

Inheritance diagram for internal::MappingQImplementation::InverseQuadraticApproximation< int, int >:

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_functionscoefficients
 
bool is_affine
 

Detailed Description

template<int, int>
class internal::MappingQImplementation::InverseQuadraticApproximation< int, int >

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.

Constructor & Destructor Documentation

◆ InverseQuadraticApproximation() [1/2]

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

Constructor.

Parameters
real_support_pointsThe position of the mapping support points in real space, queried by MappingQ::compute_mapping_support_points().
unit_support_pointsThe 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.

◆ InverseQuadraticApproximation() [2/2]

template<int , int >
internal::MappingQImplementation::InverseQuadraticApproximation< int, int >::InverseQuadraticApproximation ( const InverseQuadraticApproximation< int, int > & )
default

Copy constructor.

Member Function Documentation

◆ compute()

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

Evaluate the quadratic approximation.

Definition at line 972 of file mapping_q_internal.h.

Member Data Documentation

◆ n_functions

template<int , int >
unsigned int internal::MappingQImplementation::InverseQuadraticApproximation< int, int >::n_functions
staticconstexpr
Initial value:
=
(spacedim == 1 ? 3 : (spacedim == 2 ? 6 : 10))

Number of basis functions in the quadratic approximation.

Definition at line 821 of file mapping_q_internal.h.

◆ normalization_shift

template<int , int >
const Point<spacedim> internal::MappingQImplementation::InverseQuadraticApproximation< int, int >::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 1027 of file mapping_q_internal.h.

◆ normalization_length

template<int , int >
const double internal::MappingQImplementation::InverseQuadraticApproximation< int, int >::normalization_length
private

See the documentation of normalization_shift above.

Definition at line 1032 of file mapping_q_internal.h.

◆ coefficients

template<int , int >
std::array<Point<dim>, n_functions> internal::MappingQImplementation::InverseQuadraticApproximation< int, int >::coefficients
private

The vector of coefficients in the quadratic approximation.

Definition at line 1037 of file mapping_q_internal.h.

◆ is_affine

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.


The documentation for this class was generated from the following files: