gemseo / mda

jacobi module

A Jacobi algorithm for solving MDAs

class gemseo.mda.jacobi.MDAJacobi(disciplines, max_mda_iter=10, name=None, n_processes=2, acceleration='m2d', tolerance=1e-06, linear_solver_tolerance=1e-12, use_threading=True, warm_start=False, use_lu_fact=False, norm0=None)[source]

Bases: gemseo.mda.mda.MDA

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

\[Ax = b\]

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

The new iterate is given by:

\[x_{k+1} = D^{-1}(b-Rx_k)\]

Constructor

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

  • max_mda_iter (int) – maximum number of iterations

  • name (str) – the name of the chain

  • n_processes (int) – maximum number of processors on which to run

  • 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

  • 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

  • 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

  • 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

M2D_ACCELERATION = 'm2d'
SECANT_ACCELERATION = 'secant'
execute_all_disciplines(input_local_data)[source]

Executes all self.disciplines

Parameters

input_local_data – the input data of the disciplines

get_expected_workflow()[source]

See MDA.get_expected_workflow