|
dune-istl 2.8.0
|
Loading...
Searching...
No Matches
matrixmarket.hh
Go to the documentation of this file.
91 };
107 };
123 };
139 };
155 };
180 os<<mm_numeric_type<Simd::Scalar<typename Imp::BlockTraits<T>::field_type>>::str()<<" general"<<std::endl;
190 os<<mm_numeric_type<Simd::Scalar<typename Imp::BlockTraits<B>::field_type>>::str()<<" general"<<std::endl;
617 inline std::istream& operator>>(std::istream& is, [[maybe_unused]] NumericWrapper<PatternDummy>& num)
685 static_assert(IsNumber<T>::value && brows==1 && bcols==1, "Only scalar entries are expected here!");
927 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:117
void readMatrixMarket(Dune::BlockVector< T, A > &vector, std::istream &istr)
Reads a BlockVector from a matrix market file.
Definition matrixmarket.hh:914
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:1135
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:1222
std::size_t countEntries(const BlockVector< T, A > &vector)
Definition matrixmarket.hh:1060
void writeMatrixMarket(const V &vector, std::ostream &ostr, const std::integral_constant< int, 0 > &)
Definition matrixmarket.hh:1073
void mm_print_vector_entry(const V &entry, std::ostream &ostr, const std::integral_constant< int, 1 > &, size_t lane)
Definition matrixmarket.hh:1033
void mm_read_vector_entries(Dune::BlockVector< T, A > &vector, std::size_t size, std::istream &istr, size_t lane)
Definition matrixmarket.hh:884
void mm_read_header(std::size_t &rows, std::size_t &cols, MatrixMarketImpl::MMHeader &header, std::istream &istr, bool isVector)
Definition matrixmarket.hh:855
void mm_print_entry(const B &entry, std::size_t rowidx, std::size_t colidx, std::ostream &ostr)
Definition matrixmarket.hh:1014
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:545
bool operator<(const IndexData< T > &i1, const IndexData< T > &i2)
LessThan operator.
Definition matrixmarket.hh:628
bool readMatrixMarketBanner(std::istream &file, MMHeader &mmHeader)
Definition matrixmarket.hh:351
void readSparseEntries(Dune::BCRSMatrix< T, A > &matrix, std::istream &file, std::size_t entries, const MMHeader &mmHeader, const D &)
Definition matrixmarket.hh:763
std::istream & operator>>(std::istream &is, NumericWrapper< T > &num)
Definition matrixmarket.hh:612
void skipComments(std::istream &file)
Definition matrixmarket.hh:337
std::enable_if_t<!is_complex< T >::value, T > conj(const T &r)
Definition matrixmarket.hh:731
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)
const std::set< int > & getNeighbours() const
void setNeighbours(const C &neighbours)
CreateIterator createend()
get create iterator pointing to one after the last block
Definition bcrsmatrix.hh:1101
size_type M() const
number of columns (counted in blocks)
Definition bcrsmatrix.hh:1976
CreateIterator createbegin()
get initial create iterator
Definition bcrsmatrix.hh:1095
size_type N() const
number of rows (counted in blocks)
Definition bcrsmatrix.hh:1970
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
typename Imp::BlockTraits< B >::field_type field_type
export the type representing the field
Definition bvector.hh:399
Helper metaprogram to get the matrix market string representation of the numeric type.
Definition matrixmarket.hh:74
@ is_numeric
Whether T is a supported numeric type.
Definition matrixmarket.hh:79
static std::string str()
Definition matrixmarket.hh:93
static std::string str()
Definition matrixmarket.hh:109
static std::string str()
Definition matrixmarket.hh:125
static std::string str()
Definition matrixmarket.hh:141
static std::string str()
Definition matrixmarket.hh:157
Meta program to write the correct Matrix Market header.
Definition matrixmarket.hh:172
static void print(std::ostream &os)
Definition matrixmarket.hh:177
static void print(std::ostream &os)
Definition matrixmarket.hh:187
static void print(std::ostream &os)
Definition matrixmarket.hh:197
static void print(std::ostream &os)
Definition matrixmarket.hh:207
Metaprogram for writing the ISTL block structure header.
Definition matrixmarket.hh:223
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:231
BlockVector< T, A > M
Definition matrixmarket.hh:228
BlockVector< FieldVector< T, i >, A > M
Definition matrixmarket.hh:241
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:243
BCRSMatrix< T, A > M
Definition matrixmarket.hh:253
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:256
BCRSMatrix< FieldMatrix< T, i, j >, A > M
Definition matrixmarket.hh:266
static void print(std::ostream &os, const M &)
Definition matrixmarket.hh:268
static void print(std::ostream &os, const M &m)
Definition matrixmarket.hh:281
FieldMatrix< T, i, j > M
Definition matrixmarket.hh:279
static void print(std::ostream &os, const M &m)
Definition matrixmarket.hh:290
FieldVector< T, i > M
Definition matrixmarket.hh:288
Definition matrixmarket.hh:304
Definition matrixmarket.hh:576
a wrapper class of numeric values.
Definition matrixmarket.hh:593
Utility class for marking the pattern type of the MatrixMarket matrices.
Definition matrixmarket.hh:605
Functor to the data values of the matrix.
Definition matrixmarket.hh:675
void operator()(const std::vector< std::set< IndexData< D > > > &rows, BCRSMatrix< T > &matrix)
Sets the matrix values.
Definition matrixmarket.hh:682
void operator()(const std::vector< std::set< IndexData< D > > > &rows, BCRSMatrix< FieldMatrix< T, brows, bcols > > &matrix)
Sets the matrix values.
Definition matrixmarket.hh:700
void operator()(const std::vector< std::set< IndexData< PatternDummy > > > &rows, M &matrix)
Definition matrixmarket.hh:721
Definition matrixmarket.hh:726
Definition matrixmarket.hh:742
Definition matrixmarket.hh:852
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 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 str(T... args)
T tie(T... args)
T transform(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8