Skip to content

Commit

Permalink
preallocate
Browse files Browse the repository at this point in the history
Signed-off-by: Jed Brown <jed@59A2.org>
  • Loading branch information
jedbrown committed Dec 5, 2008
1 parent 46d6acf commit 3c1e5cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/fs/tests/ex1.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ static dErr doProjection(dFS fs)
err = dFSCreateGlobalVector(fs,&r);dCHK(err);
err = dFSGetMatrix(fs,MATSEQAIJ,&Jp);dCHK(err);
err = MatSetOptionsPrefix(Jp,"q1");dCHK(err);
err = MatSeqAIJSetPreallocation(Jp,27,NULL);dCHK(err);
J = Jp; /* Use -snes_mf_operator to apply J matrix-free instead of actually using Jp as the Krylov matrix */
err = SNESCreate(comm,&snes);dCHK(err);
err = SNESSetFunction(snes,r,ProjResidual,(void*)&proj);dCHK(err);
Expand Down

0 comments on commit 3c1e5cf

Please sign in to comment.