[Trilinos-Users] Questions about InsertGlobalValues

M. Scot Breitenfeld brtnfld at uiuc.edu
Thu Aug 26 14:04:49 MDT 2010


  Hi Nico,

My method is a particle based method; I'm just using the FECrsMatrix 
class because it allows off-processor row assignment whereas CrsMatrix 
does not. The formulation therefore lends itself to row based assignment 
since I loop over nodes. But I'm thinking it would be better if I pass 
InsertGlobalValues at least 3 rows (corresponding to the x,y,and z dofs) 
then just one row at a time.

I looked at the documentation but I can not find how do you tell Epetra 
the K matrix is symmetric? I don't want it to store the other half of 
the matrix.


On 08/26/2010 02:09 PM, Nico Schlömer wrote:
> Hi Scot,
>
> the Epetra_FECrsMatrix class was written to help creating FE matrix as
> easily as possible, i.e., without having to worry about which matrix row
> sits on which processor at insertion.
> Generally for FEM systems, you would loop over the elements and create
> the *local stiffness matrices (of size 3-by-3 for linear triangular
> elements for example). Once you have one of these, you can insert the
> whole thing into the stiffness matrix at once by
>
>   	InsertGlobalValues (const Epetra_IntSerialDenseVector&indices, const
> Epetra_SerialDenseMatrix&values )
>
> -- There's no need to do that row-by-row.
>
> The same goes for the graph: You may want to use Epetra_FECrsGraph, and
> then just loop over the elements to fill in the sparsity structure.
>
> Does that help?
>
> Cheers,
> Nico
>





More information about the Trilinos-Users mailing list