gemseo / mda

sequential_mda module

A chain of MDAs to build hybrids of MDA algorithms sequentially

class gemseo.mda.sequential_mda.GSNewtonMDA(disciplines, name=None, grammar_type='JSON', tolerance=1e-06, max_mda_iter=10, relax_factor=0.99, linear_solver='lgmres', max_mda_iter_gs=3, linear_solver_tolerance=1e-12, warm_start=False, use_lu_fact=False, norm0=None, **newton_mda_options)[source]

Bases: gemseo.mda.sequential_mda.MDASequential

Perform some GaussSeidel iterations and then NewtonRaphson iterations.

Constructor

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

  • name (str) – name

  • 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

  • max_mda_iter (int) – maximum number of iterations

  • relax_factor (float) – relaxation factor

  • linear_solver (str) – type of linear solver to be used to solve the Newton problem

  • max_mda_iter_gs (int) – maximum number of iterations of the GaussSeidel solver

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

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

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

  • newton_mda_options (dict) – options passed to the MDANewtonRaphson

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

class gemseo.mda.sequential_mda.MDASequential(disciplines, mda_sequence, name=None, grammar_type='JSON', max_mda_iter=10, 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 defined as a sequence of elementary MDAs.

Constructor

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

  • mda_sequence (list(MDA)) – sequence of MDAs

  • max_mda_iter (int) – maximum number of iterations

  • name (str) – name

  • 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

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

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

  • use_lu_fact (bool) – use LU factorization

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