|
dune-istl 2.9.0
|
Loading...
Searching...
No Matches
matrixmarket.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
93 };
109 };
125 };
141 };
157 };
182 os<<mm_numeric_type<Simd::Scalar<typename Imp::BlockTraits<T>::field_type>>::str()<<" general"<<std::endl;
192 os<<mm_numeric_type<Simd::Scalar<typename Imp::BlockTraits<B>::field_type>>::str()<<" general"<<std::endl;
619 inline std::istream& operator>>(std::istream& is, [[maybe_unused]] NumericWrapper<PatternDummy>& num)
687 static_assert(IsNumber<T>::value && brows==1 && bcols==1, "Only scalar entries are expected here!");
943 DUNE_THROW(MatrixMarketFormatError, "cols does not match the number of lanes in the 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:119
void readMatrixMarket(Dune::BlockVector< T, A > &vector, std::istream &istr)
Reads a BlockVector from a matrix market file.
Definition matrixmarket.hh:930
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:1151
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:1269
std::size_t countEntries(const BlockVector< T, A > &vector)
Definition matrixmarket.hh:1076
void writeMatrixMarket(const V &vector, std::ostream &ostr, const std::integral_constant< int, 0 > &)
Definition matrixmarket.hh:1089
void mm_print_vector_entry(const V &entry, std::ostream &ostr, const std::integral_constant< int, 1 > &, size_t lane)
Definition matrixmarket.hh:1049
void mm_read_vector_entries(Dune::BlockVector< T, A > &vector, std::size_t size, std::istream &istr, size_t lane)
Definition matrixmarket.hh:900
void mm_read_header(std::size_t &rows, std::size_t &cols, MatrixMarketImpl::MMHeader &header, std::istream &istr, bool isVector)
Definition matrixmarket.hh:871
void mm_print_entry(const B &entry, std::size_t rowidx, std::size_t colidx, std::ostream &ostr)
Definition matrixmarket.hh:1030
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:547
bool operator<(const IndexData< T > &i1, const IndexData< T > &i2)
LessThan operator.
Definition matrixmarket.hh:630
bool readMatrixMarketBanner(std::istream &file, MMHeader &mmHeader)
Definition matrixmarket.hh:353
void readSparseEntries(Dune::BCRSMatrix< T, A > &matrix, std::istream &file, std::size_t entries, const MMHeader &mmHeader, const D &)
Definition matrixmarket.hh:765
std::istream & operator>>(std::istream &is, NumericWrapper< T > &num)
Definition matrixmarket.hh:614
void skipComments(std::istream &file)
Definition matrixmarket.hh:339
std::enable_if_t<!is_complex< T >::value, T > conj(const T &r)
Definition matrixmarket.hh:733
std::tuple< std::string, std::string > splitFilename(const std::string &filename)
Definition matrixmarket.hh:852
int size() const
iterator begin()
static constexpr size_type M()
#define DUNE_THROW(E, m)
iterator begin()
iterator end()
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)
int rank() const
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:1978
CreateIterator createbegin()
get initial create iterator
Definition bcrsmatrix.hh:1097
size_type N() const
number of rows (counted in blocks)
Definition bcrsmatrix.hh:1972
void setBuildMode(BuildMode bm)
Sets the build mode of the matrix.
Definition bcrsmatrix.hh:833
void setSize(size_type rows, size_type columns, size_type nnz=0)
Set the size of the matrix.
Definition bcrsmatrix.hh:861
const std::set< int > & getNeighbours() const
void setNeighbours(const C &neighbours)
typename Imp::BlockTraits< B >::field_type field_type
export the type representing the field
Definition bvector.hh:401
Helper metaprogram to get the matrix market string representation of the numeric type.
Definition matrixmarket.hh:76
@ is_numeric
Whether T is a supported numeric type.
Definition matrixmarket.hh:81
static std::string str()
Definition matrixmarket.hh:95
static std::string str()
Definition matrixmarket.hh:111
static std::string str()
Definition matrixmarket.hh:127
static std::string str()
Definition matrixmarket.hh:143
static std::string str()
Definition matrixmarket.hh:159
Meta program to write the correct Matrix Market header.
Definition matrixmarket.hh:174
static void print(std::ostream &os)
Definition matrixmarket.hh:179
static void print(std::ostream &os)
Definition matrixmarket.hh:189
static void print(std::ostream &os)
Definition matrixmarket.hh:199
static void print(std::ostream &os)
Definition matrixmarket.hh:209
Metaprogram for writing the ISTL block structure header.
Definition matrixmarket.hh:225
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:233
BlockVector< T, A > M
Definition matrixmarket.hh:230
BlockVector< FieldVector< T, i >, A > M
Definition matrixmarket.hh:243
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:245
BCRSMatrix< T, A > M
Definition matrixmarket.hh:255
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:258
BCRSMatrix< FieldMatrix< T, i, j >, A > M
Definition matrixmarket.hh:268
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:270
static void print(std::ostream &os, const M &m)
Definition matrixmarket.hh:283
FieldMatrix< T, i, j > M
Definition matrixmarket.hh:281
static void print(std::ostream &os, const M &m)
Definition matrixmarket.hh:292
FieldVector< T, i > M
Definition matrixmarket.hh:290
Definition matrixmarket.hh:306
Definition matrixmarket.hh:578
a wrapper class of numeric values.
Definition matrixmarket.hh:595
Utility class for marking the pattern type of the MatrixMarket matrices.
Definition matrixmarket.hh:607
Functor to the data values of the matrix.
Definition matrixmarket.hh:677
void operator()(const std::vector< std::set< IndexData< D > > > &rows, BCRSMatrix< T > &matrix)
Sets the matrix values.
Definition matrixmarket.hh:684
void operator()(const std::vector< std::set< IndexData< D > > > &rows, BCRSMatrix< FieldMatrix< T, brows, bcols > > &matrix)
Sets the matrix values.
Definition matrixmarket.hh:702
void operator()(const std::vector< std::set< IndexData< PatternDummy > > > &rows, M &matrix)
Definition matrixmarket.hh:723
Definition matrixmarket.hh:728
Definition matrixmarket.hh:744
Definition matrixmarket.hh:868
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