On Thu, Oct 16, 2008 at 10:20 AM, Tim Kroeger
<[EMAIL PROTECTED]> wrote:
> Dear John/Roy/all,
>
> 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.
>
> A patch with the current version is attached.

Looks like you're learning more about PETSc than you ever wanted to
know :-)  The pointwise multiplication and diagonal getter
functionality is nice to have, thanks for contributing it back to the
library.

It's a little silly we have to do things like:

const_cast<void*>(static_cast<const void*>(&shell_matrix)),

in order to make use of the (supposedly better) C++ casts when the C-style

(void*)(&shell_matrix)

works and looks so much neater.  My preference is to stick with C++
casts since it does make it very explicit, but sheesh...


> It works for my example on one processor, where "works" means "does not
> crash and gives results that might or might not be correct".
>
> I am currently unable to test it in parallel since there is some trouble
> with the cluster I've been using.  I hope this will be resolved soon.
>
> I'll keep you informed.

OK, sounds good.

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