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_max_iter=25, ksp_options=None, A_tensors=None, b_tensors=None, preconditioner_forms=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_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.

  • 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.

  • 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