dune-istl  2.7.1
About: dune-istl - DUNE (Distributed and Unified Numerics Environment) is a modular toolbox for solving partial differential equations (PDEs) with grid-based methods: DUNE Iterative Solver Template Library.
  Fossies Dox: dune-istl-2.7.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Provides classes for reading and writing MatrixMarket Files with an extension for parallel matrices. More...

#include <algorithm>
#include <complex>
#include <cstddef>
#include <fstream>
#include <ios>
#include <iostream>
#include <istream>
#include <limits>
#include <ostream>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <type_traits>
#include <vector>
#include <dune/common/exceptions.hh>
#include <dune/common/fmatrix.hh>
#include <dune/common/fvector.hh>
#include <dune/common/unused.hh>
#include <dune/common/hybridutilities.hh>
#include <dune/common/stdstreams.hh>
#include <dune/istl/bcrsmatrix.hh>
#include <dune/istl/bvector.hh>
#include <dune/istl/matrixutils.hh>
#include <dune/istl/owneroverlapcopy.hh>
Include dependency graph for matrixmarket.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Dune::MatrixMarketImpl::mm_numeric_type< T >
 Helper metaprogram to get the matrix market string representation of the numeric type. More...
 
struct  Dune::MatrixMarketImpl::mm_numeric_type< int >
 
struct  Dune::MatrixMarketImpl::mm_numeric_type< double >
 
struct  Dune::MatrixMarketImpl::mm_numeric_type< float >
 
struct  Dune::MatrixMarketImpl::mm_numeric_type< std::complex< double > >
 
struct  Dune::MatrixMarketImpl::mm_numeric_type< std::complex< float > >
 
struct  Dune::MatrixMarketImpl::mm_header_printer< BCRSMatrix< T, A > >
 
struct  Dune::MatrixMarketImpl::mm_header_printer< BlockVector< B, A > >
 
struct  Dune::MatrixMarketImpl::mm_header_printer< FieldVector< T, j > >
 
struct  Dune::MatrixMarketImpl::mm_header_printer< FieldMatrix< T, i, j > >
 
struct  Dune::MatrixMarketImpl::mm_block_structure_header< BlockVector< T, A > >
 
struct  Dune::MatrixMarketImpl::mm_block_structure_header< BlockVector< FieldVector< T, i >, A > >
 
struct  Dune::MatrixMarketImpl::mm_block_structure_header< BCRSMatrix< T, A > >
 
struct  Dune::MatrixMarketImpl::mm_block_structure_header< BCRSMatrix< FieldMatrix< T, i, j >, A > >
 
struct  Dune::MatrixMarketImpl::mm_block_structure_header< FieldMatrix< T, i, j > >
 
struct  Dune::MatrixMarketImpl::mm_block_structure_header< FieldVector< T, i > >
 
struct  Dune::MatrixMarketImpl::MMHeader
 
struct  Dune::MatrixMarketImpl::IndexData< T >
 
struct  Dune::MatrixMarketImpl::NumericWrapper< T >
 a wrapper class of numeric values. More...
 
struct  Dune::MatrixMarketImpl::PatternDummy
 Utility class for marking the pattern type of the MatrixMarket matrices. More...
 
struct  Dune::MatrixMarketImpl::NumericWrapper< PatternDummy >
 
struct  Dune::MatrixMarketImpl::MatrixValuesSetter< D, brows, bcols >
 Functor to the data values of the matrix. More...
 
struct  Dune::MatrixMarketImpl::MatrixValuesSetter< PatternDummy, brows, bcols >
 
struct  Dune::MatrixMarketImpl::is_complex< T >
 
struct  Dune::MatrixMarketImpl::is_complex< std::complex< T > >
 
struct  Dune::MatrixMarketImpl::mm_multipliers< M >
 
struct  Dune::MatrixMarketImpl::mm_multipliers< BCRSMatrix< B, A > >
 
struct  Dune::MatrixMarketImpl::mm_multipliers< BCRSMatrix< FieldMatrix< B, i, j >, A > >
 
class  Dune::MatrixMarketFormatError
 

Namespaces

 Dune
 
 Dune::MatrixMarketImpl
 

Enumerations

enum  Dune::MatrixMarketImpl::LineType { Dune::MatrixMarketImpl::MM_HEADER , Dune::MatrixMarketImpl::MM_ISTLSTRUCT , Dune::MatrixMarketImpl::DATA }
 
enum  { Dune::MatrixMarketImpl::MM_MAX_LINE_LENGTH =1025 }
 
enum  Dune::MatrixMarketImpl::MM_TYPE { Dune::MatrixMarketImpl::coordinate_type , Dune::MatrixMarketImpl::array_type , Dune::MatrixMarketImpl::unknown_type }
 
enum  Dune::MatrixMarketImpl::MM_CTYPE {
  Dune::MatrixMarketImpl::integer_type , Dune::MatrixMarketImpl::double_type , Dune::MatrixMarketImpl::complex_type , Dune::MatrixMarketImpl::pattern ,
  Dune::MatrixMarketImpl::unknown_ctype
}
 
