Method

NumCosmoMathSpectralcompute_chebyshev_coeffs_batch_adaptive

Declaration [src]

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

Description [src]

Computes the Chebyshev coefficients of the n_comp components of $F$ on one shared grid, as ncm_spectral_compute_chebyshev_coeffs_adaptive_full(). Each node is evaluated once for all components. Every component must converge, so the one needing the highest level sets it for all. Reaching NcmSpectral:max-level without converging is an error.

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.

reltol

Type: gdouble

Relative tolerance.

abstol

Type: gdouble

Absolute tolerance, in units of the coefficients.

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 $r$ reached, with $N = 2^r + 1$.