petsc-3.4.5 2014-06-29

Nonlinear solvers - SNES: Examples

The Scalable Nonlinear Equations Solvers (SNES) component provides an easy-to-use interface to Newton-type, quasi-Newton, full approximation scheme (FAS) multigrid, and other methods for solving systems of nonlinear equations. SNES users can set various algorithmic options at runtime via the options database (e.g., specifying a trust region method via -snes_type tr ). SNES internally employs KSP for the solution of its linear systems. SNES users can also set KSP options directly in application codes by first extracting the KSP context from the SNES context via SNESGetKSP() and then directly calling various KSP (and PC) routines (e.g., PCSetType() ).

ex1.c: Newton's method for a two-variable system, sequential
ex2.c: Newton method to solve u'' + u^{2} = f, sequentially
ex3.c: Newton methods to solve u'' + u^{2} = f in parallel
ex4.c: Solves the Lane-Emden equation in a 2D rectangular\n\
ex5.c: Bratu nonlinear PDE in 2d
ex5s.c: 2d Bratu problem in shared memory parallel with SNES
ex7.c: Solves the Stokes equation in a 2D rectangular\n\
ex10.c: Uses analytic Jacobians to solve individual problems and a coupled problem
ex12.c: Poisson Problem in 2d and 3d with simplicial finite elements
ex14.c: Bratu nonlinear PDE in 3d
ex15.c: p-Bratu nonlinear PDE in 2d
ex18.c: Nonlinear Radiative Transport PDE with multigrid in 2d
ex19.c: Nonlinear driven cavity with multigrid in 2d
ex20.c: Nonlinear Radiative Transport PDE with multigrid in 3d
ex21.c: Solves PDE optimization problem using full-space method, treats state and adjoint variables separately
ex22.c: Solves PDE optimization problem using full-space method, interlaces state and adjoint variables
ex25.c: Minimum surface problem in 2D
ex28.c: 1D multiphysics prototype with analytic Jacobians to solve individual problems and a coupled problem
ex30.c: Steady-state 2D subduction flow, pressure and temperature solver
ex31.c: Stokes Problem with Temperature in 2d and 3d with simplicial finite elements
ex33.c: Multiphase flow in a porous medium in 1d
ex35.c: -Laplacian u = b as a nonlinear problem
ex42.c: Newton's method to solve a two-variable system that comes from the Rosenbrock function
ex43.c: Newton's method to solve a many-variable system that comes from the 2 variable Rosenbrock function + trivial
ex46.c: Surface processes in geophysics
ex48.c: Toy hydrostatic ice flow with multigrid in 3D
ex52.c: Testbed for FEM operations on the GPU
ex53.c: Read linear variational inequality from file and solve it
ex54.c: Cahn-Hilliard-2d problem for constant mobility and triangular elements
ex55.c: Allen-Cahn-2d problem for constant mobility and triangular elements
ex58.c: Parallel version of the minimum surface area problem in 2D using DMDA
ex59.c: Tries to solve u`` + u^{2} = f for an easy case and an impossible case
ex60.c: 2D coupled Allen-Cahn and Cahn-Hilliard equation for constant mobility and triangular elements
ex61.c: 2D coupled Allen-Cahn and Cahn-Hilliard equation for constant mobility and triangular elements
ex61gen.c: Generates random numbers for radioactive events for ex61
ex61view.c: Loads data generated by ex61 and VTK file suitable for Paraview or Visit
ex62.c: Stokes Problem in 2d and 3d with simplicial finite elements
ex63.c: 1D coupled Allen-Cahn and Cahn-Hilliard equation for degenerate mobility and triangular elements
ex633d_db.c: 3D coupled Allen-Cahn and Cahn-Hilliard equation for degenerate mobility and triangular elements
ex64.c: 1D coupled Allen-Cahn and Cahn-Hilliard equation for constant mobility
ex65.c: 2D coupled Allen-Cahn and Cahn-Hilliard equation for constant mobility
ex70.c: Poiseuille flow problem
ex47cu.cu: Solves -Laplacian u - exp(u) = 0, 0 < x < 1 using GPU\n\n
ex52_integrateElement_coef.cu:
ex52_integrateElement.cu:
makefile