conatus.expert.PeriodicNewtonSolver

class conatus.expert.PeriodicNewtonSolver(problem, *, tol=REQUIRED, damping=1.0, max_iterations=50, phase=None, ncc=None, params=None, allow_drift=False)[source]

Bases: object

Newton with a dense coupled Jacobian for an NLBVP on an all-Fourier domain.

tolerance (on max |F_h| / scale), damping and max_iterations are required. phase: one PhaseCondition per translation-invariant periodic direction (required there). ncc: fixed coefficient fields (callables of the grids or FieldData), as for discretize.

Parameters:
  • problem (NLBVP)

  • tol (float)

  • damping (float)

  • max_iterations (int)

  • phase (Sequence[PhaseCondition] | PhaseCondition | None)

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

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

  • allow_drift (bool)

pack(coeffs)[source]
Parameters:

coeffs (Mapping[str, ndarray])

Return type:

ndarray

unpack(x)[source]
Parameters:

x (ndarray)

Return type:

dict[str, ndarray]

residual(coeffs, mu=())[source]

F_h(c) (retained coefficients of every equation), with the multiplier terms.

Parameters:
  • coeffs (Mapping[str, ndarray])

  • mu (Sequence[float])

Return type:

ndarray

jacobian(coeffs, mu=())[source]

Exact dF_h/dc, column by column (dense, n x n), including mu * d_x on the phase rows.

Parameters:
  • coeffs (Mapping[str, ndarray])

  • mu (Sequence[float])

Return type:

ndarray

solve(guess, *, require_convergence=True)[source]

Newton from guess (field -> callable of the grids / FieldData / number).

Parameters:
  • guess (Mapping[Field, Any])

  • require_convergence (bool)

Return type:

PeriodicNLBVPSolution

explain()[source]
Return type:

str