Skip to content
Snippets Groups Projects
Commit 5134a4cb authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

pe sphere VTK output: add angular velocity

parent 8a48e669
Branches
Tags
No related merge requests found
...@@ -42,6 +42,7 @@ std::vector< SphereVtkOutput::Attributes > SphereVtkOutput::getAttributes() cons ...@@ -42,6 +42,7 @@ std::vector< SphereVtkOutput::Attributes > SphereVtkOutput::getAttributes() cons
attributes.emplace_back( vtk::typeToString< int >(), "rank", uint_c(1) ); attributes.emplace_back( vtk::typeToString< int >(), "rank", uint_c(1) );
attributes.emplace_back( vtk::typeToString< id_t >(), "id", uint_c(1) ); attributes.emplace_back( vtk::typeToString< id_t >(), "id", uint_c(1) );
attributes.emplace_back( vtk::typeToString< id_t >(), "uid", uint_c(1) ); attributes.emplace_back( vtk::typeToString< id_t >(), "uid", uint_c(1) );
attributes.emplace_back( vtk::typeToString< float >(), "angular_velocity", uint_c(3) );
return attributes; return attributes;
} }
......
...@@ -98,6 +98,9 @@ void SphereVtkOutput::push( std::ostream& os, const uint_t data, const uint_t po ...@@ -98,6 +98,9 @@ void SphereVtkOutput::push( std::ostream& os, const uint_t data, const uint_t po
case 6: case 6:
vtk::toStream( os, numeric_cast< id_t >(bodies_.at( point )->getTopSuperBody()->getID()) ); vtk::toStream( os, numeric_cast< id_t >(bodies_.at( point )->getTopSuperBody()->getID()) );
break; break;
case 7:
vtk::toStream( os, numeric_cast< float >(bodies_.at( point )->getAngularVel()[component]) );
break;
} }
} }
...@@ -139,6 +142,9 @@ void SphereVtkOutput::push( vtk::Base64Writer& b64, const uint_t data, const uin ...@@ -139,6 +142,9 @@ void SphereVtkOutput::push( vtk::Base64Writer& b64, const uint_t data, const uin
case 6: case 6:
b64 << numeric_cast< id_t >(bodies_.at( point )->getTopSuperBody()->getID()); b64 << numeric_cast< id_t >(bodies_.at( point )->getTopSuperBody()->getID());
break; break;
case 7:
b64 << numeric_cast< float >(bodies_.at( point )->getAngularVel()[component]);
break;
} }
} }
......
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