[Trilinos-Users] Questions about InsertGlobalValues

Nico Schlömer nico.schloemer at ua.ac.be
Thu Aug 26 13:09:32 MDT 2010


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