Xpetra Version of the Day
|
#include <Xpetra_IO.hpp>
Public Types | |
typedef int | LocalOrdinal |
typedef int | GlobalOrdinal |
typedef EpetraNode | Node |
Static Public Member Functions | |
static const Epetra_Map & | Map2EpetraMap (const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &map) |
Helper utility to pull out the underlying Epetra objects from an Xpetra object. | |
static const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > | Map2TpetraMap (const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &map) |
Helper utility to pull out the underlying Tpetra objects from an Xpetra object. | |
static void | Write (const std::string &fileName, const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &M) |
Read/Write methods. | |
static void | Write (const std::string &fileName, const Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &vec) |
Save vector to file in Matrix Market format. | |
static void | Write (const std::string &fileName, const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op, const bool &writeAllMaps=false) |
Save matrix to file in Matrix Market format. | |
static void | Write (const std::string &fileName, const Xpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > &graph, const bool &writeAllMaps=false) |
Save CrsGraph to file in Matrix Market format. | |
static void | WriteLocal (const std::string &fileName, const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op) |
Save local parts of matrix to files in Matrix Market format. | |
static void | WriteBlockedCrsMatrix (const std::string &fileName, const Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Op, const bool &writeAllMaps=false) |
Save block matrix to one file per block in Matrix Market format. | |
static Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | Read (const std::string &fileName, Xpetra::UnderlyingLib lib, const RCP< const Teuchos::Comm< int > > &comm, bool binary=false) |
Read matrix from file in Matrix Market or binary format. | |
static Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | Read (const std::string &filename, const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > rowMap, RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > colMap=Teuchos::null, const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > domainMap=Teuchos::null, const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > rangeMap=Teuchos::null, const bool callFillComplete=true, const bool binary=false, const bool tolerant=false, const bool debug=false) |
Read matrix from file in Matrix Market or binary format. | |
static Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | ReadLocal (const std::string &filename, const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > rowMap, RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > colMap, const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > domainMap=Teuchos::null, const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > rangeMap=Teuchos::null, const bool callFillComplete=true, const bool binary=false, const bool tolerant=false, const bool debug=false) |
Read matrix from local files in Matrix Market or binary format. | |
static RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | ReadMultiVector (const std::string &fileName, const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const bool binary=false) |
static RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > | ReadMap (const std::string &fileName, Xpetra::UnderlyingLib lib, const RCP< const Teuchos::Comm< int > > &comm, const bool binary=false) |
static RCP< const Xpetra::BlockedCrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | ReadBlockedCrsMatrix (const std::string &fileName, Xpetra::UnderlyingLib lib, const RCP< const Teuchos::Comm< int > > &comm) |
Read block matrix from one file per block in Matrix Market format. | |
template<class T > | |
static std::string | toString (const T &what) |
Little helper function to convert non-string types to strings. | |
Definition at line 939 of file Xpetra_IO.hpp.
typedef int Xpetra::IO< Scalar, int, int, EpetraNode >::LocalOrdinal |
Definition at line 941 of file Xpetra_IO.hpp.
typedef int Xpetra::IO< Scalar, int, int, EpetraNode >::GlobalOrdinal |
Definition at line 942 of file Xpetra_IO.hpp.
typedef EpetraNode Xpetra::IO< Scalar, int, int, EpetraNode >::Node |
Definition at line 943 of file Xpetra_IO.hpp.
|
inlinestatic |
Helper utility to pull out the underlying Epetra objects from an Xpetra object.
Definition at line 948 of file Xpetra_IO.hpp.
|
inlinestatic |
Helper utility to pull out the underlying Tpetra objects from an Xpetra object.
Definition at line 960 of file Xpetra_IO.hpp.
|
inlinestatic |
|
inlinestatic |
Save vector to file in Matrix Market format.
Definition at line 1002 of file Xpetra_IO.hpp.
|
inlinestatic |
Save matrix to file in Matrix Market format.
Definition at line 1039 of file Xpetra_IO.hpp.
|
inlinestatic |
Save CrsGraph to file in Matrix Market format.
Definition at line 1092 of file Xpetra_IO.hpp.
|
inlinestatic |
Save local parts of matrix to files in Matrix Market format.
Definition at line 1131 of file Xpetra_IO.hpp.
|
inlinestatic |
Save block matrix to one file per block in Matrix Market format.
We write one MatrixMarket file for each block of the given BlockedCrsMatrix. The block (row,col) indicators are included into the file name, such that filename02.m indicates the block in row = 0 and col = 2, for example.
While the user can enable/disable the output of all maps of each matrix block, we always write the range and domain maps of each block as well of the full blocked operator in order to enable reconstruction of the MapExtractor objects for range and domain maps.
fileName | String to indicate file name of files to be written |
Op | BlockedCrsMatrix to be written |
writeAllMaps | Flag to control output of maps to separate files (defaults to false ) |
Definition at line 1173 of file Xpetra_IO.hpp.
|
inlinestatic |
Read matrix from file in Matrix Market or binary format.
Definition at line 1207 of file Xpetra_IO.hpp.
|
inlinestatic |
Read matrix from file in Matrix Market or binary format.
If only rowMap is specified, then it is used for the domainMap and rangeMap, as well.
Definition at line 1338 of file Xpetra_IO.hpp.
|
inlinestatic |
Read matrix from local files in Matrix Market or binary format.
The file name format is filename.SIZE.RANK, where SIZE is the size of the communicator of the rowMap and RANK is the MPI ranks of the calling process.
If only rowMap is specified, then it is used for the domainMap and rangeMap, as well.
Definition at line 1438 of file Xpetra_IO.hpp.
|
inlinestatic |
Definition at line 1584 of file Xpetra_IO.hpp.
|
inlinestatic |
Definition at line 1630 of file Xpetra_IO.hpp.
|
inlinestatic |
Read block matrix from one file per block in Matrix Market format.
We read one MatrixMarket file for each block of the desired BlockedCrsMatrix. The block (row,col) indicators are included into the file name, such that filename02.m indicates the block in row = 0 and col = 2, for example.
We also read the range and domain maps of each block as well of the full blocked operator in order to enable reconstruction of the MapExtractor objects for range and domain maps.
fileName | Indicator of file(s) to be read |
lib | Underlying type of sparse linear algebra to be used for the blocked operator |
comm | Communicator |
Definition at line 1690 of file Xpetra_IO.hpp.
|
inlinestatic |
Little helper function to convert non-string types to strings.
Definition at line 1765 of file Xpetra_IO.hpp.