From 2e3b6bf7129f929b3cdf92369702a65d60f5df40 Mon Sep 17 00:00:00 2001
From: Timo Koch <timokoch@uio.no>
Date: Wed, 17 Jul 2024 10:52:43 +0200
Subject: [PATCH] [io][vtkreader] Fix typo and add some output for reading
 cell/point fields

---
 dumux/io/vtk/vtkreader.hh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dumux/io/vtk/vtkreader.hh b/dumux/io/vtk/vtkreader.hh
index d7bcfc355f..55c4b45213 100644
--- a/dumux/io/vtk/vtkreader.hh
+++ b/dumux/io/vtk/vtkreader.hh
@@ -244,7 +244,7 @@ private:
             const auto offsets = parseDataArray_<std::vector<unsigned int>>(offsetsNode);
             const auto types = parseDataArray_<std::vector<unsigned int>>(typesNode);
 
-            if (verbose) std::cout << "Found " << offsets.size() << " element." << std::endl;
+            if (verbose) std::cout << "Found " << offsets.size() << " elements." << std::endl;
 
             unsigned int lastOffset = 0;
             for (unsigned int i = 0; i < offsets.size(); ++i)
@@ -318,6 +318,9 @@ private:
                         DUNE_THROW(Dune::IOError, "Couldn't get Name attribute of a cell data array.");
 
                     cellData[std::string(attributeText)] = parseDataArray_<std::vector<double>>(dataArray);
+
+                    if (verbose)
+                        std::cout << "Read cell data field " << attributeText << std::endl;
                 }
             }
             // for poly data
@@ -336,6 +339,9 @@ private:
                             DUNE_THROW(Dune::IOError, "Couldn't get Name attribute of a cell data array.");
 
                         polyLineCellData[std::string(attributeText)] = parseDataArray_<std::vector<double>>(dataArray);
+
+                        if (verbose)
+                            std::cout << "Read cell data field " << attributeText << std::endl;
                     }
 
                     // a polyline can have many points in the VTK format
@@ -395,6 +401,9 @@ private:
                     DUNE_THROW(Dune::IOError, "Couldn't get Name attribute of a point data array.");
 
                 pointData[std::string(attributeText)] = parseDataArray_<std::vector<double>>(dataArray);
+
+                if (verbose)
+                    std::cout << "Read point data field " << attributeText << std::endl;
             }
         }
     }
-- 
GitLab