gemseo.mda.newton_raphson_settings module#

Settings for NewtonRaphson MDA.

class LinearSolver(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: StrEnum

BICG = 'BICG'#
BICGSTAB = 'BICGSTAB'#
CG = 'CG'#
CGS = 'CGS'#
DEFAULT = 'DEFAULT'#
GCROT = 'GCROT'#
GMRES = 'GMRES'#
LGMRES = 'LGMRES'#
TFQMR = 'TFQMR'#
Settings MDANewtonRaphson_Settings(*, coupling_structure=None, linear_solver=LinearSolver.DEFAULT, linear_solver_settings=None, linear_solver_tolerance=1e-12, log_convergence=False, max_mda_iter=20, max_consecutive_unsuccessful_iterations=8, name='', tolerance=1e-06, use_lu_fact=False, warm_start=False, acceleration_method=AccelerationMethod.NONE, over_relaxation_factor=1.0, execute_before_linearizing=False, n_processes=2, use_threading=True, newton_linear_solver_name=LinearSolver.DEFAULT, newton_linear_solver_settings=None)[source]#

Bases: BaseParallelMDASettings

The settings for MDANewtonRaphson.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • coupling_structure (CouplingStructure | None)

  • linear_solver (LinearSolver) --

    By default it is set to "DEFAULT".

  • linear_solver_settings (Mapping[str, Any] | BaseLinearSolverSettings)

  • linear_solver_tolerance (Annotated[float, Ge(ge=0)]) --

    By default it is set to 1e-12.

  • log_convergence (bool) --

    By default it is set to False.

  • max_mda_iter (Annotated[int, Ge(ge=0)]) --

    By default it is set to 20.

  • max_consecutive_unsuccessful_iterations (Annotated[int, Ge(ge=0)]) --

    By default it is set to 8.

  • name (str) --

    By default it is set to "".

  • tolerance (Annotated[float, Ge(ge=0)]) --

    By default it is set to 1e-06.

  • use_lu_fact (bool) --

    By default it is set to False.

  • warm_start (bool) --

    By default it is set to False.

  • acceleration_method (AccelerationMethod) --

    By default it is set to "NoTransformation".

  • over_relaxation_factor (Annotated[float, Le(le=2.0), Ge(ge=0)]) --

    By default it is set to 1.0.

  • execute_before_linearizing (bool) --

    By default it is set to False.

  • n_processes (Annotated[int, Gt(gt=0)]) --

    By default it is set to 2.

  • use_threading (bool) --

    By default it is set to True.

  • newton_linear_solver_name (LinearSolver) --

    By default it is set to "DEFAULT".

  • newton_linear_solver_settings (Mapping[str, Any] | BaseLinearSolverSettings)

Return type:

None

execute_before_linearizing: bool = False#

Whether to start by executing the disciplines before linearizing. This ensures that the discipline are executed and linearized with the same input data. It can be almost free if the corresponding output data have been stored in the BaseMDA.cache.

newton_linear_solver_name: LinearSolver = LinearSolver.DEFAULT#

The name of the linear solver for the Newton method.

newton_linear_solver_settings: StrKeyMapping | BaseLinearSolverSettings [Optional]#

The settings for the Newton linear solver.