[Trilinos-Users] Epetra_CrsMatrix constructor

Heroux, Michael A maherou at sandia.gov
Mon Mar 15 18:03:54 MDT 2010


John,

I think you are probably looking for the Epetra_VbrMatrix class, which supports block entry matrices.  If you really want to store your matrix using Epetra_CrsMatrix, then you will need to create Epetra_Map objects that are 3X the size of your BlockMaps.

Take a look at Epetra_VbrMatrix and let me know what you think.

Mike


On 3/15/10 5:43 PM, "John Mitchell" <jamitch at sandia.gov> wrote:

After more thought, I have come to realize that this may be even more
complex when I go to populate the matrix.

First, I need to have separate RowMap and ColMap for construction of the
Epetra_CrsMatrix since rows will be based upon owned points and columns
will be based upon owned and shared.

Then, when I go to populate the matrix for a row, I would have to supply
a 3x3 matrix since I have 3 dofs per element in my maps.

Any thoughts/feedback would be appreciated.  Thanks,
John

John Mitchell wrote:
> Hi,
>
> I'm working on assembly of a matrix for use in a "LinearProblem".
>
> I have a set of N points with 3 degrees of freedom per point.
>
> int numPoints = N;
> int ndf = 3;
> int * globalIds = myIds();
> Epetra_Comm comm = myCommunicator();
> Epetra_BlockMap myMap(-1,numPoints, globalIds, ndf, 0,comm);
>
> I have successfully used the above map to create Epetra_Vectors and do
> parallel calculations and assemblies.
>
> Now I want to create an Epetra_CrsMatrix.  However, I do not find any
> constructors with "Epetra_BlockMap"  -- there are only constructors with
> Epetra_Map?
>
> Does that mean I have to create another map that has 3 times the number
> of entries in it?  Or is there some other approach?  I do notice that
> there is a constructor using Epetra_CrsGraph.  Is that the route that I
> need to take?
>
> As with the Epetra_Vector, it would be really nice to simply use the
> Epetra_BlockMap for Epetra_CrsMatrix since it has all the information
> embedded in it.  But if the Epetra_CrsGraph works that is fine too as it
> uses the identical constructor except that it take an Epetra_BlockMap.
>
> Thanks,
> John
>
>
>
>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>

_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20100315/c1da2aa5/attachment.html 


More information about the Trilinos-Users mailing list