cideMOD.numerics.solver
Classes
|
A Newton solver for non-linear block problems. |
|
Define a nonlinear problem, interfacing with SNES. |
- class cideMOD.numerics.solver.NewtonBlockSolver(comm: mpi4py.MPI.Intracomm, problem: NonlinearBlockProblem, conf='mumps', monitor=False, save_path=None)[source]
Bases:
objectA Newton solver for non-linear block problems.
- log = [('snes_monitor', ':snes_log.txt'), ('ksp_monitor', ':ksp_log.txt'), ('snes_linesearch_monitor', ':line_search_log.txt'), ('options_view', True), ('options_left', True)]
- class cideMOD.numerics.solver.NonlinearBlockProblem(F: List[ufl.Form], u: Tuple[dolfinx.fem.Function], bcs: List[dolfinx.fem.DirichletBC], J: List[List[ufl.Form]], restriction: List[multiphenicsx.fem.DofMapRestriction] | None = None, P: ufl.Form | None = None)[source]
Bases:
objectDefine a nonlinear problem, interfacing with SNES.
- F(snes: petsc4py.PETSc.SNES, x: petsc4py.PETSc.Vec, b: petsc4py.PETSc.Vec) None
Assemble the residual.
- J(snes: petsc4py.PETSc.SNES, x: petsc4py.PETSc.Vec, A: petsc4py.PETSc.Mat, P_mat: petsc4py.PETSc.Mat) None
Assemble the jacobian.
- obj(snes: petsc4py.PETSc.SNES, x: petsc4py.PETSc.Vec) float64
Compute the norm of the residual.
- update_solutions(x: petsc4py.PETSc.Vec) None
Update self._solutions with data in x.