From 6a810dcc126ff0fc2438a2586c365f4c7c290223 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 4 Dec 2018 01:21:07 +0100 Subject: [PATCH] Use double for istream again --- source/grid/grid_in.cc | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index 46f105e3e4..2f4afa4168 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -412,12 +412,14 @@ GridIn::read_vtk(std::istream &in) // the order used in the following blocks makes sense for (unsigned int i = 0; i < cells.size(); i++) { - types::manifold_id id; + double id; in >> id; if (set == "MaterialID") - cells[i].material_id = id; + cells[i].material_id = + static_cast(id); else if (set == "ManifoldID") - cells[i].manifold_id = id; + cells[i].manifold_id = + static_cast(id); else Assert(false, ExcInternalError()); } @@ -428,12 +430,14 @@ GridIn::read_vtk(std::istream &in) i < subcelldata.boundary_quads.size(); i++) { - types::manifold_id id; + double id; in >> id; if (set == "MaterialID") - subcelldata.boundary_quads[i].material_id = id; + subcelldata.boundary_quads[i].material_id = + static_cast(id); else if (set == "ManifoldID") - subcelldata.boundary_quads[i].manifold_id = id; + subcelldata.boundary_quads[i].manifold_id = + static_cast(id); else Assert(false, ExcInternalError()); } @@ -441,12 +445,14 @@ GridIn::read_vtk(std::istream &in) i < subcelldata.boundary_lines.size(); i++) { - types::manifold_id id; + double id; in >> id; if (set == "MaterialID") - subcelldata.boundary_lines[i].material_id = id; + subcelldata.boundary_lines[i].material_id = + static_cast(id); else if (set == "ManifoldID") - subcelldata.boundary_lines[i].manifold_id = id; + subcelldata.boundary_lines[i].manifold_id = + static_cast(id); else Assert(false, ExcInternalError()); } @@ -457,12 +463,14 @@ GridIn::read_vtk(std::istream &in) i < subcelldata.boundary_lines.size(); i++) { - types::manifold_id id; + double id; in >> id; if (set == "MaterialID") - subcelldata.boundary_lines[i].material_id = id; + subcelldata.boundary_lines[i].material_id = + static_cast(id); else if (set == "ManifoldID") - subcelldata.boundary_lines[i].manifold_id = id; + subcelldata.boundary_lines[i].manifold_id = + static_cast(id); else Assert(false, ExcInternalError()); } -- 2.39.5