From: Ralf Hartmann Date: Wed, 2 Nov 2005 15:12:13 +0000 (+0000) Subject: Fix bug in write_povray function. X-Git-Tag: v8.0.0~12923 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47666ecf7b8c7f86012f7bbdca99aa9673fb70ed;p=dealii.git Fix bug in write_povray function. git-svn-id: https://svn.dealii.org/trunk@11689 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index 298099df6a..0175547eb0 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -1944,10 +1944,12 @@ void DataOutBase::write_povray (const std::vector > &patches } // max. and min. heigth of solution - double hmin=0, hmax=0; + typename std::vector >::const_iterator patch=patches.begin(); + Assert(patch!=patches.end(), ExcInternalError()); + double hmin=patch->data(0,0); + double hmax=patch->data(0,0); - for (typename std::vector >::const_iterator patch=patches.begin(); - patch != patches.end(); ++patch) + for (; patch != patches.end(); ++patch) { const unsigned int n_subdivisions = patch->n_subdivisions; @@ -1962,12 +1964,14 @@ void DataOutBase::write_povray (const std::vector > &patches 0))), ExcInvalidDatasetSize (patch->data.n_cols(), n_subdivisions+1)); - for (unsigned int i=0; idata(0,dl)data(0,dl); - if ((hmax==0)||(patch->data(0,dl)>hmax)) hmax=patch->data(0,dl); + if (patch->data(0,dl)data(0,dl); + if (patch->data(0,dl)>hmax) + hmax=patch->data(0,dl); } }