# MDA algorithms options¶

List of available algorithms: GSNewtonMDA - MDAChain - MDAGaussSeidel - MDAJacobi - MDANewtonRaphson - MDAQuasiNewton - MDARoot - MDASequential -

`GSNewtonMDA`

¶

### Description¶

Perform some GaussSeidel iterations and then NewtonRaphson iterations.

### Options¶

**grammar_type**,`str`

- the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE**linear_solver**,`str`

- type of linear solver to be used to solve the Newton problem**linear_solver_tolerance**,`float`

- Tolerance of the linear solver in the adjoint equation**max_mda_iter**,`int`

- maximum number of iterations**max_mda_iter_gs**,`int`

- maximum number of iterations of the GaussSeidel solver**name**,`str`

- name**relax_factor**,`float`

- relaxation factor**tolerance**,`float`

- tolerance of the iterative direct coupling solver, norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating**use_lu_fact**,`bool`

- if True, when using adjoint/forward differenciation, store a LU factorization of the matrix to solve faster multiple RHS problem**warm_start**,`bool`

- if True, the second iteration and ongoing start from the previous coupling solution

`MDAChain`

¶

### Description¶

The **MDAChain** computes a chain of subMDAs and simple evaluations.

The execution sequence is provided by the
`DependencyGraph`

class.

### Options¶

**chain_linearize**,`bool`

- linearize the chain of execution, if True Otherwise, linearize the oveall MDA with base class method Last option is preferred to minimize computations in adjoint mode in direct mode, chain_linearize may be cheaper**grammar_type**,`string`

- the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE**max_mda_iter**,`int`

- maximum number of iterations for sub MDAs**n_processes**,`int`

- number of processes for parallel run**name**,`str`

- name of self**sub_mda_class**,`str`

- the class to instantiate for sub MDAs**tolerance**,`float`

- tolerance of the iterative direct coupling solver, norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating**use_lu_fact**,`bool`

- if True, when using adjoint/forward differenciation, store a LU factorization of the matrix to solve faster multiple RHS problem

`MDAGaussSeidel`

¶

### Description¶

Perform a MDA analysis using a Gauss-Seidel algorithm, an iterative technique to solve the linear system:

by decomposing the matrix \(A\) into the sum of a lower triangular matrix \(L_*\) and a strictly upper triangular matrix \(U\).

The new iterate is given by:

### Options¶

**grammar_type**,`str`

- the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE**linear_solver_tolerance**,`float`

- Tolerance of the linear solver in the adjoint equation**max_mda_iter**,`int`

- maximum number of iterations**name**,`str`

- the name of the chain**over_relax_factor**,`float`

- relaxation coefficient, used to make the method more robust, if 0<over_relax_factor<1 or faster if 1<over_relax_factor<=2. If over_relax_factor =1., it is deactivated**tolerance**,`float`

- tolerance of the iterative direct coupling solver, norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating**use_lu_fact**,`bool`

- if True, when using adjoint/forward differenciation, store a LU factorization of the matrix to solve faster multiple RHS problem**warm_start**,`bool`

- if True, the second iteration and ongoing start from the previous coupling solution

`MDAJacobi`

¶

### Description¶

Perform a MDA analysis using a Jacobi algorithm, an iterative technique to solve the linear system:

by decomposing the matrix \(A\) into the sum of a diagonal matrix \(D\) and the reminder \(R\).

The new iterate is given by:

### Options¶

**acceleration**,`str`

- type of acceleration to be used to extrapolate the residuals and save CPU time by reusing the information from the last iterations, either None, or m2d, or secant, m2d is faster but uses the 2 last iterations**grammar_type**,`str`

- the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE**linear_solver_tolerance**,`float`

- Tolerance of the linear solver in the adjoint equation**max_mda_iter**,`int`

- maximum number of iterations**n_processes**,`int`

- maximum number of processors on which to run**name**,`str`

