Right now the generic LinearSolver::set_preconditioner_type() interface just sets its own _preconditioner_type variable and returns. This makes it hard to actually change preconditioners through the generic interface if you've already initialized your LinearSolver object. For example, in the PetscLinearSolver, PetscPreconditioner<T>::set_petsc_preconditioner_type(...) only gets called during init, so there's no easy way to change preconditioners between solves. Laspack is a little better, as it calls set_laspack_preconditioner_type before solving. Aztec follows the PETSc model, only allowing preconditioners to be set during init().
If we make LinearSolver::set_preconditioner_type() virtual, we can just have it call the underlying set_XXX_preconditioner_type function in the derived classes. What do y'all think? Another option is to call set_XXX_preconditioner_type in the solve function for each LinearSolver type, but that is just one more thing to remember everytime you write a new solve() method, and also might incur some additional unnecessary overhead. -- John ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
