MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
ex33.hpp File Reference

Go to the source code of this file.

Functions

void RationalApproximation_AAA (const Vector &val, const Vector &pt, Array< real_t > &z, Array< real_t > &f, Vector &w, real_t tol, int max_order)
 
void ComputePolesAndZeros (const Vector &z, const Vector &f, const Vector &w, Array< real_t > &poles, Array< real_t > &zeros, real_t &scale)
 
void PartialFractionExpansion (real_t scale, Array< real_t > &poles, Array< real_t > &zeros, Array< real_t > &coeffs)
 
void ComputePartialFractionApproximation (real_t &alpha, Array< real_t > &coeffs, Array< real_t > &poles, real_t lmax=1000., real_t tol=1e-10, int npoints=1000, int max_order=100)
 

Function Documentation

◆ ComputePartialFractionApproximation()

void ComputePartialFractionApproximation ( real_t & alpha,
Array< real_t > & coeffs,
Array< real_t > & poles,
real_t lmax = 1000.,
real_t 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.

Parameters
[in]alphaExponent a in f(z) = z^-a
[in]lmax,npointsf(z) is uniformly sampled npoints times in the interval [ 0, lmax ]
[in]tolRelative tolerance
[in]max_orderMaximum number of terms (order) of the RA
[out]coeffsCoefficients c_i
[out]polesPoles 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].

Definition at line 295 of file ex33.hpp.

◆ ComputePolesAndZeros()

void ComputePolesAndZeros ( const Vector & z,
const Vector & f,
const Vector & w,
Array< real_t > & poles,
Array< real_t > & zeros,
real_t & 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.

Parameters
[in]zSupport points in rational barycentric form
[in]fData values at support points z
[in]wWeights in rational barycentric form
[out]polesArray of poles (roots of p(z))
[out]zerosArray of zeros (roots of q(z))
[out]scaleScaling constant in f(z) = C p(z)/q(z)

See pg. A1501 of Nakatsukasa et al. [1].

Definition at line 175 of file ex33.hpp.

◆ PartialFractionExpansion()

void PartialFractionExpansion ( real_t scale,
Array< real_t > & poles,
Array< real_t > & zeros,
Array< real_t > & 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].

Parameters
[in]polesArray of poles (same as p_i above)
[in]zerosArray of zeros
[in]scaleScaling constant
[out]coeffsCoefficients c_i

Definition at line 245 of file ex33.hpp.

◆ RationalApproximation_AAA()

void RationalApproximation_AAA ( const Vector & val,
const Vector & pt,
Array< real_t > & z,
Array< real_t > & f,
Vector & w,
real_t tol,
int max_order )

RationalApproximation_AAA: compute the rational approximation (RA) of data val [in] at the set of points pt [in].

Parameters
[in]valVector of data values
[in]ptVector of sample points
[in]tolRelative tolerance
[in]max_orderMaximum number of terms (order) of the RA
[out]zSupport points of the RA in rational barycentric form
[out]fData values at support points z
[out]wWeights of the RA in rational barycentric form

See pg. A1501 of Nakatsukasa et al. [1].

Definition at line 52 of file ex33.hpp.