enum  Dune::MatrixMarketImpl::MM_STRUCTURE {
  Dune::MatrixMarketImpl::general , Dune::MatrixMarketImpl::symmetric , Dune::MatrixMarketImpl::skew_symmetric , Dune::MatrixMarketImpl::hermitian ,
  Dune::MatrixMarketImpl::unknown_structure
}
 

Functions

bool Dune::MatrixMarketImpl::lineFeed (std::istream &file)
 
void Dune::MatrixMarketImpl::skipComments (std::istream &file)
 
bool Dune::MatrixMarketImpl::readMatrixMarketBanner (std::istream &file, MMHeader &mmHeader)
 
template<std::size_t brows, std::size_t bcols>
std::tuple< std::size_t, std::size_t, std::size_t > Dune::MatrixMarketImpl::calculateNNZ (std::size_t rows, std::size_t cols, std::size_t entries, const MMHeader &header)
 
template<typename T >
std::istream & Dune::MatrixMarketImpl::operator>> (std::istream &is, NumericWrapper< T > &num)
 
std::istream & Dune::MatrixMarketImpl::operator>> (std::istream &is, NumericWrapper< PatternDummy > &num)
 
template<typename T >
bool Dune::MatrixMarketImpl::operator< (const IndexData< T > &i1, const IndexData< T > &i2)
 LessThan operator. More...
 
template<typename T >
std::istream & Dune::MatrixMarketImpl::operator>> (std::istream &is, IndexData< T > &data)
 Read IndexData from a stream. More...
 
template<typename T >
std::istream & Dune::MatrixMarketImpl::operator>> (std::istream &is, IndexData< NumericWrapper< std::complex< T >>> &data)
 Read IndexData from a stream. Specialization for std::complex. More...
 
template<class T >
std::enable_if_t<!is_complex< T >::value, T > Dune::MatrixMarketImpl::conj (const T &r)
 
template<class T >
std::enable_if_t< is_complex< T >::value, T > Dune::MatrixMarketImpl::conj (const T &r)
 
template<typename T , typename A , typename D >
void Dune::MatrixMarketImpl::readSparseEntries (Dune::BCRSMatrix< T, A > &matrix, std::istream &file, std::size_t entries, const MMHeader &mmHeader, const D &)
 
void Dune::mm_read_header (std::size_t &rows, std::size_t &cols, MatrixMarketImpl::MMHeader &header, std::istream &istr, bool isVector)
 
template<typename T , typename A >
void Dune::mm_read_vector_entries (Dune::BlockVector< T, A > &vector, std::size_t size, std::istream &istr)
 
template<typename T , typename A , int entries>
void Dune::mm_read_vector_entries (Dune::BlockVector< Dune::FieldVector< T, entries >, A > &vector, std::size_t size, std::istream &istr)
 
template<typename T , typename A >
void Dune::readMatrixMarket (Dune::BlockVector< T, A > &vector, std::istream &istr)
 Reads a BlockVector from a matrix market file. More...
 
template<typename T , typename A >
void Dune::readMatrixMarket (Dune::BCRSMatrix< T, A > &matrix, std::istream &istr)
 Reads a sparse matrix from a matrix market file. More...
 
template<typename B >
void Dune::mm_print_entry (const B &entry, std::size_t rowidx, std::size_t colidx, std::ostream &ostr)
 
template<typename V >
void Dune::mm_print_vector_entry (const V &entry, std::ostream &ostr, const std::integral_constant< int, 1 > &)
 
template<typename V >
void Dune::mm_print_vector_entry (const V &vector, std::ostream &ostr, const std::integral_constant< int, 0 > &)
 
template<typename T , typename A >
std::size_t Dune::countEntries (const BlockVector< T, A > &vector)
 
template<typename T , typename A , int i>
std::size_t Dune::countEntries (const BlockVector< FieldVector< T, i >, A > &vector)
 
template<typename V >
void Dune::writeMatrixMarket (const V &vector, std::ostream &ostr, const std::integral_constant< int, 0 > &)
 
template<typename M >
void Dune::writeMatrixMarket (const M &matrix, std::ostream &ostr, const std::integral_constant< int, 1 > &)
 
template<typename M >
void Dune::writeMatrixMarket (const M &matrix, std::ostream &ostr)
 writes a ISTL matrix or vector to a stream in matrix market format. More...
 
template<typename M >
void Dune::storeMatrixMarket (const M &matrix, std::string filename)
 Stores a parallel matrix/vector in matrix market format in a file. More...
 
template<typename M >
void Dune::loadMatrixMarket (M &matrix, const std::string &filename)
 Load a matrix/vector stored in matrix market format. More...
 

Detailed Description

Provides classes for reading and writing MatrixMarket Files with an extension for parallel matrices.

Author
Markus Blatt

Definition in file matrixmarket.hh.