From: Wolfgang Bangerth Date: Wed, 19 Feb 2014 19:44:05 +0000 (+0000) Subject: Patch by Mayank Sabharwal: Fix an indexing error in GridIn::read_vtk(). X-Git-Tag: v8.2.0-rc1~799 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98efa68884d04fbb3af157aa766f28f85f7419ea;p=dealii.git Patch by Mayank Sabharwal: Fix an indexing error in GridIn::read_vtk(). git-svn-id: https://svn.dealii.org/trunk@32517 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index beb94ec9ee..dcdfd4082a 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -135,8 +135,13 @@ inconvenience this causes.

Specific improvements

    -
  1. New: There is a new namespace TimeStepping for the algorithms that do time - integrations. In this new namespace, several Runge-Kutta methods have been +
  2. Fixed: There was an indexing error in GridIn::read_vtk() that triggered + for some input files. This is now fixed. +
    + (Mayank Sabharwal, 2014/02/19) + +
  3. New: There is a new namespace TimeStepping for the algorithms that do time + integrations. In this new namespace, several Runge-Kutta methods have been implemented: explicit methods, implicit methods, and embedded explicit methods.
    (Damien Lebrun-Grandie, Bruno Turcksin, 2014/02/17) diff --git a/deal.II/source/grid/grid_in.cc b/deal.II/source/grid/grid_in.cc index c3072c1218..be09afad43 100644 --- a/deal.II/source/grid/grid_in.cc +++ b/deal.II/source/grid/grid_in.cc @@ -1,7 +1,7 @@ // --------------------------------------------------------------------- // $Id$ // -// Copyright (C) 1999 - 2013 by the deal.II authors +// Copyright (C) 1999 - 2014 by the deal.II authors // // This file is part of the deal.II library. // @@ -175,7 +175,7 @@ void GridIn::read_vtk(std::istream &in) { subcelldata.boundary_quads.back().vertices[j] = vertex_indices[subcelldata.boundary_quads.back().vertices[j]]; } - quad_indices[count] = count + 1; + quad_indices[no_quads] = no_quads + 1; no_quads++; } @@ -224,7 +224,7 @@ void GridIn::read_vtk(std::istream &in) { subcelldata.boundary_lines.back().vertices[j] = vertex_indices[subcelldata.boundary_lines.back().vertices[j]]; } - line_indices[count] = count + 1; + line_indices[no_lines] = no_lines + 1; no_lines++; }