MFEM  v4.5.1
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Functions
ex33.hpp File Reference

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)
 

Function Documentation

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.

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.

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.

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.

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].

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.

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].

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.