Commit 8b758e26 authored by Andreas Lauser's avatar Andreas Lauser
Browse files

vtk multi writer: set very small values to zero to avoid problems with paraview

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@5008 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 9c1ee4c2
......@@ -122,11 +122,16 @@ public:
template <class VectorField>
void addVertexData(VectorField *field, const char *name)
{
#ifndef NDEBUG
// make sure the field is well defined
for (int i = 0; i < field->size(); ++i)
for (int i = 0; i < field->size(); ++i) {
Valgrind::CheckDefined((*field)[i]);
#endif
// set values which are too small to 0 to avoid problems
// with paraview
if (std::abs((*field)[i]) < FLT_MIN)
(*field)[i] = 0.0;
}
curWriter_->addVertexData(*field, name);
}
......
Supports Markdown
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