[Trilinos-Users] CrsMatrix with col map is broken

Williams, Alan B william at sandia.gov
Mon Mar 28 07:55:44 MDT 2011


> 
> >From my perusal of the code, it's not clear that Epetra really solves
> anything. Rather, it uses the row map for the column map and than
> blithely ignores it for the purposes of InsertGlobalValues(), allowing
> you to write into "off-processor" columns. I actually went looking for
> how it made a "proper" column map and it doesn't look like it does.
> 

It creates a column-map during FillComplete().

> How do I even make a rectangular matrix without specifying the column-
> map, though? Unless I'm completely confused (and I am!) the only
> arguments to the constructor that define the matrix shape are the maps.

It's true that constructor arguments don't fully define the structure of the matrix.
Note that the column-map is defined by your sparsity pattern (the structure of your graph). It can range from being the same as your row-map (if your matrix is block-diagonal) to being full (1 to global-n) on every processor. So it depends on how your graph ends up.
You pass a domain-map and range-map to FillComplete(). Domain-map and range-map define the "mathematical shape" of your matrix. If you don't pass these to FillComplete, then epetra assumes that your matrix is square and that the range-map is the row-map.

For a little more information about the 4 epetra-maps that describe the graph of an epetra matrix, see the doxygen comments here:
http://trilinos.sandia.gov/packages/docs/r10.6/packages/epetra/doc/html/classEpetra__CrsGraph.html#_details

Alan





More information about the Trilinos-Users mailing list