Skip to content
Snippets Groups Projects
Commit e710c1cc authored by Christoph Rettinger's avatar Christoph Rettinger
Browse files

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

parent fd01f6c9
Branches
Tags
No related merge requests found
......@@ -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();
}
......
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