io.hh File Reference
Detailed Description
Some generic functions for pretty printing vectors and matrices.
#include <math.h>
#include <complex>
#include <ios>
#include <iomanip>
#include <fstream>
#include <string>
#include "istlexception.hh"
#include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh>
#include "bcrsmatrix.hh"
Go to the source code of this file.
Namespaces | |
namespace | Dune |
Functions | |
void | Dune::fill_row (std::ostream &s, int m, int width, int precision) |
print a row of zeros for a non-existing block | |
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) |
print one row of a matrix | |
template<class K, int n, int m> | |
void | Dune::print_row (std::ostream &s, const FieldMatrix< K, n, m > &A, typename FieldMatrix< K, n, m >::size_type I, typename FieldMatrix< K, n, m >::size_type J, typename FieldMatrix< K, n, m >::size_type therow, int width, int precision) |
print one row of a matrix, specialization for FieldMatrix | |
template<class K> | |
void | Dune::print_row (std::ostream &s, const FieldMatrix< K, 1, 1 > &A, typename FieldMatrix< K, 1, 1 >::size_type I, typename FieldMatrix< K, 1, 1 >::size_type J, typename FieldMatrix< K, 1, 1 >::size_type therow, int width, int precision) |
print one row of a matrix, specialization for FieldMatrix<K,1,1> | |
template<class M> | |
void | Dune::printmatrix (std::ostream &s, const M &A, std::string title, std::string rowtext, int width=10, int precision=2) |
Prints a generic block matrix. | |
template<class B, int n, int m, class A> | |
void | Dune::printSparseMatrix (std::ostream &s, const BCRSMatrix< FieldMatrix< B, n, m >, A > &mat, std::string title, std::string rowtext, int width=3, int precision=2) |
Prints a BCRSMatrix with fixed sized blocks. | |
template<class FieldType, int rows, int cols> | |
void | Dune::writeMatrixToMatlabHelper (const FieldMatrix< FieldType, rows, cols > &matrix, int rowOffset, int colOffset, std::ostream &s) |
Helper method for the writeMatrixToMatlab routine. | |
template<class MatrixType> | |
void | Dune::writeMatrixToMatlab (const MatrixType &matrix, const std::string &filename) |
Writes sparse matrix in a Matlab-readable format. |