|
dune-istl 2.11
|
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<B>::field_type>>::str()<<" general"<<std::endl;
662 inline std::istream& operator>>(std::istream& is, [[maybe_unused]] NumericWrapper<PatternDummy>& num)
730 static_assert(IsNumber<T>::value && brows==1 && bcols==1, "Only scalar entries are expected here!");
986 DUNE_THROW(MatrixMarketFormatError, "cols does not match the number of lanes in the field_type!");
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:119
void readMatrixMarket(Dune::BlockVector< T, A > &vector, std::istream &istr)
Reads a BlockVector from a matrix market file.
Definition matrixmarket.hh:973
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:1194
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:1312
std::size_t countEntries(const BlockVector< T, A > &vector)
Definition matrixmarket.hh:1119
void writeMatrixMarket(const V &vector, std::ostream &ostr, const std::integral_constant< int, 0 > &)
Definition matrixmarket.hh:1132
void mm_print_vector_entry(const V &entry, std::ostream &ostr, const std::integral_constant< int, 1 > &, size_t lane)
Definition matrixmarket.hh:1092
void mm_read_vector_entries(Dune::BlockVector< T, A > &vector, std::size_t size, std::istream &istr, size_t lane)
Definition matrixmarket.hh:943
void mm_read_header(std::size_t &rows, std::size_t &cols, MatrixMarketImpl::MMHeader &header, std::istream &istr, bool isVector)
Definition matrixmarket.hh:914
void mm_print_entry(const B &entry, std::size_t rowidx, std::size_t colidx, std::ostream &ostr)
Definition matrixmarket.hh:1073
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:590
bool operator<(const IndexData< T > &i1, const IndexData< T > &i2)
LessThan operator.
Definition matrixmarket.hh:673
bool readMatrixMarketBanner(std::istream &file, MMHeader &mmHeader)
Definition matrixmarket.hh:396
void readSparseEntries(Dune::BCRSMatrix< T, A > &matrix, std::istream &file, std::size_t entries, const MMHeader &mmHeader, const D &)
Definition matrixmarket.hh:808
std::istream & operator>>(std::istream &is, NumericWrapper< T > &num)
Definition matrixmarket.hh:657
void skipComments(std::istream &file)
Definition matrixmarket.hh:382
std::enable_if_t<!is_complex< T >::value, T > conj(const T &r)
Definition matrixmarket.hh:776
std::tuple< std::string, std::string > splitFilename(const std::string &filename)
Definition matrixmarket.hh:895
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:1103
size_type M() const
number of columns (counted in blocks)
Definition bcrsmatrix.hh:2010
CreateIterator createbegin()
get initial create iterator
Definition bcrsmatrix.hh:1097
size_type N() const
number of rows (counted in blocks)
Definition bcrsmatrix.hh:2004
void setBuildMode(BuildMode bm)
Sets the build mode of the matrix.
Definition bcrsmatrix.hh:831
void setSize(size_type rows, size_type columns, size_type nnz=0)
Set the size of the matrix.
Definition bcrsmatrix.hh:859
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)
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
Metaprogram for writing the ISTL block structure header.
Definition matrixmarket.hh:268
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:276
BlockVector< T, A > M
Definition matrixmarket.hh:273
BlockVector< FieldVector< T, i >, A > M
Definition matrixmarket.hh:286
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:288
BCRSMatrix< T, A > M
Definition matrixmarket.hh:298
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:301
BCRSMatrix< FieldMatrix< T, i, j >, A > M
Definition matrixmarket.hh:311
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:313
FieldMatrix< T, i, j > M
Definition matrixmarket.hh:324
static void print(std::ostream &, const M &)
Definition matrixmarket.hh:326
static void print(std::ostream &, const M &)
Definition matrixmarket.hh:335
FieldVector< T, i > M
Definition matrixmarket.hh:333
Definition matrixmarket.hh:349
Definition matrixmarket.hh:621
a wrapper class of numeric values.
Definition matrixmarket.hh:638
Utility class for marking the pattern type of the MatrixMarket matrices.
Definition matrixmarket.hh:650
Functor to the data values of the matrix.
Definition matrixmarket.hh:720
void operator()(const std::vector< std::set< IndexData< D > > > &rows, BCRSMatrix< T > &matrix)
Sets the matrix values.
Definition matrixmarket.hh:727
void operator()(const std::vector< std::set< IndexData< D > > > &rows, BCRSMatrix< FieldMatrix< T, brows, bcols > > &matrix)
Sets the matrix values.
Definition matrixmarket.hh:745
void operator()(const std::vector< std::set< IndexData< PatternDummy > > > &, M &)
Definition matrixmarket.hh:766
Definition matrixmarket.hh:771
Definition matrixmarket.hh:787
Definition matrixmarket.hh:911
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