From: kanschat Date: Thu, 22 May 2014 20:20:24 +0000 (+0000) Subject: adjust OutputOperator for AnyData X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8925d03a02c326dfb0f81dc6733894df49089359;p=dealii-svn.git adjust OutputOperator for AnyData git-svn-id: https://svn.dealii.org/trunk@32967 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/algorithms/operator.h b/deal.II/include/deal.II/algorithms/operator.h index 5dbe64a4b7..bad83a96dd 100644 --- a/deal.II/include/deal.II/algorithms/operator.h +++ b/deal.II/include/deal.II/algorithms/operator.h @@ -208,7 +208,7 @@ namespace Algorithms /** * @deprecated Output all the vectors in NamedData. */ - virtual OutputOperator &operator<< (const NamedData &vectors); + OutputOperator &operator<< (const NamedData &vectors); protected: unsigned int step; private: diff --git a/deal.II/include/deal.II/algorithms/operator.templates.h b/deal.II/include/deal.II/algorithms/operator.templates.h index eed6e1a984..0a941933ed 100644 --- a/deal.II/include/deal.II/algorithms/operator.templates.h +++ b/deal.II/include/deal.II/algorithms/operator.templates.h @@ -128,29 +128,27 @@ namespace Algorithms { if (os == 0) { - //TODO: make this possible - //deallog << ' ' << step; - //for (unsigned int i=0;iprint(deallog); - //deallog << std::endl; + deallog << "Step " << step << std::endl; + for (unsigned int i=0; i(i); + if (v == 0) continue; + for (unsigned int j=0; jsize(); ++j) + (*os) << ' ' << (*v)(j); + deallog << std::endl; + } + deallog << std::endl; } else { (*os) << ' ' << step; for (unsigned int i=0; i(i)) - { - const VECTOR& v = *vectors.entry(i); - for (unsigned int j=0; j(i)) - { - const VECTOR& v = *vectors.entry(i); - for (unsigned int j=0; j(i); + if (v == 0) continue; + for (unsigned int j=0; jsize(); ++j) + (*os) << ' ' << (*v)(j); + (*os) << std::endl; } (*os) << std::endl; } @@ -162,22 +160,8 @@ namespace Algorithms OutputOperator & OutputOperator::operator<< (const NamedData &vectors) { - if (os == 0) - { - //TODO: make this possible - //deallog << ' ' << step; - //for (unsigned int i=0;iprint(deallog); - //deallog << std::endl; - } - else - { - (*os) << ' ' << step; - for (unsigned int i=0; isize(); ++j) - (*os) << ' ' << (*vectors(i))(j); - (*os) << std::endl; - } + const AnyData newdata = vectors; + (*this) << newdata; return *this; } }