[Trilinos-Users] RCP and loading CrsGraph from HDF5 file

Davood Ansari david.ansari at gmail.com
Fri Sep 26 01:44:42 MDT 2008


Hi all

This should seem a bit dumb.
I am not good at OOp so I put it like this.
In the following piece, I had to use the type cast - (Epetra_Map*&) - or it
would not compile.
My intention is to load a EpetraCrsGraph and a Epetra_Map into RCP pointed
objects.
Would the following code handle the garbage collection right? Or should I
write it differently?
Kindly Advise
Davood


    Teuchos::RCP<Epetra_Map::Epetra_Map> RowMap ;
    Teuchos::RCP<Epetra_CrsGraph::Epetra_CrsGraph> CrsGraph ;

    HDF5.Open("CRSGraph.h5");
    HDF5.Read("Map", (Epetra_Map*&)RowMap) ;
    HDF5.Read("Graph", (Epetra_CrsGraph*&)CrsGraph) ;
    HDF5.Close();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080926/b321a189/attachment.html 


More information about the Trilinos-Users mailing list