cashocs.nonlinear_solvers.picard_solver#

A Picard iteration for coupled PDEs.

Functions

picard_iteration(form_list, u_list, bcs_list)

Solves a system of coupled PDEs via a Picard iteration.

Classes

TypeVar(name, *constraints[, bound, ...])

Type variable.

cashocs.nonlinear_solvers.picard_solver.picard_iteration(form_list, u_list, bcs_list, max_iter=50, rtol=1e-10, atol=1e-10, verbose=True, inner_damped=True, inner_inexact=True, inner_verbose=False, inner_max_iter=25, ksp_options=None, A_tensors=None, b_tensors=None, inner_is_linear=False, preconditioner_forms=None, linear_solver=None, newton_linearizations=None)[source]#

Solves a system of coupled PDEs via a Picard iteration.

Parameters:
  • form_list (Union[List[ufl.form], ufl.Form]) – List of the coupled PDEs.

  • u_list (Union[List[fenics.Function], fenics.Function]) – List of the state variables (to be solved for).

  • bcs_list (Union[List[fenics.DirichletBC], List[List[fenics.DirichletBC]]]) – List of boundary conditions for the PDEs.

  • max_iter (int) – The maximum number of iterations for the Picard iteration.

  • rtol (float) – The relative tolerance for the Picard iteration, default is 1e-10.

  • atol (float) – The absolute tolerance for the Picard iteration, default is 1e-10.

  • verbose (bool) – Boolean flag, if True, output is written to stdout, default is True.

  • inner_damped (bool) – Boolean flag, if True, the inner problems are solved with a damped Newton method, default is True

  • inner_inexact (bool) – Boolean flag, if True, the inner problems are solved with an inexact Newton method, default is True

  • inner_verbose (bool) – Boolean flag, if True, the inner problems write the history to stdout, default is False.

  • inner_max_iter (int) – Maximum number of iterations for the inner Newton solver; default is 25.

  • ksp_options (Optional[List[_typing.KspOption]]) – List of options for the KSP objects.

  • A_tensors (Optional[List[fenics.PETScMatrix]]) – List of matrices for the right-hand sides of the inner (linearized) equations.

  • b_tensors (Optional[List[fenics.PETScVector]]) – List of vectors for the left-hand sides of the inner (linearized) equations.

  • inner_is_linear (bool) – Boolean flag, if this is True, all problems are actually linear ones, and only a linear solver is used.

  • preconditioner_forms (Optional[Union[List[ufl.Form], ufl.Form]]) – The list of forms for the preconditioner. The default is None, so that the preconditioner matrix is the same as the system matrix.

  • linear_solver (Optional[_utils.linalg.LinearSolver]) – The linear solver (KSP) which is used to solve the linear systems arising from the discretized PDE.

  • newton_linearizations (Optional[List[ufl.Form]]) – A list of UFL forms describing which (alternative) linearizations should be used for the (nonlinear) equations when solving them (with Newton’s method). The default is None, so that the Jacobian of the supplied state forms is used.

Return type:

None