On Thu, Oct 9, 2008 at 7:04 AM, Tim Kroeger
<[EMAIL PROTECTED]> wrote:
> Dear Roy and John and all,
>
> Please find attached my next version.
>
> I enclosed all my PETSc calles with "#if PETSC_VERSION_LESS_THAN(2,3,3)" and
> added error messages in the "#else" case since I am not familiar with
> PETSc's API history. Whenever somebody might need the shell matrix
> functionality together with older PETSc versions, he might want to implement
> that himself.

OK, that may unnecessarily break your code when Petsc 2.3.4 (or
whatever their next version will be) comes out though.  I'd do
instead:

#if PETSC_VERSION_LESS_THAN(2,3,2)
// suitable error or unimplemented message
#else
// your current code
#endif


> I switched the user API for shell matrix usage from a callback function to a
> class, which in fact seems to be much more sensible.  I made an abstract
> base class "ShellMatrix" and three derived classes. One of the derived
> classes just wraps a SparseMatrix.  I noticed that SparseMatrix apparently
> did not have a method to compute a matrix-vector product, so I added this
> functionality to SparseMatrix and PetscMatrix (whereas calling
> libmesh_not_implemented() in LaspackMatrix).

This functionality (matrix-vector product) is actually in the
NumericVector class, it's the add_vector routine which takes a
SparseMatrix.  Enough people have been confused about this that we
should probably implement it in SparseMatrix as well, but I'd vote for
an implementation in terms of the existing NumericVector one (if
possible) rather than duplicating code.


> By the way, why is the .depend file contained in the repository?

A couple of reasons: this way we don't require all users to have perl
installed (though I don't know how they wouldn't...) to generate
dependencies.  Second, we used to generate dependencies with the
compiler instead of perl and it really took forever, so it made sense
to check in the .depend file.

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

Reply via email to