From 5134a4cbccffc98ecb0e5eb746615e18f91abb2d Mon Sep 17 00:00:00 2001 From: Michael Kuron <mkuron@icp.uni-stuttgart.de> Date: Thu, 2 Jul 2020 13:59:21 +0200 Subject: [PATCH] pe sphere VTK output: add angular velocity --- src/pe/vtk/SphereVtkOutput.cpp | 1 + src/pe/vtk/SphereVtkOutput.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/pe/vtk/SphereVtkOutput.cpp b/src/pe/vtk/SphereVtkOutput.cpp index f02130a72..ade96605a 100644 --- a/src/pe/vtk/SphereVtkOutput.cpp +++ b/src/pe/vtk/SphereVtkOutput.cpp @@ -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< id_t >(), "id", 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; } diff --git a/src/pe/vtk/SphereVtkOutput.h b/src/pe/vtk/SphereVtkOutput.h index 56ea01467..655faec08 100755 --- a/src/pe/vtk/SphereVtkOutput.h +++ b/src/pe/vtk/SphereVtkOutput.h @@ -98,6 +98,9 @@ void SphereVtkOutput::push( std::ostream& os, const uint_t data, const uint_t po case 6: vtk::toStream( os, numeric_cast< id_t >(bodies_.at( point )->getTopSuperBody()->getID()) ); 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 case 6: b64 << numeric_cast< id_t >(bodies_.at( point )->getTopSuperBody()->getID()); break; + case 7: + b64 << numeric_cast< float >(bodies_.at( point )->getAngularVel()[component]); + break; } } -- GitLab