Basic HTML version of Foils prepared August 29 98

Foil 53 PETSc Example

From Designing and Building Parallel Programs I: Introduction DoD Modernization Tutorial -- 1995-1998. by Ian Foster, Gina Goff, Ehtesham Hayder, Chuck Koelbel


1
2 SLES snes
3 MAT A
4 Vec x,F
5 integer n,its,ierr
6 call MatCreat(MPI_COMM_WORLD,n,n,J,ierr)
7 call VecCreate(MPI_COMM_WORLD,n,x,ierr)
8 call VecDuplicate(x,F,ierr)
9 call SNESCreate(MPI_COMM_WORLD,SNES_NONLINEAR_EQUATIONS,snes,ierr)
10 call SNESSetFunction(snes,F,EvaluateFunction,PETSC_NULL,ierr)
11 call SNESSetJacobian(snes,J,EvaluateJacobian,PETSC_NULL,ierr)
12 call SNESSetFromOptions(sles,ierr)
13 call SNESSolve(sles,b,x,its,ierr)
14 call SNESDestroy(snes,ierr)

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Apr 11 1999