]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed cell indexing in the test for reading vtk mesh with field data
authorVaishnavi Kale <vaishnav@ualberta.ca>
Mon, 2 Dec 2024 19:37:03 +0000 (12:37 -0700)
committerVaishnavi Kale <vaishnav@ualberta.ca>
Mon, 2 Dec 2024 19:37:03 +0000 (12:37 -0700)
tests/grid/grid_in_vtk_2d_field_data.cc

index 0cfc214d3eed386546d5862d3917e8efb224d9ff..152f30a8f054352ec3d858fbf3c85728788c075c 100644 (file)
@@ -60,14 +60,7 @@ check_file(const std::string name, typename GridIn<dim>::Format format)
                cell != triangulation.end();
                ++cell)
             {
-              // store cell ID as a string
-              std::string text = boost::lexical_cast<std::string>(
-                cell->id().get_coarse_cell_id());
-              // Convert the string containing cell ID to an integer
-              boost::char_separator<char>                   sep{"_"};
-              boost::tokenizer<boost::char_separator<char>> tokens(text, sep);
-              unsigned int                                  cell_id =
-                boost::lexical_cast<int>(*(tokens.begin()));
+              unsigned int cell_id = cell->id().get_coarse_cell_id();
               deallog << '\t' << cell_density[cell_id] << std::endl;
             }
         }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.