On Tue, Oct 21, 2008 at 1:54 AM, Tim Kroeger
<[EMAIL PROTECTED]> wrote:
> Dear John,
>
> What I mean is that SparseMatrix has all the functionality that ShellMatrix
> requires plus a lot of extra functionality. If we had a MatrixBase as Roy
> suggests, then what would be the additional functionality of ShellMatrix
> with respect to MatrixBase? I can't see any. Hence, what about renaming
> ShellMatrix to MatrixBase and then deriving SparseMatrix from that class?
OK. I'd also like to change the name TensorShellMatrix ->
DyadShellMatrix (http://en.wikipedia.org/wiki/Dyadic_product), if
that's alright. The attached updated class tree shows how I now
envision the hierarchy going.
I decided to employ diamond inheritance for the PetscMatrix because it
was the neatest way to resolve the simultaneous need to have a single
base for all Petsc-type matrices (so that PetscLinearSolver routines
can work seamlessly) while still allowing shell matrices to come from
a separate family tree than SparseMatrices come from. We'll just be
careful to use the proper virtual inheritance.
The MatCreateShell and MatShellSetOperation calls in Tim's last patch
will move from the PetscLinearSolver class to the new PetscShellMatrix
class, which shall be derived from PetscMatrixBase. PetscLinearSolver
code will then dynamic_cast internally to PetscMatrixBase* to get at
the 'Mat' object. Generic LinearSolver routines can take
NumericMatrix<T>& references instead of SparseMatrix<T>& references.
I'd be curious to hear about other ideas/suggestions...
--
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