Commit 2d57fd58 authored by Helen Schottenhamml's avatar Helen Schottenhamml
Browse files

Merge branch 'mr_fix_mesh_vtk_output' into 'master'

Fixed possible divide by zero in mesh vtk writer and added case to test

See merge request walberla/walberla!455
parents dd620011 e710c1cc
......@@ -106,7 +106,7 @@ public:
inline bool isFaceFilterSet() const { return static_cast<bool>(faceFilter_); }
void incrementTimeStep() { ++timestep_; }
bool isWriteScheduled() const { return timestep_ % writeFrequency_ == 0; }
bool isWriteScheduled() const { return writeFrequency_ > 0 && timestep_ % writeFrequency_ == 0; }
protected:
void write( std::ostream & os ) const;
......
......@@ -150,6 +150,11 @@ void test( const std::string & meshFile )
meshWriterStatusfiltered.setFaceFilter( mesh::StatusFaceFilter< MeshType >( OpenMesh::Attributes::TAGGED ) );
meshWriterStatusfiltered();
VTKMeshWriter< MeshType > meshWriterDeactivated( mesh, "mesh_vtk_test_deactivated", 0 );
meshWriterDeactivated();
}
......
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