GCC Code Coverage Report


Directory: gridformat/
File: gridformat/vtk/pvtu_reader.hpp
Date: 2024-11-10 16:24:00
Exec Total Coverage
Lines: 11 11 100.0%
Functions: 4 4 100.0%
Branches: 7 14 50.0%

Line Branch Exec Source
1 // SPDX-FileCopyrightText: 2022-2023 Dennis Gläser <dennis.glaeser@iws.uni-stuttgart.de>
2 // SPDX-License-Identifier: MIT
3 /*!
4 * \file
5 * \ingroup VTK
6 * \copydoc GridFormat::PVTUReader
7 */
8 #ifndef GRIDFORMAT_VTK_PVTU_READER_HPP_
9 #define GRIDFORMAT_VTK_PVTU_READER_HPP_
10
11 #include <optional>
12
13 #include <gridformat/vtk/vtu_reader.hpp>
14 #include <gridformat/vtk/pxml_reader.hpp>
15
16 namespace GridFormat {
17
18 /*!
19 * \ingroup VTK
20 * \brief Reader for .pvtu file format
21 * \copydetails VTK::PXMLUnstructuredGridReader
22 */
23 class PVTUReader : public VTK::PXMLUnstructuredGridReader<VTUReader> {
24 using ParentType = VTK::PXMLUnstructuredGridReader<VTUReader>;
25
26 public:
27 1 PVTUReader()
28
2/4
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
2 : ParentType("PUnstructuredGrid")
29 1 {}
30
31 94 explicit PVTUReader(const NullCommunicator&)
32
2/4
✓ Branch 1 taken 94 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 94 times.
✗ Branch 5 not taken.
188 : ParentType("PUnstructuredGrid")
33 94 {}
34
35 template<Concepts::Communicator C>
36 103 explicit PVTUReader(const C& comm, std::optional<bool> merge_exceeding_pieces = {})
37
2/4
✓ Branch 1 taken 103 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 103 times.
✗ Branch 5 not taken.
206 : ParentType("PUnstructuredGrid", comm, merge_exceeding_pieces)
38 103 {}
39
40 private:
41 3 std::string _name() const override {
42
1/2
✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
6 return "PVTUReader";
43 }
44 };
45
46 } // namespace GridFormat
47
48 #endif // GRIDFORMAT_VTK_PVTU_READER_HPP_
49