From 91a7b14488546383204a370b625feba3984ed6c7 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Thu, 3 Mar 2005 21:49:29 +0000 Subject: [PATCH] make output work with deallog git-svn-id: https://svn.dealii.org/trunk@9987 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/block_matrix_array.h | 33 +++++++++++--------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/deal.II/lac/include/lac/block_matrix_array.h b/deal.II/lac/include/lac/block_matrix_array.h index cc82d90c41..e2abdd0b6b 100644 --- a/deal.II/lac/include/lac/block_matrix_array.h +++ b/deal.II/lac/include/lac/block_matrix_array.h @@ -160,7 +160,8 @@ class BlockMatrixArray : public Subscriptor * times, it will be listed with * the same number everytime. */ - void print_latex (std::ostream& out) const; + template + void print_latex (STREAM& out) const; protected: /** @@ -518,9 +519,10 @@ BlockMatrixArray::n_block_cols () const template +template inline void -BlockMatrixArray::print_latex (std::ostream& out) const +BlockMatrixArray::print_latex (STREAM& out) const { out << "\\begin{array}{" << std::string(n_block_cols(), 'c') @@ -547,23 +549,24 @@ BlockMatrixArray::print_latex (std::ostream& out) const #else std::ostrstream stream; #endif - + stream << matrix_number++; - + #ifndef HAVE_STD_STRINGSTREAM stream << std::ends; #endif x.first->second += stream.str(); } - + #ifdef HAVE_STD_STRINGSTREAM - std::ostringstream stream; + std::ostringstream stream; #else - std::ostrstream stream; + std::ostrstream stream; #endif - + if (array(m->row, m->col) != "" && m->prefix >= 0) + stream << "+"; if (m->prefix != 1.) - stream << " " << m->prefix << 'x'; + stream << m->prefix << 'x'; stream << matrix_names.find(m->matrix)->second; // stream << '(' << m->matrix << ')'; if (m->transpose) @@ -572,15 +575,17 @@ BlockMatrixArray::print_latex (std::ostream& out) const #ifndef HAVE_STD_STRINGSTREAM stream << std::ends; #endif - array(m->row, m->col) += stream.str(); } for (unsigned int i=0;i