Ok - I just committed the sparsity pattern stuff... and now you can  
use Trilinos to solve Example3!

I know there's still a lot of work (and cleanup) left to do... but it  
is technically working.  One thing I know for sure is that it's  
probably leaking memory like a bitch ;-)  I'll deal with that next  
week though ;-)

Thanks for all the help everyone!

Derek

On Aug 22, 2008, at 2:09 PM, Benjamin Kirk wrote:

> Should the trilinos list get queried?  Is that a bug??
>
>
>> What do you think Ben?  Shouldn't be too hard right?  After a bit  
>> of looking
>> around it appears that the dof_map can generate the full sparsity  
>> pattern
>> which shouldn't be too hard to translate into the CrsGraph that  
>> Epetra wants.
>
> Right.  You need to overload the  
> SparseMatrix::need_full_sparsity_pattern()
> to return true, and then implement the
> SparseMatrix::update_sparsity_pattern() member (like is done in the
> LaspackMatrix).
>
> The idea is as follows...
>
> (1) The DofMap constructs the graph of the sparse matrix when  
> assigning the
> degrees of freedom, but it does not need to keep this around
>
> (2) for formats like petsc, the graph is not needed, only an  
> accurate (or
> bounding) count on the number of nonzeros per row.
>
> (3) this thing is about the size of the local matrix, so once it is
> constructed and no longer needed it can be thrown away.  However,  
> before
> throwing it away, the DofMap gives the SparseMatrix'es the option to  
> use it.
>
> In any case, see what you can do with it.  It is really simple, the
> SparsityPattern::Graph is simply a vector-of-vectors, with
>
> sparsity_pattern.size() = n_local_rows
> sparsity_pattern[row].size() = # of nonzeros on 'row'
> sparsity_pattern[row][i] = col
> (where row,col is the global matrix index for the ith nonzero entry  
> on this
> row.)
>
> -Ben
>
>


-------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to