Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Tpetra_MatrixIO_decl.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Tpetra: Templated Linear Algebra Services Package
4//
5// Copyright 2008 NTESS and the Tpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TPETRA_MATRIX_IO_DECL
11#define TPETRA_MATRIX_IO_DECL
12
19
20#include <Tpetra_CrsMatrix.hpp>
21
22namespace Tpetra {
23 namespace Utils {
24
25 bool parseIfmt (Teuchos::ArrayRCP<char> fmt, int &perline, int &width);
26 bool parseRfmt (Teuchos::ArrayRCP<char> fmt, int &perline, int &width, int &prec, char &flag);
27 void readHBInfo (const std::string &filename, int &M, int &N, int &nz, Teuchos::ArrayRCP<char> &Type, int &Nrhs);
28
29 void
30 readHBHeader (std::ifstream &in_file, Teuchos::ArrayRCP<char> &Title,
31 Teuchos::ArrayRCP<char> &Key, Teuchos::ArrayRCP<char> &Type,
32 int &Nrow, int &Ncol, int &Nnzero, int &Nrhs,
33 Teuchos::ArrayRCP<char> &Ptrfmt,
34 Teuchos::ArrayRCP<char> &Indfmt,
35 Teuchos::ArrayRCP<char> &Valfmt,
36 Teuchos::ArrayRCP<char> &Rhsfmt,
37 int &Ptrcrd, int &Indcrd, int &Valcrd, int &Rhscrd,
38 Teuchos::ArrayRCP<char> &Rhstype);
39
40 void
41 readHBMatDouble (const std::string &filename, int &M, int &N, int &nonzeros,
42 std::string &Type, Teuchos::ArrayRCP<int> &colptr,
43 Teuchos::ArrayRCP<int> &rowind,
44 Teuchos::ArrayRCP<double> &val);
45
46
47
48 template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
49 void
50 readHBMatrix (const std::string &filename,
51 const Teuchos::RCP<const Teuchos::Comm<int> > &comm,
52 Teuchos::RCP<Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &A,
53 Teuchos::RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> > rowMap = Teuchos::null,
54 const Teuchos::RCP<Teuchos::ParameterList> &params = Teuchos::null);
55
56 } // end of Tpetra::Utils namespace
57} // end of Tpetra namespace
58
59#endif
Namespace Tpetra contains the class and methods constituting the Tpetra library.