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

error corrected in VtkVectorWriter

parent 2d5c10bf
......@@ -88,7 +88,7 @@ namespace AMDiS {
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++)
val.push_back(*(*(iterators[i])));
......@@ -149,7 +149,7 @@ namespace AMDiS {
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++)
val.push_back(*(*(iterators[i])));
......
......@@ -127,9 +127,8 @@ namespace AMDiS {
std::ostream& print(const std::vector<double> &l, std::ostream &o) {
std::vector<double>::const_iterator it = l.begin();
for (size_t i = 0; it != l.end() && i < l.size(); i++) {
o << (fabs(*it) < 1e-40 ? 0.0 : *it) << (i < l.size() - 1 ? " " : "");
++it;
for (size_t i = 0; i < l.size(); i++) {
o << (fabs(l[i]) < 1e-40 ? 0.0 : l[i]) << " ";
}
if (writeAs3dVector) {
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