- the name of the chain**tolerance**,`float`

- tolerance of the iterative direct coupling solver, norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating**use_lu_fact**,`bool`

- if True, when using adjoint/forward differenciation, store a LU factorization of the matrix to solve faster multiple RHS problem**use_threading**,`bool`

- use multithreading for parallel executions otherwise use multiprocessing**warm_start**,`bool`

- if True, the second iteration and ongoing start from the previous coupling solution

`MDANewtonRaphson`

¶

### Description¶

Newton solver for MDA.

The Newton-Raphson method is parameterized by a relaxation factor \(\alpha \in (0, 1]\) to limit the length of the steps taken along the Newton direction. The new iterate is given by:

### Options¶

**grammar_type**,`str`

- the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE**linear_solver**,`str`

- linear solver used to compute the Newton step**linear_solver_tolerance**,`float`

- Tolerance of the linear solver in the adjoint equation**max_mda_iter**,`int`

- maximum number of iterations**name**,`str`

- name**relax_factor**,`float`

- relaxation factor in the Newton step (default 1.)**tolerance**,`float`

- tolerance of the iterative direct coupling solver, norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating**use_lu_fact**,`bool`

- if True, when using adjoint/forward differenciation, store a LU factorization of the matrix to solve faster multiple RHS problem**warm_start**,`bool`

- if True, the second iteration and ongoing start from the previous coupling solution

`MDAQuasiNewton`

¶

### Description¶

Quasi-Newton solver for MDA.

Quasi-Newton methods
include numerous variants
(
Broyden,
Levenberg-Marquardt,
…).
The name of the variant should be provided
as a parameter `method`

of the class.

The new iterate is given by:

where \(\rho_k\) is a coefficient chosen in order to minimize the convergence and \(B_k\) is an approximation of the inverse of the Jacobian \(Df(x_k)^{-1}\).

### Options¶

**grammar_type**,`str`

- the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE**linear_solver_tolerance**,`float`

- Tolerance of the linear solver in the adjoint equation**max_mda_iter**,`int`

- maximum number of iterations**method**,`str`

- method name in scipy root finding, among self.QUASI_NEWTON_METHODS**name**,`str`

- name**tolerance**,`float`

- tolerance of the iterative direct coupling solver, norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating**use_gradient**,`bool`

- if True, used the analytic gradient of the discipline**use_lu_fact**,`bool`

- if True, when using adjoint/forward differenciation, store a LU factorization of the matrix to solve faster multiple RHS problem**warm_start**,`bool`

- if True, the second iteration and ongoing start from the previous coupling solution

`MDARoot`

¶

### Description¶

Abstract class implementing MDAs based on (Quasi-)Newton methods.

### Options¶

**grammar_type**,`str`

- the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE**linear_solver_tolerance**,`float`

- Tolerance of the linear solver in the adjoint equation**max_mda_iter**,`int`

- maximum number of iterations**name**,`str`

- the name of the chain**tolerance**,`float`

- tolerance of the iterative direct coupling solver, norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating**use_lu_fact**,`bool`

- if True, when using adjoint/forward differenciation, store a LU factorization of the matrix to solve faster multiple RHS problem**warm_start**,`bool`

- if True, the second iteration and ongoing start from the previous coupling solution

`MDASequential`

¶

### Description¶

Perform a MDA defined as a sequence of elementary MDAs.

### Options¶

**grammar_type**,`str`

- the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE**linear_solver_tolerance**,`float`

- Tolerance of the linear solver in the adjoint equation**max_mda_iter**,`int`

- maximum number of iterations**name**,`str`

- name**tolerance**,`float`

- tolerance of the iterative direct coupling solver, norm of the current residuals divided by initial residuals norm shall be lower than the tolerance to stop iterating**use_lu_fact**,`bool`

- use LU factorization**warm_start**,`bool`

- if True, the second iteration and ongoing start from the previous coupling solution