On Thu, Oct 16, 2008 at 10:46 AM, Roy Stogner <[EMAIL PROTECTED]> wrote: > > On Thu, 16 Oct 2008, Tim Kroeger wrote: > >> As Roy predicted, preconditioning is tricky. I extended the ShellMatrix >> class (and all the derived classes) by a get_diagonal() method, thus allowing >> at least JACOBI preconditioning, which for the moment seems to be sufficient >> for my example. This required to add an analogous function to the >> SparseMatrix class and a pointwise_mult() function to NumericVector. > > I'm a bit unhappy with the current inheritance tree - there's no > inheritance between ShellMatrix and SparseMatrix, even though the > latter is already practically an abstract base class that declares the > functions the former will need to use? There's no getting around the > need to duplicate a lot of function definitions (get_diagonal() is > going to be different in the different classes no matter how things > are factored) but it seems like a little refactoring (make both > ShellMatrix and SparseMatrix inherit from a MatrixBase?) would at > least give us more concise code using them.
I think I'll withhold judgment until I've seen the new ShellMatrix header file... It doesn't seem like they should necessarily be treated as members of the SparseMatrix inheritance family. It's bad enough that we can't simultaneously keep the LaspackMatrix interface up-to-date with changes to the Petsc one, and now we want to add one more family member? ;-) -- John ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
