GCC Code Coverage Report


Directory: gridformat/
File: gridformat/grid/entity_fields.hpp
Date: 2024-11-20 14:41:59
Exec Total Coverage
Lines: 75 76 98.7%
Functions: 2902 3725 77.9%
Branches: 640 1064 60.2%

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 Grid
6 * \brief Field implementations for data on grid entities.
7 */
8 #ifndef GRIDFORMAT_GRID_ENTITY_FIELDS_HPP_
9 #define GRIDFORMAT_GRID_ENTITY_FIELDS_HPP_
10
11 #include <span>
12 #include <ranges>
13 #include <utility>
14 #include <algorithm>
15 #include <type_traits>
16 #include <concepts>
17
18 #include <gridformat/common/md_layout.hpp>
19 #include <gridformat/common/precision.hpp>
20 #include <gridformat/common/exceptions.hpp>
21 #include <gridformat/common/serialization.hpp>
22 #include <gridformat/common/flat_index_mapper.hpp>
23 #include <gridformat/common/ranges.hpp>
24 #include <gridformat/common/field.hpp>
25
26 #include <gridformat/grid/_detail.hpp>
27 #include <gridformat/grid/concepts.hpp>
28 #include <gridformat/grid/grid.hpp>
29
30 namespace GridFormat {
31
32 #ifndef DOXYGEN
33 namespace EntityFieldsDetail {
34
35 template<Concepts::Scalar ValueType>
36 16985114 void fill_buffer(const Concepts::Scalar auto& value,
37 std::byte* buffer,
38 std::size_t& offset) {
39 16985114 const auto cast_value = static_cast<ValueType>(value);
40 16985114 std::copy_n(
41 reinterpret_cast<const std::byte*>(&cast_value),
42 sizeof(ValueType),
43
1/2
✓ Branch 1 taken 8495653 times.
✗ Branch 2 not taken.
16985114 buffer + offset
44 );
45 16985114 offset += sizeof(ValueType);
46 16985114 }
47
48 template<Concepts::Scalar ValueType>
49 6614700 void fill_buffer(const std::ranges::range auto& r,
50 std::byte* buffer,
51 std::size_t& offset) {
52
1/2
✓ Branch 1 taken 3307350 times.
✗ Branch 2 not taken.
25794924 std::ranges::for_each(r, [&] (const auto& entry) {
53 9590112 fill_buffer<ValueType>(entry, buffer, offset);
54 });
55 6614700 }
56
57 template<typename ValueType,
58 typename Grid,
59 typename Entities,
60 typename Extents,
61 typename F>
62 159204 void fill_structured(const Grid& grid,
63 const Entities& entities,
64 const Extents& extents,
65 const F& field_function,
66 const MDLayout& layout,
67 Serialization& serialization) {
68
1/2
✓ Branch 1 taken 79602 times.
✗ Branch 2 not taken.
159204 auto values = serialization.as_span_of<ValueType>();
69
1/2
✓ Branch 1 taken 79602 times.
✗ Branch 2 not taken.
159204 const FlatIndexMapper index_mapper{extents};
70
7/12
✓ Branch 1 taken 79602 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 53608 times.
✓ Branch 4 taken 25994 times.
✓ Branch 6 taken 53608 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 53608 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 53608 times.
✓ Branch 12 taken 25994 times.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
159204 const auto values_offset = layout.dimension() == 1 ? 1 : layout.sub_layout(1).number_of_entries();
71
1/2
✓ Branch 1 taken 79602 times.
✗ Branch 2 not taken.
4162398 std::ranges::for_each(entities, [&] (const auto& e) {
72
73/135
✓ Branch 1 taken 529 times.
✓ Branch 2 taken 22089 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 529 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 15535 times.
✓ Branch 7 taken 356 times.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 73297 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✓ Branch 13 taken 3171 times.
✓ Branch 14 taken 30310 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 3171 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 30075 times.
✓ Branch 19 taken 1988 times.
✓ Branch 20 taken 1260 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 23203 times.
✗ Branch 23 not taken.
✓ Branch 24 taken 1260 times.
✓ Branch 25 taken 20 times.
✓ Branch 26 taken 14543 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 1280 times.
✗ Branch 29 not taken.
✓ Branch 30 taken 14520 times.
✓ Branch 31 taken 12 times.
✓ Branch 32 taken 4200 times.
✗ Branch 33 not taken.
✓ Branch 34 taken 14525 times.
✗ Branch 35 not taken.
✓ Branch 36 taken 3810 times.
✓ Branch 37 taken 80 times.
✓ Branch 38 taken 13410 times.
✗ Branch 39 not taken.
✓ Branch 40 taken 1640 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 10958 times.
✓ Branch 43 taken 36 times.
✓ Branch 44 taken 828 times.
✗ Branch 45 not taken.
✓ Branch 46 taken 10971 times.
✗ Branch 47 not taken.
✓ Branch 48 taken 828 times.
✗ Branch 49 not taken.
✓ Branch 50 taken 142734 times.
✗ Branch 51 not taken.
✓ Branch 52 taken 300 times.
✗ Branch 53 not taken.
✓ Branch 54 taken 142734 times.
✗ Branch 55 not taken.
✓ Branch 56 taken 200 times.
✗ Branch 57 not taken.
✓ Branch 58 taken 142674 times.
✗ Branch 59 not taken.
✓ Branch 60 taken 200 times.
✗ Branch 61 not taken.
✓ Branch 62 taken 140514 times.
✗ Branch 63 not taken.
✓ Branch 64 taken 200 times.
✗ Branch 65 not taken.
✓ Branch 66 taken 206997 times.
✗ Branch 67 not taken.
✓ Branch 68 taken 200 times.
✗ Branch 69 not taken.
✓ Branch 70 taken 206784 times.
✗ Branch 71 not taken.
✓ Branch 72 taken 200 times.
✗ Branch 73 not taken.
✓ Branch 74 taken 117333 times.
✗ Branch 75 not taken.
✓ Branch 76 taken 200 times.
✗ Branch 77 not taken.
✓ Branch 78 taken 117120 times.
✗ Branch 79 not taken.
✓ Branch 82 taken 117333 times.
✗ Branch 83 not taken.
✓ Branch 86 taken 117120 times.
✗ Branch 87 not taken.
✓ Branch 90 taken 72900 times.
✗ Branch 91 not taken.
✓ Branch 94 taken 72900 times.
✗ Branch 95 not taken.
✓ Branch 98 taken 24692 times.
✗ Branch 99 not taken.
✓ Branch 102 taken 24692 times.
✗ Branch 103 not taken.
✓ Branch 106 taken 24692 times.
✗ Branch 107 not taken.
✓ Branch 110 taken 24692 times.
✗ Branch 111 not taken.
✓ Branch 114 taken 392 times.
✗ Branch 115 not taken.
✓ Branch 118 taken 392 times.
✗ Branch 119 not taken.
✓ Branch 122 taken 180 times.
✗ Branch 123 not taken.
✓ Branch 126 taken 180 times.
✗ Branch 127 not taken.
✓ Branch 130 taken 180 times.
✗ Branch 131 not taken.
✓ Branch 134 taken 180 times.
✗ Branch 135 not taken.
✓ Branch 138 taken 180 times.
✗ Branch 139 not taken.
✓ Branch 142 taken 180 times.
✗ Branch 143 not taken.
✓ Branch 146 taken 1320 times.
✗ Branch 147 not taken.
✓ Branch 150 taken 1320 times.
✗ Branch 151 not taken.
✓ Branch 154 taken 1320 times.
✗ Branch 155 not taken.
✓ Branch 158 taken 1320 times.
✗ Branch 159 not taken.
✓ Branch 162 taken 1320 times.
✗ Branch 163 not taken.
✓ Branch 166 taken 1320 times.
✗ Branch 167 not taken.
✓ Branch 170 taken 360 times.
✗ Branch 171 not taken.
✓ Branch 174 taken 360 times.
✗ Branch 175 not taken.
✓ Branch 178 taken 360 times.
✗ Branch 179 not taken.
✓ Branch 182 taken 360 times.
✗ Branch 183 not taken.
✓ Branch 186 taken 360 times.
✗ Branch 187 not taken.
✓ Branch 190 taken 360 times.
✗ Branch 191 not taken.
2001597 const auto index = index_mapper.map(location(grid, e));
73 2001597 const auto cur_offset = index*values_offset;
74 2001597 auto cur_values = std::as_writable_bytes(values.subspan(cur_offset));
75
76 2001597 std::size_t offset = 0;
77
126/195
✓ Branch 2 taken 9601 times.
✓ Branch 3 taken 13017 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 9601 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 13017 times.
✓ Branch 9 taken 2874 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 2874 times.
✓ Branch 13 taken 13017 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 63005 times.
✓ Branch 17 taken 90 times.
✓ Branch 18 taken 13017 times.
✓ Branch 19 taken 63005 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 90 times.
✓ Branch 23 taken 28968 times.
✓ Branch 24 taken 4500 times.
✗ Branch 25 not taken.
✓ Branch 26 taken 15951 times.
✓ Branch 27 taken 90 times.
✓ Branch 28 taken 13017 times.
✓ Branch 29 taken 4500 times.
✓ Branch 30 taken 9023 times.
✓ Branch 31 taken 4725 times.
✓ Branch 32 taken 90 times.
✓ Branch 33 taken 15368 times.
✓ Branch 34 taken 4500 times.
✗ Branch 35 not taken.
✓ Branch 36 taken 4725 times.
✓ Branch 37 taken 245 times.
✓ Branch 38 taken 6345 times.
✓ Branch 39 taken 4500 times.
✓ Branch 40 taken 155 times.
✓ Branch 41 taken 4725 times.
✓ Branch 42 taken 90 times.
✓ Branch 43 taken 6345 times.
✓ Branch 44 taken 7363 times.
✓ Branch 45 taken 300 times.
✓ Branch 46 taken 4725 times.
✓ Branch 47 taken 2923 times.
✓ Branch 48 taken 6345 times.
✓ Branch 49 taken 4500 times.
✓ Branch 50 taken 300 times.
✓ Branch 51 taken 7131 times.
✓ Branch 52 taken 60 times.
✓ Branch 53 taken 6345 times.
✓ Branch 54 taken 4566 times.
✓ Branch 55 taken 300 times.
✓ Branch 56 taken 4725 times.
✓ Branch 57 taken 60 times.
✓ Branch 58 taken 6488 times.
✓ Branch 59 taken 2160 times.
✓ Branch 60 taken 300 times.
✓ Branch 61 taken 2393 times.
✓ Branch 62 taken 60 times.
✓ Branch 63 taken 138264 times.
✓ Branch 64 taken 2160 times.
✓ Branch 65 taken 948 times.
✓ Branch 66 taken 2250 times.
✓ Branch 67 taken 60 times.
✓ Branch 68 taken 138912 times.
✓ Branch 69 taken 2160 times.
✓ Branch 70 taken 300 times.
✓ Branch 71 taken 2250 times.
✓ Branch 72 taken 731 times.
✓ Branch 73 taken 138264 times.
✓ Branch 74 taken 2160 times.
✓ Branch 75 taken 871 times.
✓ Branch 76 taken 2250 times.
✗ Branch 77 not taken.
✓ Branch 78 taken 138264 times.
✓ Branch 79 taken 2280 times.
✓ Branch 80 taken 200 times.
✓ Branch 81 taken 2250 times.
✓ Branch 82 taken 120 times.
✓ Branch 83 taken 138264 times.
✗ Branch 84 not taken.
✓ Branch 85 taken 200 times.
✓ Branch 86 taken 2250 times.
✗ Branch 87 not taken.
✓ Branch 88 taken 138264 times.
✗ Branch 89 not taken.
✓ Branch 90 taken 200 times.
✓ Branch 91 taken 68040 times.
✗ Branch 92 not taken.
✓ Branch 93 taken 48600 times.
✗ Branch 94 not taken.
✓ Branch 95 taken 200 times.
✓ Branch 96 taken 68040 times.
✗ Branch 97 not taken.
✓ Branch 98 taken 48600 times.
✗ Branch 99 not taken.
✓ Branch 100 taken 200 times.
✓ Branch 101 taken 68040 times.
✗ Branch 102 not taken.
✓ Branch 103 taken 48600 times.
✗ Branch 104 not taken.
✗ Branch 105 not taken.
✓ Branch 106 taken 68040 times.
✗ Branch 107 not taken.
✓ Branch 108 taken 48600 times.
✗ Branch 109 not taken.
✗ Branch 110 not taken.
✓ Branch 111 taken 68040 times.
✗ Branch 112 not taken.
✓ Branch 113 taken 48600 times.
✓ Branch 114 taken 693 times.
✗ Branch 115 not taken.
✓ Branch 116 taken 68040 times.
✓ Branch 117 taken 693 times.
✓ Branch 118 taken 48600 times.
✗ Branch 119 not taken.
✗ Branch 120 not taken.
✓ Branch 121 taken 24780 times.
✗ Branch 122 not taken.
✓ Branch 123 taken 392 times.
✓ Branch 124 taken 480 times.
✗ Branch 125 not taken.
✓ Branch 126 taken 24300 times.
✗ Branch 127 not taken.
✓ Branch 128 taken 1085 times.
✗ Branch 129 not taken.
✗ Branch 130 not taken.
✓ Branch 131 taken 24993 times.
✗ Branch 132 not taken.
✓ Branch 133 taken 392 times.
✗ Branch 134 not taken.
✓ Branch 135 taken 480 times.
✓ Branch 136 taken 24300 times.
✗ Branch 137 not taken.
✓ Branch 138 taken 872 times.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
✓ Branch 141 taken 24300 times.
✓ Branch 142 taken 693 times.
✓ Branch 143 taken 392 times.
✗ Branch 144 not taken.
✓ Branch 145 taken 693 times.
✓ Branch 146 taken 24300 times.
✗ Branch 147 not taken.
✓ Branch 148 taken 392 times.
✓ Branch 149 taken 480 times.
✗ Branch 150 not taken.
✗ Branch 151 not taken.
✓ Branch 152 taken 480 times.
✓ Branch 153 taken 180 times.
✗ Branch 154 not taken.
✗ Branch 155 not taken.
✗ Branch 156 not taken.
✗ Branch 157 not taken.
✓ Branch 158 taken 180 times.
✗ Branch 159 not taken.
✗ Branch 160 not taken.
✗ Branch 161 not taken.
✓ Branch 163 taken 180 times.
✗ Branch 164 not taken.
✗ Branch 166 not taken.
✗ Branch 167 not taken.
✓ Branch 168 taken 180 times.
✗ Branch 169 not taken.
✗ Branch 170 not taken.
✗ Branch 171 not taken.
✓ Branch 173 taken 180 times.
✗ Branch 174 not taken.
✗ Branch 177 not taken.
✓ Branch 178 taken 180 times.
✗ Branch 179 not taken.
✗ Branch 180 not taken.
✗ Branch 181 not taken.
✓ Branch 183 taken 1320 times.
✗ Branch 184 not taken.
✓ Branch 188 taken 1320 times.
✗ Branch 189 not taken.
✓ Branch 193 taken 1320 times.
✗ Branch 194 not taken.
✓ Branch 198 taken 1320 times.
✗ Branch 199 not taken.
✓ Branch 203 taken 1320 times.
✗ Branch 204 not taken.
✓ Branch 208 taken 1320 times.
✗ Branch 209 not taken.
✓ Branch 213 taken 360 times.
✗ Branch 214 not taken.
✓ Branch 218 taken 360 times.
✗ Branch 219 not taken.
✓ Branch 223 taken 360 times.
✗ Branch 224 not taken.
✓ Branch 228 taken 360 times.
✗ Branch 229 not taken.
✓ Branch 233 taken 360 times.
✗ Branch 234 not taken.
✓ Branch 238 taken 360 times.
✗ Branch 239 not taken.
2001597 EntityFieldsDetail::fill_buffer<ValueType>(field_function(e), cur_values.data(), offset);
78 });
79 159204 }
80
81 template<bool is_point_data,
82 typename ValueType,
83 typename Grid,
84 typename F>
85 159204 void fill_structured(const Grid& grid,
86 const F& field_function,
87 const MDLayout& layout,
88 Serialization& serialization) {
89 if constexpr (Concepts::StructuredEntitySet<Grid>) {
90 if constexpr (is_point_data)
91
4/7
✓ Branch 1 taken 41128 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 142 times.
✓ Branch 5 taken 40986 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 142 times.
✗ Branch 8 not taken.
82256 fill_structured<ValueType>(grid, points(grid), point_extents(grid), field_function, layout, serialization);
92 else
93
4/7
✓ Branch 1 taken 122 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 38352 times.
✓ Branch 4 taken 122 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 122 times.
✗ Branch 8 not taken.
76948 fill_structured<ValueType>(grid, cells(grid), extents(grid), field_function, layout, serialization);
94 } else {
95 throw TypeError("Only structured grids can be used for entity fields with structured grid ordering");
96 }
97 159204 }
98
99 } // namespace EntityFieldsDetail
100 #endif // DOXYGEN
101
102
103 /*!
104 * \ingroup Grid
105 * \brief Field implementation for data on grid points.
106 */
107 template<Concepts::Grid Grid,
108 Concepts::PointFunction<Grid> FieldFunction,
109 Concepts::Scalar ValueType = GridDetail::PointFunctionScalarType<Grid, FieldFunction>>
110 class PointField : public Field {
111 using FieldType = GridDetail::PointFunctionValueType<Grid, FieldFunction>;
112
113 public:
114 88722 explicit PointField(const Grid& grid,
115 FieldFunction&& field_function,
116 bool use_structured_grid_ordering,
117 const Precision<ValueType>& = {})
118 88722 : _grid{grid}
119 177180 , _field_function{std::move(field_function)}
120 88722 , _write_structured{use_structured_grid_ordering}
121 88722 {}
122
123 private:
124 std::size_t _size_in_bytes() const {
125 return _size_in_bytes(_layout());
126 }
127
128 90842 std::size_t _size_in_bytes(const MDLayout& layout) const {
129 90842 return layout.number_of_entries()*sizeof(ValueType);
130 }
131
132 975626 MDLayout _layout() const override {
133
7/11
✓ Branch 1 taken 6065 times.
✓ Branch 2 taken 481796 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 6065 times.
✓ Branch 5 taken 481796 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 6065 times.
✓ Branch 8 taken 481796 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 6065 times.
✗ Branch 11 not taken.
975626 return MDLayout{{number_of_points(_grid)}}.template with_sub_layout_from<FieldType>();
134 }
135
136 351406 DynamicPrecision _precision() const override {
137 351406 return DynamicPrecision{Precision<ValueType>{}};
138 }
139
140 90842 Serialization _serialized() const override {
141
1/2
✓ Branch 1 taken 45425 times.
✗ Branch 2 not taken.
90842 const auto layout = _layout();
142
2/4
✓ Branch 1 taken 45425 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 45425 times.
✗ Branch 5 not taken.
90842 Serialization serialization(_size_in_bytes(layout));
143
1/2
✓ Branch 1 taken 45425 times.
✗ Branch 2 not taken.
90842 _fill(serialization, layout);
144 90842 return serialization;
145 90842 }
146
147 90842 void _fill(Serialization& serialization, const MDLayout& layout) const {
148
2/2
✓ Branch 0 taken 41128 times.
✓ Branch 1 taken 4297 times.
90842 if (_write_structured) {
149 82248 EntityFieldsDetail::fill_structured<true, ValueType>(_grid, _field_function, layout, serialization);
150 } else {
151 8594 std::size_t offset = 0;
152 8594 std::byte* buffer = serialization.as_span().data();
153
3/5
✓ Branch 1 taken 625 times.
✓ Branch 2 taken 3672 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 625 times.
✗ Branch 5 not taken.
275284 std::ranges::for_each(points(_grid), [&] (const auto& p) {
154
232/384
✗ Branch 1 not taken.
✓ Branch 2 taken 2850 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 2971 times.
✓ Branch 7 taken 14238 times.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 15600 times.
✓ Branch 11 taken 744 times.
✓ Branch 12 taken 750 times.
✓ Branch 13 taken 18674 times.
✓ Branch 14 taken 3541 times.
✓ Branch 15 taken 3486 times.
✓ Branch 16 taken 18674 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 9489 times.
✓ Branch 19 taken 9904 times.
✗ Branch 20 not taken.
✓ Branch 21 taken 1683 times.
✓ Branch 22 taken 13585 times.
✗ Branch 23 not taken.
✓ Branch 24 taken 1683 times.
✓ Branch 25 taken 1607 times.
✓ Branch 26 taken 3725 times.
✓ Branch 27 taken 3191 times.
✓ Branch 28 taken 1607 times.
✗ Branch 29 not taken.
✓ Branch 30 taken 6532 times.
✓ Branch 31 taken 1035 times.
✗ Branch 32 not taken.
✓ Branch 33 taken 2213 times.
✓ Branch 34 taken 3635 times.
✗ Branch 35 not taken.
✓ Branch 36 taken 2213 times.
✓ Branch 37 taken 671 times.
✓ Branch 38 taken 1154 times.
✓ Branch 39 taken 973 times.
✓ Branch 40 taken 671 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 5169 times.
✓ Branch 43 taken 421 times.
✗ Branch 44 not taken.
✓ Branch 45 taken 3078 times.
✓ Branch 46 taken 1822 times.
✗ Branch 47 not taken.
✓ Branch 48 taken 3078 times.
✓ Branch 49 taken 1440 times.
✓ Branch 50 taken 1064 times.
✓ Branch 51 taken 3078 times.
✓ Branch 52 taken 1440 times.
✗ Branch 53 not taken.
✓ Branch 54 taken 3428 times.
✓ Branch 55 taken 721 times.
✗ Branch 56 not taken.
✓ Branch 57 taken 96 times.
✓ Branch 58 taken 877 times.
✗ Branch 59 not taken.
✓ Branch 60 taken 96 times.
✓ Branch 61 taken 393 times.
✓ Branch 62 taken 182 times.
✓ Branch 63 taken 1575 times.
✓ Branch 64 taken 393 times.
✗ Branch 65 not taken.
✓ Branch 66 taken 1763 times.
✓ Branch 67 taken 250 times.
✗ Branch 68 not taken.
✓ Branch 69 taken 24 times.
✓ Branch 70 taken 438 times.
✗ Branch 71 not taken.
✓ Branch 72 taken 24 times.
✓ Branch 73 taken 250 times.
✓ Branch 74 taken 84 times.
✓ Branch 75 taken 24 times.
✓ Branch 76 taken 250 times.
✗ Branch 77 not taken.
✓ Branch 78 taken 108 times.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✓ Branch 81 taken 12 times.
✓ Branch 82 taken 84 times.
✗ Branch 83 not taken.
✓ Branch 84 taken 12 times.
✓ Branch 85 taken 757 times.
✓ Branch 86 taken 45 times.
✓ Branch 87 taken 12 times.
✓ Branch 88 taken 757 times.
✗ Branch 89 not taken.
✓ Branch 90 taken 57 times.
✓ Branch 91 taken 814 times.
✗ Branch 92 not taken.
✓ Branch 93 taken 24 times.
✓ Branch 94 taken 859 times.
✗ Branch 95 not taken.
✓ Branch 96 taken 24 times.
✓ Branch 97 taken 3840 times.
✓ Branch 98 taken 166 times.
✓ Branch 99 taken 36 times.
✓ Branch 100 taken 3840 times.
✗ Branch 101 not taken.
✓ Branch 102 taken 202 times.
✗ Branch 103 not taken.
✗ Branch 104 not taken.
✓ Branch 105 taken 96 times.
✓ Branch 106 taken 166 times.
✗ Branch 107 not taken.
✓ Branch 108 taken 96 times.
✗ Branch 109 not taken.
✓ Branch 110 taken 166 times.
✓ Branch 111 taken 117 times.
✗ Branch 112 not taken.
✗ Branch 113 not taken.
✓ Branch 114 taken 283 times.
✗ Branch 115 not taken.
✗ Branch 116 not taken.
✓ Branch 117 taken 701 times.
✓ Branch 118 taken 166 times.
✗ Branch 119 not taken.
✓ Branch 120 taken 701 times.
✗ Branch 121 not taken.
✓ Branch 122 taken 109 times.
✓ Branch 123 taken 1121 times.
✗ Branch 124 not taken.
✗ Branch 125 not taken.
✓ Branch 126 taken 1230 times.
✗ Branch 127 not taken.
✗ Branch 128 not taken.
✓ Branch 129 taken 3016 times.
✓ Branch 130 taken 109 times.
✗ Branch 131 not taken.
✓ Branch 132 taken 3016 times.
✗ Branch 133 not taken.
✓ Branch 134 taken 109 times.
✓ Branch 135 taken 24 times.
✗ Branch 136 not taken.
✗ Branch 137 not taken.
✓ Branch 138 taken 253 times.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
✓ Branch 141 taken 96 times.
✓ Branch 142 taken 229 times.
✗ Branch 143 not taken.
✓ Branch 144 taken 96 times.
✓ Branch 145 taken 48 times.
✓ Branch 146 taken 210 times.
✗ Branch 147 not taken.
✓ Branch 148 taken 48 times.
✗ Branch 149 not taken.
✓ Branch 150 taken 210 times.
✓ Branch 151 taken 48 times.
✗ Branch 152 not taken.
✓ Branch 154 taken 258 times.
✗ Branch 155 not taken.
✓ Branch 157 taken 16 times.
✓ Branch 158 taken 210 times.
✗ Branch 159 not taken.
✓ Branch 160 taken 16 times.
✗ Branch 161 not taken.
✓ Branch 162 taken 210 times.
✓ Branch 163 taken 48 times.
✗ Branch 164 not taken.
✓ Branch 166 taken 258 times.
✗ Branch 167 not taken.
✓ Branch 169 taken 48 times.
✓ Branch 170 taken 210 times.
✗ Branch 171 not taken.
✓ Branch 172 taken 48 times.
✗ Branch 173 not taken.
✓ Branch 174 taken 210 times.
✓ Branch 175 taken 16 times.
✗ Branch 176 not taken.
✓ Branch 178 taken 226 times.
✗ Branch 179 not taken.
✓ Branch 181 taken 48 times.
✓ Branch 182 taken 210 times.
✗ Branch 183 not taken.
✓ Branch 184 taken 48 times.
✗ Branch 185 not taken.
✓ Branch 186 taken 210 times.
✓ Branch 187 taken 48 times.
✗ Branch 188 not taken.
✓ Branch 190 taken 258 times.
✗ Branch 191 not taken.
✓ Branch 193 taken 16 times.
✓ Branch 194 taken 210 times.
✗ Branch 195 not taken.
✓ Branch 196 taken 16 times.
✗ Branch 197 not taken.
✓ Branch 198 taken 210 times.
✓ Branch 199 taken 12 times.
✗ Branch 200 not taken.
✓ Branch 202 taken 222 times.
✗ Branch 203 not taken.
✓ Branch 205 taken 12 times.
✓ Branch 206 taken 210 times.
✗ Branch 207 not taken.
✓ Branch 208 taken 12 times.
✗ Branch 209 not taken.
✓ Branch 210 taken 180 times.
✓ Branch 211 taken 8 times.
✗ Branch 212 not taken.
✓ Branch 214 taken 188 times.
✗ Branch 215 not taken.
✓ Branch 217 taken 12 times.
✓ Branch 218 taken 300 times.
✗ Branch 219 not taken.
✓ Branch 220 taken 12 times.
✗ Branch 221 not taken.
✓ Branch 222 taken 300 times.
✓ Branch 223 taken 12 times.
✗ Branch 224 not taken.
✓ Branch 226 taken 312 times.
✗ Branch 227 not taken.
✓ Branch 229 taken 8 times.
✓ Branch 230 taken 300 times.
✗ Branch 231 not taken.
✓ Branch 232 taken 8 times.
✗ Branch 233 not taken.
✓ Branch 234 taken 300 times.
✓ Branch 235 taken 12 times.
✗ Branch 236 not taken.
✓ Branch 238 taken 312 times.
✗ Branch 239 not taken.
✓ Branch 241 taken 12 times.
✓ Branch 242 taken 300 times.
✗ Branch 243 not taken.
✓ Branch 244 taken 12 times.
✗ Branch 245 not taken.
✓ Branch 246 taken 300 times.
✓ Branch 247 taken 8 times.
✗ Branch 248 not taken.
✓ Branch 250 taken 308 times.
✗ Branch 251 not taken.
✓ Branch 253 taken 18 times.
✓ Branch 254 taken 300 times.
✗ Branch 255 not taken.
✓ Branch 256 taken 18 times.
✗ Branch 257 not taken.
✓ Branch 258 taken 165 times.
✓ Branch 259 taken 18 times.
✗ Branch 260 not taken.
✓ Branch 262 taken 183 times.
✗ Branch 263 not taken.
✓ Branch 265 taken 12 times.
✓ Branch 266 taken 165 times.
✗ Branch 267 not taken.
✓ Branch 268 taken 12 times.
✗ Branch 269 not taken.
✓ Branch 270 taken 165 times.
✓ Branch 271 taken 12 times.
✗ Branch 272 not taken.
✓ Branch 274 taken 177 times.
✗ Branch 275 not taken.
✓ Branch 277 taken 12 times.
✓ Branch 278 taken 165 times.
✗ Branch 279 not taken.
✓ Branch 280 taken 12 times.
✗ Branch 281 not taken.
✓ Branch 282 taken 165 times.
✓ Branch 283 taken 8 times.
✗ Branch 284 not taken.
✓ Branch 286 taken 173 times.
✗ Branch 287 not taken.
✓ Branch 289 taken 8 times.
✓ Branch 290 taken 135 times.
✗ Branch 291 not taken.
✓ Branch 292 taken 8 times.
✗ Branch 293 not taken.
✓ Branch 294 taken 135 times.
✓ Branch 295 taken 8 times.
✗ Branch 296 not taken.
✓ Branch 298 taken 143 times.
✗ Branch 299 not taken.
✓ Branch 301 taken 4 times.
✓ Branch 302 taken 135 times.
✗ Branch 303 not taken.
✓ Branch 304 taken 4 times.
✗ Branch 305 not taken.
✓ Branch 306 taken 135 times.
✓ Branch 307 taken 8 times.
✗ Branch 308 not taken.
✓ Branch 310 taken 143 times.
✗ Branch 311 not taken.
✓ Branch 313 taken 8 times.
✓ Branch 314 taken 135 times.
✗ Branch 315 not taken.
✓ Branch 316 taken 8 times.
✗ Branch 317 not taken.
✓ Branch 318 taken 135 times.
✓ Branch 319 taken 8 times.
✗ Branch 320 not taken.
✓ Branch 322 taken 143 times.
✗ Branch 323 not taken.
✓ Branch 325 taken 16 times.
✓ Branch 326 taken 135 times.
✗ Branch 327 not taken.
✓ Branch 328 taken 16 times.
✗ Branch 329 not taken.
✓ Branch 330 taken 135 times.
✓ Branch 331 taken 16 times.
✗ Branch 332 not taken.
✓ Branch 334 taken 151 times.
✗ Branch 335 not taken.
✓ Branch 337 taken 16 times.
✓ Branch 338 taken 165 times.
✗ Branch 339 not taken.
✓ Branch 340 taken 16 times.
✗ Branch 341 not taken.
✓ Branch 342 taken 165 times.
✓ Branch 343 taken 12 times.
✗ Branch 344 not taken.
✓ Branch 346 taken 177 times.
✗ Branch 347 not taken.
✓ Branch 349 taken 12 times.
✓ Branch 350 taken 165 times.
✗ Branch 351 not taken.
✓ Branch 352 taken 12 times.
✗ Branch 353 not taken.
✓ Branch 354 taken 165 times.
✓ Branch 355 taken 12 times.
✗ Branch 356 not taken.
✓ Branch 358 taken 177 times.
✗ Branch 359 not taken.
✓ Branch 361 taken 12 times.
✗ Branch 362 not taken.
✓ Branch 364 taken 12 times.
✗ Branch 365 not taken.
✓ Branch 367 taken 6 times.
✗ Branch 368 not taken.
✓ Branch 370 taken 6 times.
✗ Branch 371 not taken.
✓ Branch 373 taken 6 times.
✗ Branch 374 not taken.
✓ Branch 376 taken 6 times.
✗ Branch 377 not taken.
✓ Branch 379 taken 12 times.
✗ Branch 380 not taken.
✓ Branch 382 taken 12 times.
✗ Branch 383 not taken.
✓ Branch 385 taken 12 times.
✗ Branch 386 not taken.
✓ Branch 388 taken 12 times.
✗ Branch 389 not taken.
✓ Branch 391 taken 12 times.
✗ Branch 392 not taken.
✓ Branch 394 taken 12 times.
✗ Branch 395 not taken.
✓ Branch 397 taken 12 times.
✗ Branch 398 not taken.
✓ Branch 400 taken 12 times.
✗ Branch 401 not taken.
✓ Branch 403 taken 12 times.
✗ Branch 404 not taken.
✓ Branch 406 taken 12 times.
✗ Branch 407 not taken.
✓ Branch 409 taken 12 times.
✗ Branch 410 not taken.
✓ Branch 412 taken 12 times.
✗ Branch 413 not taken.
✓ Branch 415 taken 48 times.
✗ Branch 416 not taken.
✓ Branch 418 taken 48 times.
✗ Branch 419 not taken.
✓ Branch 421 taken 48 times.
✗ Branch 422 not taken.
✓ Branch 424 taken 48 times.
✗ Branch 425 not taken.
✓ Branch 427 taken 48 times.
✗ Branch 428 not taken.
✓ Branch 430 taken 48 times.
✗ Branch 431 not taken.
✓ Branch 433 taken 48 times.
✗ Branch 434 not taken.
✓ Branch 436 taken 48 times.
✗ Branch 437 not taken.
✓ Branch 439 taken 48 times.
✗ Branch 440 not taken.
✓ Branch 442 taken 48 times.
✗ Branch 443 not taken.
✓ Branch 445 taken 48 times.
✗ Branch 446 not taken.
✓ Branch 448 taken 48 times.
✗ Branch 449 not taken.
133345 EntityFieldsDetail::fill_buffer<ValueType>(_field_function(p), buffer, offset);
155 });
156 }
157 90842 }
158
159 const Grid& _grid;
160 FieldFunction _field_function;
161 bool _write_structured;
162 };
163
164 /*!
165 * \ingroup Grid
166 * \brief Field implementation for data on grid cells.
167 */
168 template<typename Grid,
169 Concepts::CellFunction<Grid> FieldFunction,
170 Concepts::Scalar ValueType = GridDetail::CellFunctionScalarType<Grid, FieldFunction>>
171 class CellField : public Field {
172 using FieldType = GridDetail::CellFunctionValueType<Grid, FieldFunction>;
173
174 public:
175 82327 explicit CellField(const Grid& grid,
176 FieldFunction&& field_function,
177 bool use_structured_grid_ordering,
178 const Precision<ValueType>& = {})
179 82327 : _grid{grid}
180 164442 , _field_function{std::move(field_function)}
181 82327 , _write_structured{use_structured_grid_ordering}
182 82327 {}
183
184 private:
185 std::size_t _size_in_bytes() const {
186 return _size_in_bytes(_layout());
187 }
188
189 85045 std::size_t _size_in_bytes(const MDLayout& layout) const {
190 85045 return layout.number_of_entries()*sizeof(ValueType);
191 }
192
193 940639 MDLayout _layout() const override {
194
7/11
✓ Branch 1 taken 5051 times.
✓ Branch 2 taken 465331 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 5051 times.
✓ Branch 5 taken 465331 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 5051 times.
✓ Branch 8 taken 465331 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 5051 times.
✗ Branch 11 not taken.
940639 return MDLayout{{number_of_cells(_grid)}}.template with_sub_layout_from<FieldType>();
195 }
196
197 325008 DynamicPrecision _precision() const override {
198 325008 return DynamicPrecision{Precision<ValueType>{}};
199 }
200
201 85045 Serialization _serialized() const override {
202
1/2
✓ Branch 1 taken 42530 times.
✗ Branch 2 not taken.
85045 const auto layout = _layout();
203
2/4
✓ Branch 1 taken 42530 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 42530 times.
✗ Branch 5 not taken.
85045 Serialization serialization(_size_in_bytes(layout));
204
1/2
✓ Branch 1 taken 42530 times.
✗ Branch 2 not taken.
85045 _fill(serialization, layout);
205 85045 return serialization;
206 85045 }
207
208 85045 void _fill(Serialization& serialization, const MDLayout& layout) const {
209
2/2
✓ Branch 0 taken 38474 times.
✓ Branch 1 taken 4056 times.
85045 if (_write_structured) {
210 76940 EntityFieldsDetail::fill_structured<false, ValueType>(_grid, _field_function, layout, serialization);
211 } else {
212 8105 std::size_t offset = 0;
213 8105 std::byte* buffer = serialization.as_span().data();
214
3/5
✓ Branch 1 taken 570 times.
✓ Branch 2 taken 3486 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 570 times.
✗ Branch 5 not taken.
162323 std::ranges::for_each(cells(_grid), [&] (const auto& c) {
215
157/260
✓ Branch 1 taken 24771 times.
✓ Branch 2 taken 143 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 24771 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 143 times.
✓ Branch 7 taken 18411 times.
✓ Branch 8 taken 1272 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 18554 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 1272 times.
✓ Branch 13 taken 970 times.
✓ Branch 14 taken 801 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 2242 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 801 times.
✓ Branch 19 taken 882 times.
✓ Branch 20 taken 1272 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 1683 times.
✗ Branch 23 not taken.
✓ Branch 24 taken 1272 times.
✓ Branch 25 taken 3406 times.
✓ Branch 26 taken 706 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 4678 times.
✗ Branch 29 not taken.
✓ Branch 30 taken 706 times.
✓ Branch 31 taken 2552 times.
✗ Branch 32 not taken.
✗ Branch 33 not taken.
✓ Branch 34 taken 3258 times.
✗ Branch 35 not taken.
✗ Branch 36 not taken.
✓ Branch 37 taken 503 times.
✓ Branch 38 taken 59 times.
✗ Branch 39 not taken.
✓ Branch 40 taken 503 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 59 times.
✓ Branch 43 taken 503 times.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✓ Branch 46 taken 562 times.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✓ Branch 49 taken 127 times.
✓ Branch 50 taken 59 times.
✗ Branch 51 not taken.
✓ Branch 52 taken 127 times.
✗ Branch 53 not taken.
✓ Branch 54 taken 59 times.
✓ Branch 55 taken 293 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 352 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 110 times.
✓ Branch 62 taken 45 times.
✗ Branch 63 not taken.
✓ Branch 64 taken 110 times.
✗ Branch 65 not taken.
✓ Branch 66 taken 45 times.
✓ Branch 67 taken 496 times.
✓ Branch 68 taken 100 times.
✗ Branch 69 not taken.
✓ Branch 70 taken 541 times.
✗ Branch 71 not taken.
✓ Branch 72 taken 100 times.
✓ Branch 73 taken 502 times.
✓ Branch 74 taken 150 times.
✗ Branch 75 not taken.
✓ Branch 76 taken 602 times.
✗ Branch 77 not taken.
✓ Branch 78 taken 150 times.
✓ Branch 79 taken 22 times.
✓ Branch 80 taken 100 times.
✗ Branch 81 not taken.
✓ Branch 82 taken 172 times.
✗ Branch 83 not taken.
✓ Branch 84 taken 100 times.
✓ Branch 85 taken 40 times.
✓ Branch 86 taken 150 times.
✗ Branch 87 not taken.
✓ Branch 88 taken 140 times.
✗ Branch 89 not taken.
✓ Branch 90 taken 150 times.
✓ Branch 91 taken 40 times.
✓ Branch 92 taken 27 times.
✗ Branch 93 not taken.
✓ Branch 94 taken 190 times.
✗ Branch 95 not taken.
✓ Branch 96 taken 27 times.
✓ Branch 97 taken 442 times.
✓ Branch 98 taken 150 times.
✗ Branch 99 not taken.
✓ Branch 100 taken 469 times.
✗ Branch 101 not taken.
✓ Branch 102 taken 150 times.
✓ Branch 103 taken 442 times.
✓ Branch 104 taken 27 times.
✗ Branch 105 not taken.
✓ Branch 106 taken 592 times.
✗ Branch 107 not taken.
✓ Branch 108 taken 27 times.
✓ Branch 109 taken 1030 times.
✓ Branch 110 taken 150 times.
✗ Branch 111 not taken.
✓ Branch 112 taken 1057 times.
✗ Branch 113 not taken.
✓ Branch 114 taken 150 times.
✓ Branch 115 taken 1030 times.
✓ Branch 116 taken 45 times.
✗ Branch 117 not taken.
✓ Branch 118 taken 1180 times.
✗ Branch 119 not taken.
✓ Branch 120 taken 45 times.
✓ Branch 121 taken 4 times.
✓ Branch 122 taken 150 times.
✗ Branch 123 not taken.
✓ Branch 124 taken 49 times.
✗ Branch 125 not taken.
✓ Branch 126 taken 150 times.
✓ Branch 127 taken 4 times.
✓ Branch 128 taken 45 times.
✗ Branch 129 not taken.
✓ Branch 130 taken 154 times.
✗ Branch 131 not taken.
✓ Branch 132 taken 45 times.
✓ Branch 133 taken 4 times.
✓ Branch 134 taken 150 times.
✗ Branch 135 not taken.
✓ Branch 136 taken 49 times.
✗ Branch 137 not taken.
✓ Branch 138 taken 150 times.
✓ Branch 139 taken 4 times.
✓ Branch 140 taken 45 times.
✗ Branch 141 not taken.
✓ Branch 142 taken 154 times.
✗ Branch 143 not taken.
✓ Branch 144 taken 45 times.
✓ Branch 145 taken 4 times.
✓ Branch 146 taken 45 times.
✗ Branch 147 not taken.
✓ Branch 148 taken 49 times.
✗ Branch 149 not taken.
✓ Branch 150 taken 45 times.
✓ Branch 151 taken 4 times.
✓ Branch 152 taken 45 times.
✗ Branch 153 not taken.
✓ Branch 154 taken 49 times.
✗ Branch 155 not taken.
✓ Branch 156 taken 45 times.
✓ Branch 157 taken 2 times.
✓ Branch 158 taken 45 times.
✗ Branch 159 not taken.
✓ Branch 160 taken 47 times.
✗ Branch 161 not taken.
✓ Branch 162 taken 45 times.
✓ Branch 163 taken 4 times.
✓ Branch 164 taken 45 times.
✗ Branch 165 not taken.
✓ Branch 166 taken 49 times.
✗ Branch 167 not taken.
✓ Branch 168 taken 45 times.
✓ Branch 169 taken 4 times.
✓ Branch 170 taken 45 times.
✗ Branch 171 not taken.
✓ Branch 172 taken 49 times.
✗ Branch 173 not taken.
✓ Branch 174 taken 45 times.
✓ Branch 175 taken 4 times.
✓ Branch 176 taken 45 times.
✗ Branch 177 not taken.
✓ Branch 178 taken 49 times.
✗ Branch 179 not taken.
✓ Branch 180 taken 45 times.
✓ Branch 181 taken 12 times.
✓ Branch 182 taken 45 times.
✗ Branch 183 not taken.
✓ Branch 184 taken 57 times.
✗ Branch 185 not taken.
✓ Branch 186 taken 45 times.
✓ Branch 187 taken 12 times.
✓ Branch 188 taken 150 times.
✗ Branch 189 not taken.
✓ Branch 190 taken 57 times.
✗ Branch 191 not taken.
✓ Branch 192 taken 150 times.
✓ Branch 193 taken 12 times.
✗ Branch 194 not taken.
✓ Branch 196 taken 162 times.
✗ Branch 197 not taken.
✓ Branch 200 taken 150 times.
✗ Branch 201 not taken.
✓ Branch 204 taken 150 times.
✗ Branch 205 not taken.
✓ Branch 208 taken 150 times.
✗ Branch 209 not taken.
✓ Branch 212 taken 150 times.
✗ Branch 213 not taken.
✓ Branch 216 taken 150 times.
✗ Branch 217 not taken.
✓ Branch 220 taken 150 times.
✗ Branch 221 not taken.
✓ Branch 224 taken 150 times.
✗ Branch 225 not taken.
✓ Branch 228 taken 150 times.
✗ Branch 229 not taken.
✓ Branch 232 taken 150 times.
✗ Branch 233 not taken.
✓ Branch 236 taken 150 times.
✗ Branch 237 not taken.
✓ Branch 240 taken 150 times.
✗ Branch 241 not taken.
✓ Branch 244 taken 150 times.
✗ Branch 245 not taken.
✓ Branch 248 taken 150 times.
✗ Branch 249 not taken.
✓ Branch 252 taken 150 times.
✗ Branch 253 not taken.
✓ Branch 256 taken 150 times.
✗ Branch 257 not taken.
✓ Branch 260 taken 45 times.
✗ Branch 261 not taken.
✓ Branch 264 taken 45 times.
✗ Branch 265 not taken.
✓ Branch 268 taken 45 times.
✗ Branch 269 not taken.
✓ Branch 272 taken 45 times.
✗ Branch 273 not taken.
✓ Branch 276 taken 45 times.
✗ Branch 277 not taken.
✓ Branch 280 taken 45 times.
✗ Branch 281 not taken.
✓ Branch 284 taken 45 times.
✗ Branch 285 not taken.
✓ Branch 288 taken 45 times.
✗ Branch 289 not taken.
✓ Branch 292 taken 45 times.
✗ Branch 293 not taken.
✓ Branch 296 taken 45 times.
✗ Branch 297 not taken.
✓ Branch 300 taken 45 times.
✗ Branch 301 not taken.
✓ Branch 304 taken 45 times.
✗ Branch 305 not taken.
✓ Branch 308 taken 30 times.
✗ Branch 309 not taken.
✓ Branch 312 taken 30 times.
✗ Branch 313 not taken.
✓ Branch 316 taken 30 times.
✗ Branch 317 not taken.
✓ Branch 320 taken 30 times.
✗ Branch 321 not taken.
✓ Branch 324 taken 30 times.
✗ Branch 325 not taken.
✓ Branch 328 taken 30 times.
✗ Branch 329 not taken.
77949 EntityFieldsDetail::fill_buffer<ValueType>(_field_function(c), buffer, offset);
216 });
217 }
218 85045 }
219
220 const Grid& _grid;
221 FieldFunction _field_function;
222 bool _write_structured;
223 };
224
225 } // namespace GridFormat
226
227 #endif // GRIDFORMAT_GRID_ENTITY_FIELDS_HPP_
228