On Mon, 20 Oct 2008, John Peterson wrote:

> On Mon, Oct 20, 2008 at 11:14 AM, Roy Stogner <[EMAIL PROTECTED]> wrote:
>>>> Also, I would suggest to derive SparseMatrix from ShellMatrix rather than
>>>> vice versa.  This could actually make SparseShellMatrix unnecessary.
>>>>  This
>>>> is of course an advantage of the unification.
>>>
>>> This one I disagree with.  Inheritance should always follow the "is a"
>>> organizational semantic, and a SparseMatrix (as we now define it) is
>>> most definitely *not* a ShellMatrix.
>>
>> Yes, but both of them are a MatrixBase.
>>
>> Yes, it is easier to add new classes when someone else has already
>> volunteered to do the work of writing them.  ;-)
>
> In all seriousness, I still don't see the compelling argument for this
> extra base class.

Because SparseMatrix is-not-a ShellMatrix (doesn't need to attach or
even acknowledge the existance of a user's matvec shell function), and
ShellMatrix is-not-a SparseMatrix (doesn't need sparsity pattern
details in the constructor, can't return or set individual matrix
entries), but both of them are-a MatrixBase (can perform matrix-vector
products on NumericVectors, at least, and with some tricks we can pass
them both to what are conceptually the same solvers, scale them, add
them together, etc).
---
Roy

-------------------------------------------------------------------------
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

Reply via email to