Commit 16fc13db authored by Michael Kuron's avatar Michael Kuron
Browse files

Remove boost::tuple from VTKOutput

parent 85c2a7e2
......@@ -1377,13 +1377,13 @@ void VTKOutput::writeVTUHeaderPiece( std::ostream& ofs, const uint_t numberOfCel
{
Base64Writer base64;
for( auto vertex = vc.begin(); vertex != vc.end(); ++vertex )
base64 << numeric_cast<float>( ( *vertex ).get<0>() ) << numeric_cast<float>( ( *vertex ).get<1>() )
<< numeric_cast<float>( ( *vertex ).get<2>() );
base64 << numeric_cast<float>( std::get<0>( *vertex ) ) << numeric_cast<float>( std::get<1>( *vertex ) )
<< numeric_cast<float>( std::get<2>( *vertex ) );
ofs << " "; base64.toStream( ofs );
}
else for( auto vertex = vc.begin(); vertex != vc.end(); ++vertex )
ofs << " " << numeric_cast<float>( ( *vertex ).get<0>() ) << " " << numeric_cast<float>( ( *vertex ).get<1>() )
<< " " << numeric_cast<float>( ( *vertex ).get<2>() ) << "\n";
ofs << " " << numeric_cast<float>( std::get<0>( *vertex ) ) << " " << numeric_cast<float>( std::get<1>( *vertex ) )
<< " " << numeric_cast<float>( std::get<2>( *vertex ) ) << "\n";
ofs << " </DataArray>\n"
<< " </Points>\n"
......
......@@ -35,7 +35,7 @@
#include "core/Filesystem.h"
#include <functional>
#include <boost/tuple/tuple.hpp>
#include <tuple>
#include <fstream>
#include <string>
......@@ -55,16 +55,16 @@ private:
typedef UID< VTKGEN > VTKUID;
// types used during vertex-index mapping procedure when writing (P)VTU files
typedef boost::tuple< cell_idx_t, cell_idx_t, cell_idx_t > Vertex;
typedef boost::tuple< real_t, real_t, real_t > VertexCoord;
typedef std::tuple< cell_idx_t, cell_idx_t, cell_idx_t > Vertex;
typedef std::tuple< real_t, real_t, real_t > VertexCoord;
typedef uint32_t Index;
struct VertexCompare {
bool operator()( const Vertex& lhs, const Vertex& rhs ) const
{
if( lhs.get<0>() < rhs.get<0>() ||
( lhs.get<0>() == rhs.get<0>() && lhs.get<1>() < rhs.get<1>() ) ||
( lhs.get<0>() == rhs.get<0>() && lhs.get<1>() == rhs.get<1>() && lhs.get<2>() < rhs.get<2>() ) )
if( std::get<0>(lhs) < std::get<0>(rhs) ||
( std::get<0>(lhs) == std::get<0>(rhs) && std::get<1>(lhs) < std::get<1>(rhs) ) ||
( std::get<0>(lhs) == std::get<0>(rhs) && std::get<1>(lhs) == std::get<1>(rhs) && std::get<2>(lhs) < std::get<2>(rhs) ) )
return true;
return false;
}
......
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