gemseo / mda

gauss_seidel module

A Gauss Seidel algorithm for solving MDAs

class gemseo.mda.gauss_seidel.MDAGaussSeidel(disciplines, name=None, max_mda_iter=10, grammar_type='JSON', tolerance=1e-06, linear_solver_tolerance=1e-12, warm_start=False, use_lu_fact=False, norm0=None)[source]

Bases: gemseo.mda.mda.MDA

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

\[Ax = b\]

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:

\[x_{k+1} = L_*^{-1}(b-Ux_k)\]

Constructor

Parameters
  • disciplines (list(MDODiscipline)) – the disciplines list

  • max_mda_iter (int) – maximum number of iterations

  • name (str) – the name of the chain

  • grammar_type (str) – the type of grammar to use for IO declaration either JSON_GRAMMAR_TYPE or SIMPLE_GRAMMAR_TYPE

  • 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

  • linear_solver_tolerance (float) – Tolerance of the linear solver in the adjoint equation

  • warm_start (bool) – if True, the second iteration and ongoing start from the previous coupling solution

  • use_lu_fact (bool) – if True, when using adjoint/forward differenciation, store a LU factorization of the matrix to solve faster multiple RHS problem

  • norm0 (float) – reference value of the norm of the residual to compute the decrease stop criteria. Iterations stops when norm(residual)/norm0<tolerance

reset_statuses_for_run()[source]

Sets all the statuses to PENDING