From: Thomas Richter Date: Thu, 15 Feb 2001 10:12:42 +0000 (+0000) Subject: remove bug in normal vector interpolation of povray output X-Git-Tag: v8.0.0~19723 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bfd1c7332972396b631c0b34d395b53f341f058;p=dealii.git remove bug in normal vector interpolation of povray output git-svn-id: https://svn.dealii.org/trunk@3935 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 7783768ac9..98b259758a 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -892,7 +892,8 @@ void DataOutBase::write_povray (const typename std::vector > ExcInvalidDatasetSize (patch->data.n(), n_subdivisions+1)); - Point ver[16]; // value for all points in this patch + vector > ver((n_subdivisions+1)* + (n_subdivisions+1)); for (unsigned int i=0; i > const int dl = i*(n_subdivisions+1)+j; if (flags.smooth) // only if smooth triangles are used { - Point<3> nrml[16]; // aproximate normal vectors in patch + // aproximate normal + // vectors in patch + vector > nrml((n_subdivisions+1)* + (n_subdivisions+1)); Point<3> h1,h2; for (unsigned int i=0; i > << ver[dl](0) << "," << patch->data(0,dl) << "," << ver[dl](1) << ">, <" - << nrml[dl] << ">," << std::endl; + << nrml[dl](0) << ", " << nrml[dl](1) << ", " << nrml[dl](2) + << ">," << std::endl; out << " \t<" << ver[dl+n_subdivisions+1](0) << "," << patch->data(0,dl+n_subdivisions+1) << "," << ver[dl+n_subdivisions+1](1) << ">, <" - << nrml[dl+n_subdivisions+1] << ">," << std::endl; + << nrml[dl+n_subdivisions+1](0) << ", " + << nrml[dl+n_subdivisions+1](1) << ", " + << nrml[dl+n_subdivisions+1](2) + << ">," << std::endl; out << "\t<" << ver[dl+n_subdivisions+2](0) << "," << patch->data(0,dl+n_subdivisions+2) << "," << ver[dl+n_subdivisions+2](1) << ">, <" - << nrml[dl+n_subdivisions+2] << ">}" << std::endl; + << nrml[dl+n_subdivisions+2](0) << ", " + << nrml[dl+n_subdivisions+2](1) << ", " + << nrml[dl+n_subdivisions+2](2) + << ">}" << std::endl; // upper/left triangle out << "smooth_triangle {" << std::endl << "\t<" << ver[dl](0) << "," << patch->data(0,dl) << "," << ver[dl](1) << ">, <" - << nrml[dl] << ">," << std::endl; + << nrml[dl](0) << ", " << nrml[dl](1) << ", " << nrml[dl](2) + << ">," << std::endl; out << "\t<" << ver[dl+n_subdivisions+2](0) << "," << patch->data(0,dl+n_subdivisions+2) << "," << ver[dl+n_subdivisions+2](1) << ">, <" - << nrml[dl+n_subdivisions+2] << ">," << std::endl; + << nrml[dl+n_subdivisions+2](0) << ", " + << nrml[dl+n_subdivisions+2](1) << ", " + << nrml[dl+n_subdivisions+2](2) + << ">," << std::endl; out << "\t<" << ver[dl+1](0) << "," << patch->data(0,dl+1) << "," << ver[dl+1](1) << ">, <" - << nrml[dl+1] << ">}" << std::endl; + << nrml[dl+1](0) << ", " << nrml[dl+1](1) << ", " << nrml[dl+1](2) + << ">}" << std::endl; } else { @@ -1063,8 +1079,8 @@ void DataOutBase::write_povray (const typename std::vector > out << "\t<" << ver[dl+1](0) << "," << patch->data(0,dl+1) << "," - << ver[dl+1](1) << ">}" << std::endl; - }; + << ver[dl+1](1) << ">}" << std::endl; + }; }; }; }