MFEM
v4.6.0
Finite element discretization library
|
Go to the source code of this file.
Functions | |
void | RationalApproximation_AAA (const Vector &val, const Vector &pt, Array< double > &z, Array< double > &f, Vector &w, double tol, int max_order) |
void | ComputePolesAndZeros (const Vector &z, const Vector &f, const Vector &w, Array< double > &poles, Array< double > &zeros, double &scale) |
void | PartialFractionExpansion (double scale, Array< double > &poles, Array< double > &zeros, Array< double > &coeffs) |
void | ComputePartialFractionApproximation (double &alpha, Array< double > &coeffs, Array< double > &poles, double lmax=1000., double tol=1e-10, int npoints=1000, int max_order=100) |
void ComputePartialFractionApproximation | ( | double & | alpha, |
Array< double > & | coeffs, | ||
Array< double > & | poles, | ||
double | lmax = 1000. , |
||
double | tol = 1e-10 , |
||
int | npoints = 1000 , |
||
int | max_order = 100 |
||
) |
ComputePartialFractionApproximation: compute a rational approximation (RA) in partial fraction form, e.g., f(z) ≈ Σ_i c_i / (z - p_i), from sampled values of the function f(z) = z^{-a}, 0 < a < 1.
[in] | alpha | Exponent a in f(z) = z^-a |
[in] | lmax,npoints | f(z) is uniformly sampled npoints times in the interval [ 0, lmax ] |
[in] | tol | Relative tolerance |
[in] | max_order | Maximum number of terms (order) of the RA |
[out] | coeffs | Coefficients c_i |
[out] | poles | Poles p_i |
NOTES: When MFEM is not built with LAPACK support, only alpha = 0.33, 0.5, and 0.99 are possible. In this case, if alpha != 0.33 and alpha != 0.99, then alpha = 0.5 is used by default.
See pg. A1501 of Nakatsukasa et al. [1].
void ComputePolesAndZeros | ( | const Vector & | z, |
const Vector & | f, | ||
const Vector & | w, | ||
Array< double > & | poles, | ||
Array< double > & | zeros, | ||
double & | scale | ||
) |
ComputePolesAndZeros: compute the poles [out] and zeros [out] of the rational function f(z) = C p(z)/q(z) from its ration barycentric form.
[in] | z | Support points in rational barycentric form |
[in] | f | Data values at support points z |
[in] | w | Weights in rational barycentric form |
[out] | poles | Array of poles (roots of p(z)) |
[out] | zeros | Array of zeros (roots of q(z)) |
[out] | scale | Scaling constant in f(z) = C p(z)/q(z) |
See pg. A1501 of Nakatsukasa et al. [1].
void PartialFractionExpansion | ( | double | scale, |
Array< double > & | poles, | ||
Array< double > & | zeros, | ||
Array< double > & | coeffs | ||
) |
PartialFractionExpansion: compute the partial fraction expansion of the rational function f(z) = Σ_i c_i / (z - p_i) from its poles [in] and zeros [in].
[in] | poles | Array of poles (same as p_i above) |
[in] | zeros | Array of zeros |
[in] | scale | Scaling constant |
[out] | coeffs | Coefficients c_i |
void RationalApproximation_AAA | ( | const Vector & | val, |
const Vector & | pt, | ||
Array< double > & | z, | ||
Array< double > & | f, | ||
Vector & | w, | ||
double | tol, | ||
int | max_order | ||
) |
RationalApproximation_AAA: compute the rational approximation (RA) of data val [in] at the set of points pt [in].
[in] | val | Vector of data values |
[in] | pt | Vector of sample points |
[in] | tol | Relative tolerance |
[in] | max_order | Maximum number of terms (order) of the RA |
[out] | z | Support points of the RA in rational barycentric form |
[out] | f | Data values at support points z |
[out] | w | Weights of the RA in rational barycentric form |
See pg. A1501 of Nakatsukasa et al. [1].