conatus.expert.discretize

conatus.expert.discretize(problem, ncc=None, params=None, ncc_cutoff=None, assembly='direct', ncc_tail_tol=1e-08)[source]

Build the discretization plan of a problem (matrices are assembled lazily per group). assembly="wavenumber_interpolation" compiles each class of Fourier groups at a few wavenumbers and interpolates (exact for these polynomial matrices; checked once per class). Problems on a terrain-following mapped domain (TerrainChebyshev) get a TerrainPlan (all Fourier modes coupled by the metric, one sparse system). Problems on PolarCoordinates get a PolarPlan (groups by azimuthal wavenumber m, regular disk/annulus bases; same public face). An LHS with conj() of an unknown (R-linear) is discretized as the equivalent doubled system (X, conj X), declared (conjugate.py). Non-constant coefficients: one whose sampled Chebyshev tail exceeds ncc_tail_tol (declared default conatus.tolerances.NCC_TAIL_TOL) is refused with the resolution to use; ncc_cutoff=c declares a truncation (coefficients below c max|a| dropped, sampled tails up to c accepted), reported by plan.explain() (every plan: Cartesian, polar, spherical).

Parameters:
  • problem (Problem)

  • ncc (Mapping[Field, Any] | None)

  • params (Mapping[str, Any] | None)

  • ncc_cutoff (float | None)

  • assembly (str)

  • ncc_tail_tol (float)

Return type:

Plan