eqiora.solve
Linear, nonlinear, and eigenvalue solver settings.
View sourceExample: configure linear and nonlinear tolerances
Section titled “Example: configure linear and nonlinear tolerances”from eqiora import solve
linear = solve.Linear(objective=solve.Robust, relative_tolerance=1e-10, absolute_tolerance=1e-12, maximum_iterations=1000)nonlinear = solve.Newton(linear=linear, absolute_tolerance=1e-10, maximum_iterations=20)print(nonlinear.maximum_iterations)Pass linear or nonlinear as solve= in eqiora.resolve. Newton uses the
nested linear policy for each update. A smaller tolerance requests a more
accurate algebraic solve; mesh refinement and time-step accuracy are separate
choices. See modeling for full solver setups.
ConstraintTolerance
Section titled “ConstraintTolerance”Absolute tolerances for constraint operands, in physical units.
@finalclass ConstraintTolerance: @staticmethod def inequality(reference: ConstraintRef, value: float, dimension: Dimension) -> ConstraintTolerance: ... @staticmethod def complementarity(reference: ConstraintRef, left_value: float, left_dimension: Dimension, right_value: float, right_dimension: Dimension) -> ConstraintTolerance: ... @property def reference(self) -> ConstraintRef: ... @property def left_value(self) -> float: ... @property def left_dimension(self) -> Dimension: ... @property def right_value(self) -> float | None: ... @property def right_dimension(self) -> Dimension | None: ...ActiveSet
Section titled “ActiveSet”Enforce affine inequality constraints with an active-set method.
@finalclass ActiveSet: def __new__(cls, *, tolerances: tuple[ConstraintTolerance, ...], max_active_sets: int) -> Self: ... @property def tolerances(self) -> tuple[ConstraintTolerance, ...]: ... @property def model_digest(self) -> str: ... @property def max_active_sets(self) -> int: ...StrictInterior
Section titled “StrictInterior”Keep a nonlinear solve strictly inside its inequality constraints, by explicit positive margins.
@finalclass StrictInterior: def __new__(cls, *, margins: tuple[ConstraintTolerance, ...]) -> Self: ... @property def margins(self) -> tuple[ConstraintTolerance, ...]: ... @property def model_digest(self) -> str: ...SolverPlanningObjective
Section titled “SolverPlanningObjective”Objective used by the automatic (serial, CPU) solver planner.
@finalclass SolverPlanningObjective: Robust: ClassVar[SolverPlanningObjective] Fast: ClassVar[SolverPlanningObjective] LowMemory: ClassVar[SolverPlanningObjective] def __eq__(self, other: object, /) -> bool: ... def __hash__(self) -> int: ...Robust
Section titled “Robust”Prefer a solver with reproducible reductions.
Robust: Final[SolverPlanningObjective]Prefer fast reductions, then a direct solver.
Fast: Final[SolverPlanningObjective]LowMemory
Section titled “LowMemory”Prefer iterative solvers over direct factorization. Memory use is not guaranteed to be lower.
LowMemory: Final[SolverPlanningObjective]Linear
Section titled “Linear”Linear solve settings for the Model operator.
Either give an objective and let the planner choose, or give all of
algorithm, preconditioner, reduction, and provider. Partial
or mixed settings are rejected before resolution.
@finalclass Linear: def __new__(cls, *, relative_tolerance: float, absolute_tolerance: float, maximum_iterations: int, objective: SolverPlanningObjective | None=None, algorithm: LinearSolver | None=None, preconditioner: Preconditioner | None=None, reduction: Reduction | None=None, provider: SolverProvider | None=None) -> Self: ... @property def relative_tolerance(self) -> float: ... @property def absolute_tolerance(self) -> float: ... @property def maximum_iterations(self) -> int: ... @property def objective(self) -> SolverPlanningObjective | None: ... @property def algorithm(self) -> LinearSolver | None: ... @property def preconditioner(self) -> Preconditioner | None: ... @property def reduction(self) -> Reduction | None: ... @property def provider(self) -> SolverProvider | None: ... def __eq__(self, other: object, /) -> bool: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ...HermitianEigen
Section titled “HermitianEigen”Dense Hermitian eigenvalue solve with an explicit provider and settings.
@finalclass HermitianEigen: def __new__(cls, *, count: int, provider: SolverProvider, residual_tolerance: float, normalization_tolerance: float, target: tuple[float, Dimension] | None=None, interval: tuple[tuple[float, Dimension], tuple[float, Dimension]] | None=None) -> HermitianEigen: ... @property def count(self) -> int: ... @property def provider(self) -> SolverProvider: ... @property def residual_tolerance(self) -> float: ... @property def normalization_tolerance(self) -> float: ... @property def target(self) -> tuple[float, Dimension] | None: ... @property def interval(self) -> tuple[tuple[float, Dimension], tuple[float, Dimension]] | None: ...EigenPlanView
Section titled “EigenPlanView”Resolved Hermitian eigenproblem: where each matrix comes from and how coordinates map to the model.
@finalclass EigenPlanView: @property def mode_field(self) -> FieldRef: ... @property def eigenvalue_field(self) -> FieldRef: ... @property def coordinate_embeddings(self) -> tuple[EigenCoordinateMap, ...]: ... @property def excluded_space(self) -> EigenExclusion | None: ...EigenCoordinateMap
Section titled “EigenCoordinateMap”One coordinate relation target = mapping * coordinate from the model.
@finalclass EigenCoordinateMap: @property def relation_id(self) -> str: ... @property def target_field(self) -> FieldRef: ... @property def coordinate_field(self) -> FieldRef: ... @property def mapping(self) -> Any: ... @property def mapping_type(self) -> ValueType: ...EigenExclusion
Section titled “EigenExclusion”Directions removed from the eigenproblem, with separate nullspace tests for the operator and the metric.
Defects are normalized Frobenius norms of the operator or metric acting on the excluded directions. The null flags compare them with the Plan’s residual tolerance; they do not identify a physical gauge. The dimensionless projector can be oblique in coefficient space.
@finalclass EigenExclusion: @property def dimension(self) -> int: ... @property def projector(self) -> Any: ... @property def projector_type(self) -> ValueType: ... @property def operator_defect(self) -> float: ... @property def metric_defect(self) -> float: ... @property def tolerance(self) -> float: ... @property def is_operator_null(self) -> bool: ... @property def is_metric_null(self) -> bool: ...AlgebraicPlanView
Section titled “AlgebraicPlanView”Resolved finite algebraic solve, including the list of unknowns.
@finalclass AlgebraicPlanView: @property def kind(self) -> str: ... @property def unknown_count(self) -> int: ...LinearSolver
Section titled “LinearSolver”Linear solver algorithm.
@finalclass LinearSolver: ConjugateGradient: ClassVar[LinearSolver] MinimumResidual: ClassVar[LinearSolver] BiConjugateGradientStabilized: ClassVar[LinearSolver] SparseLu: ClassVar[LinearSolver] def __eq__(self, other: object, /) -> bool: ... def __hash__(self) -> int: ...Preconditioner
Section titled “Preconditioner”Preconditioner.
@finalclass Preconditioner: Identity: ClassVar[Preconditioner] Jacobi: ClassVar[Preconditioner] def __eq__(self, other: object, /) -> bool: ... def __hash__(self) -> int: ...Reduction
Section titled “Reduction”Floating-point reduction order for the linear solve.
Reproducible fixes the order; Fast uses the backend-native order.
@finalclass Reduction: Reproducible: ClassVar[Reduction] Fast: ClassVar[Reduction] def __eq__(self, other: object, /) -> bool: ... def __hash__(self) -> int: ...SolverProvider
Section titled “SolverProvider”A compiled solver backend, identified by name and release.
@finalclass SolverProvider: @staticmethod def reference() -> SolverProvider: ... @staticmethod def faer() -> SolverProvider: ... @property def id(self) -> str: ... @property def implementation_version(self) -> str: ... @property def libraries(self) -> list[tuple[str, str]]: ... def __eq__(self, other: object, /) -> bool: ... def __hash__(self) -> int: ...Newton
Section titled “Newton”Newton solver settings, including the nested linear solve.
Resolution may require the nested linear tolerances to be at least as strict as the Newton absolute tolerance, so that an unconverged iteration cannot stop on a zero correction.
@finalclass Newton: def __new__(cls, *, linear: Linear, relative_tolerance: float=1e-09, absolute_tolerance: float=1e-11, maximum_iterations: int=16, maximum_line_search_steps: int=12) -> Self: ... @property def linear(self) -> Linear: ... @property def relative_tolerance(self) -> float: ... @property def absolute_tolerance(self) -> float: ... @property def maximum_iterations(self) -> int: ... @property def maximum_line_search_steps(self) -> int: ... def __eq__(self, other: object, /) -> bool: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ...ResolvedLinear
Section titled “ResolvedLinear”Linear algorithm, operator class, and provider chosen during resolution.
@finalclass ResolvedLinear: @property def algorithm(self) -> str: ... @property def preconditioner(self) -> str: ... @property def reduction(self) -> str: ... @property def relative_tolerance(self) -> float: ... @property def absolute_tolerance(self) -> float: ... @property def maximum_iterations(self) -> int: ... @property def operator(self) -> str: ... @property def backend(self) -> str: ... @property def backend_version(self) -> str: ... @property def provider(self) -> SolverProvider: ... @property def objective(self) -> SolverPlanningObjective | None: ... @property def planning_policy_id(self) -> str | None: ... @property def selected_candidate_id(self) -> str | None: ... @property def selected_evidence_case(self) -> str | None: ... @property def planning_reasons(self) -> list[tuple[str, str]]: ... def __repr__(self) -> str: ...ResolvedNewton
Section titled “ResolvedNewton”Newton settings and the nested linear solver chosen during resolution.
@finalclass ResolvedNewton: @property def linear(self) -> ResolvedLinear: ... @property def relative_tolerance(self) -> float: ... @property def absolute_tolerance(self) -> float: ... @property def maximum_iterations(self) -> int: ... @property def maximum_line_search_steps(self) -> int: ... def __repr__(self) -> str: ...