Dune Core Modules (unstable)

Some generic functions for pretty printing vectors and matrices. More...

#include <cmath>
#include <complex>
#include <limits>
#include <ios>
#include <iomanip>
#include <fstream>
#include <string>
#include "matrixutils.hh"
#include "istlexception.hh"
#include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh>
#include <dune/common/hybridutilities.hh>
#include <dune/common/reservedvector.hh>
#include <dune/istl/bcrsmatrix.hh>
#include <dune/istl/blocklevel.hh>

Go to the source code of this file.

Classes

struct  Dune::DefaultSVGMatrixOptions
 Default options class to write SVG matrices. More...
 

Namespaces

 Dune
 Dune namespace.
 

Functions

template<class V >
void Dune::recursive_printvector (std::ostream &s, const V &v, std::string rowtext, int &counter, int columns, int width)
 Recursively print a vector. More...
 
template<class V >
void Dune::printvector (std::ostream &s, const V &v, std::string title, std::string rowtext, int columns=1, int width=10, int precision=2)
 Print an ISTL vector. More...
 
void Dune::fill_row (std::ostream &s, int m, int width, [[maybe_unused]] int precision)
 Print a row of zeros for a non-existing block. More...
 
template<class K >
void Dune::print_row (std::ostream &s, const K &value, [[maybe_unused]] typename FieldMatrix< K, 1, 1 >::size_type I, [[maybe_unused]] typename FieldMatrix< K, 1, 1 >::size_type J, [[maybe_unused]] typename FieldMatrix< K, 1, 1 >::size_type therow, int width, [[maybe_unused]] int precision, typename std::enable_if_t< Dune::IsNumber< K >::value > *sfinae=nullptr)
 Print one row of a matrix, specialization for number types. More...
 
template<class M >
void Dune::print_row (std::ostream &s, const M &A, typename M::size_type I, typename M::size_type J, typename M::size_type therow, int width, int precision, typename std::enable_if_t<!Dune::IsNumber< M >::value > *sfinae=nullptr)
 Print one row of a matrix. More...
 
template<class M >
void Dune::printmatrix (std::ostream &s, const M &A, std::string title, std::string rowtext, int width=10, int precision=2)
 Print a generic block matrix. More...
 
template<class A , class InnerMatrixType >
void Dune::printSparseMatrix (std::ostream &s, const BCRSMatrix< InnerMatrixType, A > &mat, std::string title, std::string rowtext, int width=3, int precision=2)
 Prints a BCRSMatrix with fixed sized blocks. More...
 
template<class FieldType >
void Dune::writeMatrixToMatlabHelper (const FieldType &value, int rowOffset, int colOffset, std::ostream &s, typename std::enable_if_t< Dune::IsNumber< FieldType >::value > *sfinae=nullptr)
 Helper method for the writeMatrixToMatlab routine. More...
 
template<class MatrixType >
void Dune::writeMatrixToMatlabHelper (const MatrixType &matrix, int externalRowOffset, int externalColOffset, std::ostream &s, typename std::enable_if_t<!Dune::IsNumber< MatrixType >::value > *sfinae=nullptr)
 Helper method for the writeMatrixToMatlab routine. More...
 
template<class MatrixType >
void Dune::writeMatrixToMatlab (const MatrixType &matrix, const std::string &filename, int outputPrecision=18)
 Writes sparse matrix in a Matlab-readable format. More...
 
template<class VectorType >
void Dune::writeVectorToMatlab (const VectorType &vector, const std::string &filename, int outputPrecision=18)
 Writes vectors in a Matlab-readable format. More...
 
template<class Mat , class SVGOptions = DefaultSVGMatrixOptions>
void Dune::writeSVGMatrix (std::ostream &out, const Mat &mat, SVGOptions opts={})
 Writes the visualization of matrix in the SVG format. More...
 
template<class Mat , class SVGOptions = DefaultSVGMatrixOptions>
void Dune::writeSVGMatrix (const Mat &mat, std::ostream &out, SVGOptions opts={})
 Writes the visualization of matrix in the SVG format. More...
 

Detailed Description

Some generic functions for pretty printing vectors and matrices.

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 23, 22:30, 2024)