Commit 1f02528a authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

error corrected in VtkVectorWriter

parent 2d5c10bf
...@@ -88,7 +88,7 @@ namespace AMDiS { ...@@ -88,7 +88,7 @@ namespace AMDiS {
for(resultIter.reset(); !resultIter.end(); resultIter++) for(resultIter.reset(); !resultIter.end(); resultIter++)
{ {
std::vector<double> val; std::vector<double> val(0);
for (size_t i = 0; i < static_cast<size_t>(iterators.size()); i++) for (size_t i = 0; i < static_cast<size_t>(iterators.size()); i++)
val.push_back(*(*(iterators[i]))); val.push_back(*(*(iterators[i])));
...@@ -149,7 +149,7 @@ namespace AMDiS { ...@@ -149,7 +149,7 @@ namespace AMDiS {
for(resultIter.reset(); !resultIter.end(); resultIter++) for(resultIter.reset(); !resultIter.end(); resultIter++)
{ {
std::vector<double> val; std::vector<double> val(0);
for (size_t i = 0; i < static_cast<size_t>(iterators.size()); i++) for (size_t i = 0; i < static_cast<size_t>(iterators.size()); i++)
val.push_back(*(*(iterators[i]))); val.push_back(*(*(iterators[i])));
......
...@@ -127,9 +127,8 @@ namespace AMDiS { ...@@ -127,9 +127,8 @@ namespace AMDiS {
std::ostream& print(const std::vector<double> &l, std::ostream &o) { std::ostream& print(const std::vector<double> &l, std::ostream &o) {
std::vector<double>::const_iterator it = l.begin(); std::vector<double>::const_iterator it = l.begin();
for (size_t i = 0; it != l.end() && i < l.size(); i++) { for (size_t i = 0; i < l.size(); i++) {
o << (fabs(*it) < 1e-40 ? 0.0 : *it) << (i < l.size() - 1 ? " " : ""); o << (fabs(l[i]) < 1e-40 ? 0.0 : l[i]) << " ";
++it;
} }
if (writeAs3dVector) { if (writeAs3dVector) {
for (int i = l.size(); i < 3; i++) for (int i = l.size(); i < 3; i++)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment