Method

NumCosmoMathSpectralcompute_chebyshev_coeffs_batch_adaptive_cap

Declaration [src]

guint
ncm_spectral_compute_chebyshev_coeffs_batch_adaptive_cap (
  NcmSpectral* spectral,
  NcmSpectralFBatch F,
  guint n_comp,
  gdouble a,
  gdouble b,
  guint level_min,
  guint level_cap,
  gdouble reltol,
  gdouble abstol,
  gboolean fatal,
  NcmMatrix** coeffs,
  gpointer user_data
)

Description [src]

As ncm_spectral_compute_chebyshev_coeffs_batch_adaptive(), stopping at the smaller of level_cap and NcmSpectral:max-level. When fatal is FALSE, not converging leaves coeffs unchanged and returns 0, and the last doubling is skipped when the level below predicts that it cannot converge. That suits a caller that splits its interval on failure.

Parameters

F

Type: NcmSpectralFBatch

Vector-valued function to expand.

n_comp

Type: guint

Number of components of F.

a

Type: gdouble

Interval lower bound.

b

Type: gdouble

Interval upper bound.

level_min

Type: guint

Starting refinement level.

level_cap

Type: guint

Highest refinement level.

reltol

Type: gdouble

Relative tolerance.

abstol

Type: gdouble

Absolute tolerance, in units of the coefficients.

fatal

Type: gboolean

Whether not converging is an error.

coeffs

Type: NcmMatrix

An n_comp by $N$ NcmMatrix of coefficients.

The argument will be set by the function.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.
user_data

Type: gpointer

User data for F.

The argument can be NULL.
The data is owned by the caller of the method.

Return value

Type: guint

The level reached, or 0 when fatal is FALSE and the expansion did not converge.