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 !455
parents dd620011 e710c1cc
Pipeline #32188 passed with stages
in 788 minutes and 2 seconds
...@@ -106,7 +106,7 @@ public: ...@@ -106,7 +106,7 @@ public:
inline bool isFaceFilterSet() const { return static_cast<bool>(faceFilter_); } inline bool isFaceFilterSet() const { return static_cast<bool>(faceFilter_); }
void incrementTimeStep() { ++timestep_; } void incrementTimeStep() { ++timestep_; }
bool isWriteScheduled() const { return timestep_ % writeFrequency_ == 0; } bool isWriteScheduled() const { return writeFrequency_ > 0 && timestep_ % writeFrequency_ == 0; }
protected: protected:
void write( std::ostream & os ) const; void write( std::ostream & os ) const;
......
...@@ -150,6 +150,11 @@ void test( const std::string & meshFile ) ...@@ -150,6 +150,11 @@ void test( const std::string & meshFile )
meshWriterStatusfiltered.setFaceFilter( mesh::StatusFaceFilter< MeshType >( OpenMesh::Attributes::TAGGED ) ); meshWriterStatusfiltered.setFaceFilter( mesh::StatusFaceFilter< MeshType >( OpenMesh::Attributes::TAGGED ) );
meshWriterStatusfiltered(); 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