|
dune-istl 2.12-git
|
Loading...
Searching...
No Matches
matrixmarket.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
84 };
100 };
116 };
132 };
184 };
200 };
225 os<<mm_numeric_type<Simd::Scalar<typename Imp::BlockTraits<T>::field_type>>::str()<<" general"<<std::endl;
235 os<<mm_numeric_type<Simd::Scalar<typename Imp::BlockTraits<T>::field_type>>::str()<<" general"<<std::endl;
245 os<<mm_numeric_type<Simd::Scalar<typename Imp::BlockTraits<B>::field_type>>::str()<<" general"<<std::endl;
697 inline std::istream& operator>>(std::istream& is, [[maybe_unused]] NumericWrapper<PatternDummy>& num)
765 static_assert(IsNumber<T>::value && brows==1 && bcols==1, "Only scalar entries are expected here!");
953 DUNE_THROW(Dune::NotImplemented, "Reading of Experimental::BCRSMatrix is not implemented yet!");
1047 DUNE_THROW(MatrixMarketFormatError, "cols does not match the number of lanes in the field_type!");
1123 readSparseEntries(matrix, istr, entries, header, NumericWrapper<typename Matrix::field_type>());
Some handy generic functions for ISTL matrices.
This file implements a vector space as a tensor product of a given vector space. The number of compon...
Implementation of the BCRSMatrix class.
Classes providing communication interfaces for overlapping Schwarz methods.
auto countNonZeros(const M &, typename std::enable_if_t< Dune::IsNumber< M >::value > *sfinae=nullptr)
Get the number of nonzero fields in the matrix.
Definition matrixutils.hh:129
void readMatrixMarket(Dune::BlockVector< T, A > &vector, std::istream &istr)
Reads a BlockVector from a matrix market file.
Definition matrixmarket.hh:1034
void storeMatrixMarket(const M &matrix, std::string filename, int prec=default_precision)
Stores a parallel matrix/vector in matrix market format in a file.
Definition matrixmarket.hh:1277
void loadMatrixMarket(M &matrix, const std::string &filename, OwnerOverlapCopyCommunication< G, L > &comm, bool readIndices=true)
Load a parallel matrix/vector stored in matrix market format.
Definition matrixmarket.hh:1395
std::size_t countEntries(const BlockVector< T, A > &vector)
Definition matrixmarket.hh:1202
void writeMatrixMarket(const V &vector, std::ostream &ostr, const std::integral_constant< int, 0 > &)
Definition matrixmarket.hh:1215
void mm_print_vector_entry(const V &entry, std::ostream &ostr, const std::integral_constant< int, 1 > &, size_t lane)
Definition matrixmarket.hh:1175
void mm_read_vector_entries(Dune::BlockVector< T, A > &vector, std::size_t size, std::istream &istr, size_t lane)
Definition matrixmarket.hh:1004
void mm_read_header(std::size_t &rows, std::size_t &cols, MatrixMarketImpl::MMHeader &header, std::istream &istr, bool isVector)
Definition matrixmarket.hh:975
void mm_print_entry(const B &entry, std::size_t rowidx, std::size_t colidx, std::ostream &ostr)
Definition matrixmarket.hh:1156
STL namespace.
std::tuple< std::size_t, std::size_t, std::size_t > calculateNNZ(std::size_t rows, std::size_t cols, std::size_t entries, const MMHeader &header)
Definition matrixmarket.hh:625
bool operator<(const IndexData< T > &i1, const IndexData< T > &i2)
LessThan operator.
Definition matrixmarket.hh:708
bool readMatrixMarketBanner(std::istream &file, MMHeader &mmHeader)
Definition matrixmarket.hh:431
void readSparseEntries(Dune::BCRSMatrix< T, A > &matrix, std::istream &file, std::size_t entries, const MMHeader &mmHeader, const D &)
Definition matrixmarket.hh:861
std::istream & operator>>(std::istream &is, NumericWrapper< T > &num)
Definition matrixmarket.hh:692
void skipComments(std::istream &file)
Definition matrixmarket.hh:417
std::enable_if_t<!is_complex< T >::value, T > conj(const T &r)
Definition matrixmarket.hh:811
std::tuple< std::string, std::string > splitFilename(const std::string &filename)
Definition matrixmarket.hh:956
int size() const
iterator begin()
static constexpr size_type M()
#define DUNE_THROW(E,...)
iterator begin()
iterator end()
int neighbours() const
decltype(auto) lane(std::size_t l, V &&v)
typename Overloads::ScalarType< std::decay_t< V > >::type Scalar
DVerbType dverb
T lane(std::size_t l, const T &v)
CreateIterator createend()
get create iterator pointing to one after the last block
Definition bcrsmatrix.hh:1107
size_type M() const
number of columns (counted in blocks)
Definition bcrsmatrix.hh:2014
CreateIterator createbegin()
get initial create iterator
Definition bcrsmatrix.hh:1101
size_type N() const
number of rows (counted in blocks)
Definition bcrsmatrix.hh:2008
int rank() const
typename Imp::BlockTraits< B >::field_type field_type
export the type representing the field
Definition bvector.hh:398
const std::set< int > & getNeighbours() const
void setNeighbours(const C &neighbours)
Block compressed row storage matrix.
Definition experimental/bcrsmatrix.hh:82
Helper metaprogram to get the matrix market string representation of the numeric type.
Definition matrixmarket.hh:78
@ is_numeric
Whether T is a supported numeric type.
Definition matrixmarket.hh:83
static std::string str()
Definition matrixmarket.hh:102
static std::string str()
Definition matrixmarket.hh:118
static std::string str()
Definition matrixmarket.hh:134
static std::string str()
Definition matrixmarket.hh:186
static std::string str()
Definition matrixmarket.hh:202
Meta program to write the correct Matrix Market header.
Definition matrixmarket.hh:217
static void print(std::ostream &os)
Definition matrixmarket.hh:222
static void print(std::ostream &os)
Definition matrixmarket.hh:232
static void print(std::ostream &os)
Definition matrixmarket.hh:242
static void print(std::ostream &os)
Definition matrixmarket.hh:252
static void print(std::ostream &os)
Definition matrixmarket.hh:262
Metaprogram for writing the ISTL block structure header.
Definition matrixmarket.hh:278
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:286
BlockVector< T, A > M
Definition matrixmarket.hh:283
BlockVector< FieldVector< T, i >, A > M
Definition matrixmarket.hh:296
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:298
BCRSMatrix< T, A > M
Definition matrixmarket.hh:308
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:311
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:324
Experimental::BCRSMatrix< T, P, A > M
Definition matrixmarket.hh:321
BCRSMatrix< FieldMatrix< T, i, j >, A > M
Definition matrixmarket.hh:334
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:336
Experimental::BCRSMatrix< FieldMatrix< T, i, j >, P, A > M
Definition matrixmarket.hh:346
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:348
FieldMatrix< T, i, j > M
Definition matrixmarket.hh:359
static void print(std::ostream &, const M &)
Definition matrixmarket.hh:361
static void print(std::ostream &, const M &)
Definition matrixmarket.hh:370
FieldVector< T, i > M
Definition matrixmarket.hh:368
Definition matrixmarket.hh:384
Definition matrixmarket.hh:656
a wrapper class of numeric values.
Definition matrixmarket.hh:673
Utility class for marking the pattern type of the MatrixMarket matrices.
Definition matrixmarket.hh:685
Functor to the data values of the matrix.
Definition matrixmarket.hh:755
void operator()(const std::vector< std::set< IndexData< D > > > &rows, BCRSMatrix< T > &matrix)
Sets the matrix values.
Definition matrixmarket.hh:762
void operator()(const std::vector< std::set< IndexData< D > > > &rows, BCRSMatrix< FieldMatrix< T, brows, bcols > > &matrix)
Sets the matrix values.
Definition matrixmarket.hh:780
void operator()(const std::vector< std::set< IndexData< PatternDummy > > > &, M &)
Definition matrixmarket.hh:801
Definition matrixmarket.hh:806
Definition matrixmarket.hh:822
Definition matrixmarket.hh:972
T begin(T... args)
T c_str(T... args)
T clear(T... args)
T close(T... args)
T empty(T... args)
T end(T... args)
T endl(T... args)
T eof(T... args)
T find_last_of(T... args)
T get(T... args)
T ignore(T... args)
T insert(T... args)
T make_tuple(T... args)
T open(T... args)
T peek(T... args)
T precision(T... args)
T seekg(T... args)
T setf(T... args)
T size(T... args)
T substr(T... args)
T tie(T... args)
T to_string(T... args)
T transform(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8