If you want to skip the new factorization you can simply call KSPSetReusePreconditioner() appropriate in the #else case below
Barry > On Jan 7, 2015, at 10:16 PM, David Knezevic <david.kneze...@akselos.com> > wrote: > > I notice that in PetscLinearSolver<T>::solve we have: > > ---------------------- > > #if PETSC_RELEASE_LESS_THAN(3,5,0) > ierr = KSPSetOperators(_ksp, submat, subprecond, > this->same_preconditioner ? SAME_PRECONDITIONER > : DIFFERENT_NONZERO_PATTERN); > #else > ierr = KSPSetOperators(_ksp, submat, subprecond); > #endif > > ---------------------- > > I use the this->same_preconditioner flag with a direct solver to get good > performance for a sequence of solves with the same matrix and different rhs > (by reusing the LU factorization). But it looks like this flag has no effect > in PETSc 3.5? Does anyone know the right way to reuse the LU factorization > with PETSc 3.5? > > Thanks, > David > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. > http://goparallel.sourceforge.net_______________________________________________ > Libmesh-devel mailing list > Libmesh-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libmesh-devel ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel