Line | Branch | Exec | Source |
---|---|---|---|
1 | // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- | ||
2 | // vi: set et ts=4 sw=4 sts=4: | ||
3 | // | ||
4 | // SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder | ||
5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
6 | // | ||
7 | /*! | ||
8 | * \file | ||
9 | * \ingroup InputOutput | ||
10 | * \brief Dune style VTK functions | ||
11 | */ | ||
12 | #ifndef DUMUX_IO_VTK_FUNCTION_HH | ||
13 | #define DUMUX_IO_VTK_FUNCTION_HH | ||
14 | |||
15 | #include <string> | ||
16 | #include <memory> | ||
17 | |||
18 | #include <dune/common/typetraits.hh> | ||
19 | #include <dune/common/fvector.hh> | ||
20 | #include <dune/common/reservedvector.hh> | ||
21 | |||
22 | #include <dune/grid/common/mcmgmapper.hh> | ||
23 | #include <dune/grid/io/file/vtk/common.hh> | ||
24 | #include <dune/grid/io/file/vtk/function.hh> | ||
25 | |||
26 | #include <dumux/io/vtk/precision.hh> | ||
27 | #include <dumux/discretization/nonconformingfecache.hh> | ||
28 | |||
29 | namespace Dumux::Vtk { | ||
30 | |||
31 | namespace Detail { | ||
32 | |||
33 | template<class Field> | ||
34 | ✗ | double accessEntry(const Field& f, [[maybe_unused]] int mycomp, [[maybe_unused]] int i) | |
35 | { | ||
36 | if constexpr (Dune::IsIndexable<std::decay_t<decltype(std::declval<Field>()[0])>>{}) | ||
37 | { | ||
38 | if constexpr (Dune::IsIndexable<std::decay_t<decltype(std::declval<Field>()[0][0])>>{}) | ||
39 | ✗ | DUNE_THROW(Dune::InvalidStateException, "Invalid field type"); | |
40 | else | ||
41 | 3364480 | return f[i][mycomp]; | |
42 | } | ||
43 | else | ||
44 | 253755658 | return f[i]; | |
45 | } | ||
46 | |||
47 | } // end namespace Detail | ||
48 | |||
49 | /*! | ||
50 | * \ingroup InputOutput | ||
51 | * \brief a VTK function that supports both scalar and vector values for each element | ||
52 | * | ||
53 | * \tparam GridView The Dune grid view type | ||
54 | * \tparam Mapper The type used for mapping elements to indices in the field | ||
55 | * \tparam F The field type (either vector of scalars or vectors) | ||
56 | */ | ||
57 | template <typename GridView, typename Mapper, typename F> | ||
58 | struct VectorP0VTKFunction : Dune::VTKFunction<GridView> | ||
59 | { | ||
60 | enum { dim = GridView::dimension }; | ||
61 | using ctype = typename GridView::ctype; | ||
62 | using Element = typename GridView::template Codim<0>::Entity; | ||
63 | |||
64 | public: | ||
65 | |||
66 | //! return number of components | ||
67 | 361478 | int ncomps() const final { return nComps_; } | |
68 | |||
69 | //! get name | ||
70 | 123545 | std::string name() const final { return name_; } | |
71 | |||
72 | //! evaluate | ||
73 | 116444582 | double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>&) const final | |
74 | 122084358 | { return Detail::accessEntry(field_, mycomp, mapper_.index(e)); } | |
75 | |||
76 | //! get output precision for the field | ||
77 | 123545 | Dumux::Vtk::Precision precision() const final | |
78 | 123545 | { return precision_; } | |
79 | |||
80 | //! Constructor | ||
81 | 112723 | VectorP0VTKFunction(const GridView& gridView, | |
82 | const Mapper& mapper, | ||
83 | const F& field, | ||
84 | const std::string& name, | ||
85 | int nComps, | ||
86 | Dumux::Vtk::Precision precision = Dumux::Vtk::Precision::float32) | ||
87 |
0/2✗ Branch 1 not taken.
✗ Branch 2 not taken.
|
112723 | : field_(field), name_(name), nComps_(nComps), mapper_(mapper), precision_(precision) |
88 | { | ||
89 |
5/8✓ Branch 0 taken 532 times.
✓ Branch 1 taken 55838 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 56370 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 47128 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 532 times.
|
320761 | if (field.size()!=(unsigned int)(mapper.size())) |
90 | ✗ | DUNE_THROW(Dune::IOError, "VectorP0VTKFunction: size mismatch between field " | |
91 | << name << " (" << field.size() << ") and mapper (" << mapper.size() << ")"); | ||
92 | 112723 | } | |
93 | |||
94 | private: | ||
95 | const F& field_; | ||
96 | const std::string name_; | ||
97 | int nComps_; | ||
98 | const Mapper& mapper_; | ||
99 | Dumux::Vtk::Precision precision_; | ||
100 | }; | ||
101 | |||
102 | /*! | ||
103 | * \ingroup InputOutput | ||
104 | * \brief a VTK function that supports both scalar and vector values for each vertex | ||
105 | * | ||
106 | * \tparam GridView The Dune grid view type | ||
107 | * \tparam Mapper The type used for mapping vertices to indices in the field | ||
108 | * \tparam F The field type (either vector of scalars or vectors) | ||
109 | */ | ||
110 | template <typename GridView, typename Mapper, typename F> | ||
111 | struct VectorP1VTKFunction : Dune::VTKFunction<GridView> | ||
112 | { | ||
113 | enum { dim = GridView::dimension }; | ||
114 | using ctype = typename GridView::ctype; | ||
115 | using Element = typename GridView::template Codim<0>::Entity; | ||
116 | |||
117 | public: | ||
118 | |||
119 | //! return number of components | ||
120 | 187021 | int ncomps() const final { return nComps_; } | |
121 | |||
122 | //! get name | ||
123 | 62776 | std::string name() const final { return name_; } | |
124 | |||
125 | //! evaluate | ||
126 | 41117438 | double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& xi) const final | |
127 | { | ||
128 | 41117438 | const unsigned int dim = Element::mydimension; | |
129 | 41117438 | const unsigned int nVertices = e.subEntities(dim); | |
130 | |||
131 |
0/2✗ Branch 3 not taken.
✗ Branch 4 not taken.
|
123352314 | std::vector<Dune::FieldVector<ctype, 1>> cornerValues(nVertices); |
132 |
2/2✓ Branch 0 taken 80708926 times.
✓ Branch 1 taken 20562553 times.
|
202506394 | for (unsigned i = 0; i < nVertices; ++i) |
133 |
1/2✓ Branch 1 taken 80708584 times.
✗ Branch 2 not taken.
|
161388956 | cornerValues[i] = Detail::accessEntry(field_, mycomp, mapper_.subIndex(e, i, dim)); |
134 | |||
135 | // (Ab)use the MultiLinearGeometry class to do multi-linear interpolation between scalars | ||
136 |
3/6✓ Branch 1 taken 20562553 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20562553 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 20562553 times.
✗ Branch 7 not taken.
|
121310188 | const Dune::MultiLinearGeometry<ctype, dim, 1> interpolation(e.type(), std::move(cornerValues)); |
137 |
1/2✓ Branch 1 taken 20562553 times.
✗ Branch 2 not taken.
|
82234876 | return interpolation.global(xi); |
138 | } | ||
139 | |||
140 | //! get output precision for the field | ||
141 | 62776 | Dumux::Vtk::Precision precision() const final | |
142 | 62776 | { return precision_; } | |
143 | |||
144 | //! Constructor | ||
145 | 58436 | VectorP1VTKFunction(const GridView& gridView, | |
146 | const Mapper& mapper, | ||
147 | const F& field, | ||
148 | const std::string& name, | ||
149 | int nComps, | ||
150 | Dumux::Vtk::Precision precision = Dumux::Vtk::Precision::float32) | ||
151 |
0/2✗ Branch 1 not taken.
✗ Branch 2 not taken.
|
58436 | : field_(field), name_(name), nComps_(nComps), mapper_(mapper), precision_(precision) |
152 | { | ||
153 |
5/8✗ Branch 0 not taken.
✓ Branch 1 taken 29219 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 29207 times.
✓ Branch 4 taken 12 times.
✓ Branch 5 taken 19826 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 12 times.
|
156548 | if (field.size()!=(unsigned int)( mapper.size() )) |
154 | ✗ | DUNE_THROW(Dune::IOError, "VectorP1VTKFunction: size mismatch between field " | |
155 | << name << " (" << field.size() << ") and mapper (" << mapper.size() << ")"); | ||
156 | 58436 | } | |
157 | private: | ||
158 | const F& field_; | ||
159 | const std::string name_; | ||
160 | int nComps_; | ||
161 | const Mapper& mapper_; | ||
162 | Dumux::Vtk::Precision precision_; | ||
163 | }; | ||
164 | |||
165 | /*! | ||
166 | * \ingroup InputOutput | ||
167 | * \brief A VTK function that supports both scalar and vector values for each vertex. | ||
168 | * This expects the data to be organized by a two-dimensional field storing for | ||
169 | * each element the element-local nodal values. This can be used for the output | ||
170 | * of fields that are non-conforming due to e.g. constitutive relationships and | ||
171 | * where no extra degrees of freedom exist to display the discontinuities. | ||
172 | * | ||
173 | * \tparam GridView The Dune grid view type | ||
174 | * \tparam Mapper The type used for mapping elements to indices in the field | ||
175 | * \tparam F The field type (either vector of scalars or vectors) | ||
176 | */ | ||
177 | template <typename GridView, typename Mapper, typename F> | ||
178 | struct VectorP1NonConformingVTKFunction : Dune::VTKFunction<GridView> | ||
179 | { | ||
180 | enum { dim = GridView::dimension }; | ||
181 | using ctype = typename GridView::ctype; | ||
182 | using Element = typename GridView::template Codim<0>::Entity; | ||
183 | |||
184 | public: | ||
185 | |||
186 | //! return number of components | ||
187 | 26052 | int ncomps() const final { return nComps_; } | |
188 | |||
189 | //! get name | ||
190 | 8684 | std::string name() const final { return name_; } | |
191 | |||
192 | //! evaluate | ||
193 | 24556736 | double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& xi) const final | |
194 | { | ||
195 | 24556736 | const unsigned int dim = Element::mydimension; | |
196 | 24556736 | const unsigned int nVertices = e.subEntities(dim); | |
197 | |||
198 |
0/2✗ Branch 2 not taken.
✗ Branch 3 not taken.
|
49113472 | std::vector<Dune::FieldVector<ctype, 1>> cornerValues(nVertices); |
199 |
2/2✓ Branch 0 taken 40729344 times.
✓ Branch 1 taken 12278368 times.
|
106015424 | for (unsigned i = 0; i < nVertices; ++i) |
200 |
1/2✓ Branch 1 taken 35491184 times.
✗ Branch 2 not taken.
|
81458688 | cornerValues[i] = accessEntry_(mycomp, mapper_.index(e), i); |
201 | |||
202 | // (Ab)use the MultiLinearGeometry class to do multi-linear interpolation between scalars | ||
203 |
3/6✓ Branch 1 taken 12278368 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12278368 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 12278368 times.
✗ Branch 7 not taken.
|
63094048 | const Dune::MultiLinearGeometry<ctype, dim, 1> interpolation(e.type(), std::move(cornerValues)); |
204 |
1/2✓ Branch 1 taken 12278368 times.
✗ Branch 2 not taken.
|
49113472 | return interpolation.global(xi); |
205 | } | ||
206 | |||
207 | //! get output precision for the field | ||
208 | 8684 | Dumux::Vtk::Precision precision() const final | |
209 | 8684 | { return precision_; } | |
210 | |||
211 | //! Constructor | ||
212 | 8684 | VectorP1NonConformingVTKFunction(const GridView& gridView, | |
213 | const Mapper& mapper, | ||
214 | const F& field, | ||
215 | const std::string& name, | ||
216 | int nComps, | ||
217 | Dumux::Vtk::Precision precision = Dumux::Vtk::Precision::float32) | ||
218 |
0/2✗ Branch 1 not taken.
✗ Branch 2 not taken.
|
8684 | : field_(field), name_(name), nComps_(nComps), mapper_(mapper), precision_(precision) |
219 | { | ||
220 |
3/8✗ Branch 0 not taken.
✓ Branch 1 taken 4342 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 4342 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1210 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
|
19788 | if (field.size()!=(unsigned int)(mapper.size())) |
221 | ✗ | DUNE_THROW(Dune::IOError, "VectorP1NonConformingVTKFunction: size mismatch between field " | |
222 | << name << " (" << field.size() << ") and mapper (" << mapper.size() << ")"); | ||
223 | 8684 | } | |
224 | private: | ||
225 | //! access to the field | ||
226 | ✗ | double accessEntry_([[maybe_unused]] int mycomp, [[maybe_unused]] int eIdx, [[maybe_unused]] int cornerIdx) const | |
227 | { | ||
228 | if constexpr (Dune::IsIndexable<decltype(std::declval<F>()[0])>{}) | ||
229 | { | ||
230 | if constexpr (Dune::IsIndexable<decltype(std::declval<F>()[0][0])>{}) | ||
231 | ✗ | return field_[eIdx][cornerIdx][mycomp]; | |
232 | else | ||
233 | 122188032 | return field_[eIdx][cornerIdx]; | |
234 | } | ||
235 | else | ||
236 | ✗ | DUNE_THROW(Dune::InvalidStateException, "Invalid field type"); | |
237 | } | ||
238 | |||
239 | const F& field_; | ||
240 | const std::string name_; | ||
241 | int nComps_; | ||
242 | const Mapper& mapper_; | ||
243 | Dumux::Vtk::Precision precision_; | ||
244 | |||
245 | }; | ||
246 | |||
247 | /*! | ||
248 | * \ingroup InputOutput | ||
249 | * \brief A VTK function that supports both scalar and vector values for each face. | ||
250 | * This expects the data to be organized by a two-dimensional field storing for | ||
251 | * each element the element-local nodal values. Used for non-conforming spaces | ||
252 | * such as Rannacher-Turek and Crouzeix-Raviart. | ||
253 | * | ||
254 | * \tparam GridView The Dune grid view type | ||
255 | * \tparam Mapper The type used for mapping elements to indices in the field | ||
256 | * \tparam F The field type (either vector of scalars or vectors) | ||
257 | */ | ||
258 | template <typename GridView, typename Mapper, typename F> | ||
259 | struct VectorP1FaceNonConformingVTKFunction : Dune::VTKFunction<GridView> | ||
260 | { | ||
261 | static constexpr int dim = GridView::dimension; | ||
262 | using ctype = typename GridView::ctype; | ||
263 | using Element = typename GridView::template Codim<0>::Entity; | ||
264 | |||
265 | public: | ||
266 | |||
267 | //! return number of components | ||
268 | 96 | int ncomps() const final { return nComps_; } | |
269 | |||
270 | //! get name | ||
271 | 36 | std::string name() const final { return name_; } | |
272 | |||
273 | //! evaluate | ||
274 | 1560064 | double evaluate(int mycomp, const Element& e, const Dune::FieldVector<ctype, dim>& localPos) const final | |
275 | { | ||
276 | 1560064 | const unsigned int dim = Element::mydimension; | |
277 | 2233664 | const unsigned int nFaces = e.subEntities(1); | |
278 | |||
279 | // assemble coefficient vector | ||
280 | using Coefficients = Dune::ReservedVector<ctype, 2*dim>; | ||
281 |
2/2✓ Branch 0 taken 2340096 times.
✓ Branch 1 taken 780032 times.
|
6240256 | Coefficients faceValues; |
282 |
0/2✗ Branch 0 not taken.
✗ Branch 1 not taken.
|
1560064 | faceValues.resize(nFaces); |
283 |
2/2✓ Branch 0 taken 3120128 times.
✓ Branch 1 taken 780032 times.
|
7800320 | for (int i = 0; i < nFaces; ++i) |
284 | 6240256 | faceValues[i] = accessEntry_(mycomp, mapper_.index(e), i); | |
285 | |||
286 | using ShapeValues = std::vector<Dune::FieldVector<ctype, 1>>; | ||
287 |
1/2✓ Branch 1 taken 780032 times.
✗ Branch 2 not taken.
|
1560064 | ShapeValues N; |
288 |
4/10✓ Branch 1 taken 780032 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 780032 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 780032 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 780032 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
|
2233664 | feCache_.get(e.type()).localBasis().evaluateFunction(localPos, N); |
289 | 1560064 | double result = 0.0; | |
290 |
4/4✓ Branch 0 taken 3120128 times.
✓ Branch 1 taken 780032 times.
✓ Branch 2 taken 3120128 times.
✓ Branch 3 taken 780032 times.
|
14040576 | for (int i = 0; i < N.size(); ++i) |
291 | 24961024 | result += faceValues[i]*N[i]; | |
292 |
1/2✓ Branch 0 taken 780032 times.
✗ Branch 1 not taken.
|
3120128 | return result; |
293 | } | ||
294 | |||
295 | //! get output precision for the field | ||
296 | 36 | Dumux::Vtk::Precision precision() const final | |
297 | 36 | { return precision_; } | |
298 | |||
299 | //! Constructor | ||
300 | 36 | VectorP1FaceNonConformingVTKFunction( | |
301 | const GridView& gridView, | ||
302 | const Mapper& mapper, | ||
303 | const F& field, | ||
304 | const std::string& name, | ||
305 | int nComps, | ||
306 | Dumux::Vtk::Precision precision = Dumux::Vtk::Precision::float32 | ||
307 | ) | ||
308 |
1/4✓ Branch 2 taken 18 times.
✗ Branch 3 not taken.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
|
36 | : field_(field), name_(name), nComps_(nComps), mapper_(mapper), precision_(precision) |
309 | { | ||
310 |
3/6✗ Branch 0 not taken.
✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 18 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 18 times.
|
108 | if (field.size()!=(unsigned int)(mapper.size())) |
311 | ✗ | DUNE_THROW(Dune::IOError, "VectorP1FaceNonConformingVTKFunction: size mismatch between field " | |
312 | << name << " (" << field.size() << ") and mapper (" << mapper.size() << ")"); | ||
313 | 36 | } | |
314 | private: | ||
315 | //! access to the field | ||
316 | ✗ | double accessEntry_([[maybe_unused]] int mycomp, [[maybe_unused]] int eIdx, [[maybe_unused]] int faceIdx) const | |
317 | { | ||
318 | if constexpr (Dune::IsIndexable<decltype(std::declval<F>()[0])>{}) | ||
319 | { | ||
320 | if constexpr (Dune::IsIndexable<decltype(std::declval<F>()[0][0])>{}) | ||
321 | 5376000 | return field_[eIdx][faceIdx][mycomp]; | |
322 | else | ||
323 | 5328384 | return field_[eIdx][faceIdx]; | |
324 | } | ||
325 | else | ||
326 | ✗ | DUNE_THROW(Dune::InvalidStateException, "Invalid field type"); | |
327 | } | ||
328 | |||
329 | const F& field_; | ||
330 | const std::string name_; | ||
331 | int nComps_; | ||
332 | const Mapper& mapper_; | ||
333 | Dumux::Vtk::Precision precision_; | ||
334 | NonconformingFECache<ctype, ctype, dim> feCache_ = {}; | ||
335 | }; | ||
336 | |||
337 | /*! | ||
338 | * \ingroup InputOutput | ||
339 | * \brief struct that can hold any field that fulfills the VTKFunction interface | ||
340 | * | ||
341 | * \tparam GridView The Dune grid view type | ||
342 | */ | ||
343 | template<class GridView> | ||
344 |
84/634✓ Branch 0 taken 39796 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 2168 times.
✓ Branch 3 taken 17 times.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 2105 times.
✓ Branch 9 taken 9 times.
✓ Branch 10 taken 2064 times.
✓ Branch 11 taken 41 times.
✓ Branch 12 taken 3169 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 1 times.
✓ Branch 15 taken 3169 times.
✓ Branch 16 taken 10 times.
✓ Branch 17 taken 5 times.
✗ Branch 18 not taken.
✓ Branch 19 taken 10 times.
✓ Branch 20 taken 28274 times.
✗ Branch 21 not taken.
✓ Branch 22 taken 2 times.
✗ Branch 23 not taken.
✓ Branch 24 taken 637 times.
✗ Branch 25 not taken.
✓ Branch 26 taken 4543 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 665 times.
✗ Branch 29 not taken.
✓ Branch 30 taken 669 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 2604 times.
✓ Branch 33 taken 4 times.
✓ Branch 34 taken 199 times.
✓ Branch 35 taken 2698 times.
✓ Branch 36 taken 217 times.
✗ Branch 37 not taken.
✓ Branch 38 taken 505 times.
✓ Branch 39 taken 2 times.
✗ Branch 40 not taken.
✓ Branch 41 taken 505 times.
✗ Branch 42 not taken.
✓ Branch 43 taken 11 times.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✓ Branch 46 taken 158 times.
✗ Branch 47 not taken.
✓ Branch 48 taken 24 times.
✗ Branch 49 not taken.
✗ Branch 50 not taken.
✓ Branch 51 taken 33 times.
✓ Branch 52 taken 472 times.
✓ Branch 53 taken 8 times.
✓ Branch 54 taken 2109 times.
✓ Branch 55 taken 96 times.
✓ Branch 56 taken 3 times.
✓ Branch 57 taken 2060 times.
✓ Branch 58 taken 42 times.
✓ Branch 59 taken 2075 times.
✗ Branch 60 not taken.
✓ Branch 61 taken 49 times.
✓ Branch 62 taken 9 times.
✓ Branch 63 taken 28 times.
✓ Branch 64 taken 125 times.
✓ Branch 65 taken 18 times.
✓ Branch 66 taken 156 times.
✓ Branch 67 taken 125 times.
✗ Branch 68 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✗ Branch 71 not taken.
✓ Branch 72 taken 206 times.
✗ Branch 73 not taken.
✓ Branch 74 taken 24 times.
✓ Branch 75 taken 206 times.
✗ Branch 76 not taken.
✗ Branch 77 not taken.
✓ Branch 78 taken 92 times.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✓ Branch 81 taken 52 times.
✓ Branch 82 taken 106 times.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✓ Branch 85 taken 2 times.
✗ Branch 86 not taken.
✓ Branch 87 taken 3 times.
✗ Branch 88 not taken.
✓ Branch 89 taken 4 times.
✓ Branch 90 taken 22 times.
✗ Branch 91 not taken.
✓ Branch 92 taken 49 times.
✓ Branch 93 taken 22 times.
✓ Branch 94 taken 17 times.
✓ Branch 95 taken 4 times.
✗ Branch 96 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✓ Branch 99 taken 8 times.
✓ Branch 100 taken 11 times.
✗ Branch 101 not taken.
✓ Branch 102 taken 24 times.
✓ Branch 103 taken 11 times.
✗ Branch 104 not taken.
✗ Branch 105 not taken.
✓ Branch 106 taken 4 times.
✗ Branch 107 not taken.
✓ Branch 108 taken 12 times.
✗ Branch 109 not taken.
✓ Branch 110 taken 36 times.
✗ Branch 111 not taken.
✓ Branch 112 taken 4 times.
✓ Branch 113 taken 8 times.
✓ Branch 114 taken 3 times.
✗ Branch 115 not taken.
✓ Branch 116 taken 14 times.
✓ Branch 117 taken 32 times.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✗ Branch 120 not taken.
✓ Branch 121 taken 8 times.
✗ Branch 122 not taken.
✗ Branch 123 not taken.
✓ Branch 124 taken 2 times.
✗ Branch 125 not taken.
✗ Branch 126 not taken.
✓ Branch 127 taken 2 times.
✓ Branch 128 taken 20 times.
✗ Branch 129 not taken.
✗ Branch 130 not taken.
✗ Branch 131 not taken.
✓ Branch 132 taken 1 times.
✗ Branch 133 not taken.
✓ Branch 134 taken 1 times.
✗ Branch 135 not taken.
✓ Branch 136 taken 22 times.
✗ Branch 137 not taken.
✗ Branch 138 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
✗ Branch 141 not taken.
✗ Branch 142 not taken.
✗ Branch 143 not taken.
✗ Branch 144 not taken.
✗ Branch 145 not taken.
✗ Branch 146 not taken.
✗ Branch 147 not taken.
✗ Branch 148 not taken.
✗ Branch 149 not taken.
✗ Branch 150 not taken.
✗ Branch 151 not taken.
✗ Branch 152 not taken.
✗ Branch 153 not taken.
✗ Branch 154 not taken.
✗ Branch 155 not taken.
✗ Branch 156 not taken.
✗ Branch 157 not taken.
✓ Branch 158 taken 33 times.
✗ Branch 159 not taken.
✗ Branch 160 not taken.
✗ Branch 161 not taken.
✗ Branch 162 not taken.
✗ Branch 163 not taken.
✗ Branch 164 not taken.
✗ Branch 165 not taken.
✗ Branch 166 not taken.
✗ Branch 167 not taken.
✗ Branch 168 not taken.
✗ Branch 169 not taken.
✓ Branch 170 taken 11 times.
✗ Branch 171 not taken.
✗ Branch 172 not taken.
✓ Branch 173 taken 11 times.
✗ Branch 174 not taken.
✗ Branch 175 not taken.
✗ Branch 176 not taken.
✗ Branch 177 not taken.
✗ Branch 178 not taken.
✗ Branch 179 not taken.
✗ Branch 180 not taken.
✗ Branch 181 not taken.
✗ Branch 182 not taken.
✗ Branch 183 not taken.
✗ Branch 184 not taken.
✗ Branch 185 not taken.
✗ Branch 186 not taken.
✗ Branch 187 not taken.
✗ Branch 188 not taken.
✗ Branch 189 not taken.
✗ Branch 190 not taken.
✗ Branch 191 not taken.
✗ Branch 192 not taken.
✗ Branch 193 not taken.
✗ Branch 194 not taken.
✗ Branch 195 not taken.
✗ Branch 196 not taken.
✗ Branch 197 not taken.
✗ Branch 198 not taken.
✗ Branch 199 not taken.
✗ Branch 200 not taken.
✗ Branch 201 not taken.
✗ Branch 202 not taken.
✗ Branch 203 not taken.
✗ Branch 204 not taken.
✗ Branch 205 not taken.
✗ Branch 206 not taken.
✗ Branch 207 not taken.
✗ Branch 208 not taken.
✗ Branch 209 not taken.
✗ Branch 210 not taken.
✗ Branch 211 not taken.
✗ Branch 212 not taken.
✗ Branch 213 not taken.
✗ Branch 214 not taken.
✗ Branch 215 not taken.
✗ Branch 216 not taken.
✗ Branch 217 not taken.
✗ Branch 218 not taken.
✗ Branch 219 not taken.
✗ Branch 220 not taken.
✗ Branch 221 not taken.
✗ Branch 222 not taken.
✗ Branch 223 not taken.
✗ Branch 224 not taken.
✗ Branch 225 not taken.
✗ Branch 226 not taken.
✗ Branch 227 not taken.
✗ Branch 228 not taken.
✗ Branch 229 not taken.
✗ Branch 230 not taken.
✗ Branch 231 not taken.
✗ Branch 232 not taken.
✗ Branch 233 not taken.
✗ Branch 234 not taken.
✗ Branch 235 not taken.
✗ Branch 236 not taken.
✗ Branch 237 not taken.
✗ Branch 238 not taken.
✗ Branch 239 not taken.
✗ Branch 240 not taken.
✗ Branch 241 not taken.
✗ Branch 242 not taken.
✗ Branch 243 not taken.
✗ Branch 244 not taken.
✗ Branch 245 not taken.
✗ Branch 246 not taken.
✗ Branch 247 not taken.
✗ Branch 248 not taken.
✗ Branch 249 not taken.
✗ Branch 250 not taken.
✗ Branch 251 not taken.
✗ Branch 252 not taken.
✗ Branch 253 not taken.
✗ Branch 254 not taken.
✗ Branch 255 not taken.
✗ Branch 256 not taken.
✗ Branch 257 not taken.
✗ Branch 258 not taken.
✗ Branch 259 not taken.
✗ Branch 260 not taken.
✗ Branch 261 not taken.
✗ Branch 262 not taken.
✗ Branch 263 not taken.
✗ Branch 264 not taken.
✗ Branch 265 not taken.
✗ Branch 266 not taken.
✗ Branch 267 not taken.
✗ Branch 268 not taken.
✗ Branch 269 not taken.
✗ Branch 270 not taken.
✗ Branch 271 not taken.
✗ Branch 272 not taken.
✗ Branch 273 not taken.
✗ Branch 274 not taken.
✗ Branch 275 not taken.
✗ Branch 276 not taken.
✗ Branch 277 not taken.
✗ Branch 278 not taken.
✗ Branch 279 not taken.
✗ Branch 280 not taken.
✗ Branch 281 not taken.
✗ Branch 282 not taken.
✗ Branch 283 not taken.
✗ Branch 284 not taken.
✗ Branch 285 not taken.
✗ Branch 286 not taken.
✗ Branch 287 not taken.
✗ Branch 288 not taken.
✗ Branch 289 not taken.
✗ Branch 290 not taken.
✗ Branch 291 not taken.
✗ Branch 292 not taken.
✗ Branch 293 not taken.
✗ Branch 294 not taken.
✗ Branch 295 not taken.
✗ Branch 296 not taken.
✗ Branch 297 not taken.
✗ Branch 298 not taken.
✗ Branch 299 not taken.
✗ Branch 300 not taken.
✗ Branch 301 not taken.
✗ Branch 302 not taken.
✗ Branch 303 not taken.
✗ Branch 304 not taken.
✗ Branch 305 not taken.
✗ Branch 306 not taken.
✗ Branch 307 not taken.
✗ Branch 308 not taken.
✗ Branch 309 not taken.
✗ Branch 310 not taken.
✗ Branch 311 not taken.
✗ Branch 312 not taken.
✗ Branch 313 not taken.
✗ Branch 314 not taken.
✗ Branch 315 not taken.
✗ Branch 316 not taken.
✗ Branch 317 not taken.
✗ Branch 318 not taken.
✗ Branch 319 not taken.
✗ Branch 320 not taken.
✗ Branch 321 not taken.
✗ Branch 322 not taken.
✗ Branch 323 not taken.
✗ Branch 324 not taken.
✗ Branch 325 not taken.
✗ Branch 326 not taken.
✗ Branch 327 not taken.
✗ Branch 328 not taken.
✗ Branch 329 not taken.
✗ Branch 330 not taken.
✗ Branch 331 not taken.
✗ Branch 332 not taken.
✗ Branch 333 not taken.
✗ Branch 334 not taken.
✗ Branch 335 not taken.
✗ Branch 336 not taken.
✗ Branch 337 not taken.
✗ Branch 338 not taken.
✗ Branch 339 not taken.
✗ Branch 340 not taken.
✗ Branch 341 not taken.
✗ Branch 342 not taken.
✗ Branch 343 not taken.
✗ Branch 344 not taken.
✗ Branch 345 not taken.
✗ Branch 346 not taken.
✗ Branch 347 not taken.
✗ Branch 348 not taken.
✗ Branch 349 not taken.
✗ Branch 350 not taken.
✗ Branch 351 not taken.
✗ Branch 352 not taken.
✗ Branch 353 not taken.
✗ Branch 354 not taken.
✗ Branch 355 not taken.
✗ Branch 356 not taken.
✗ Branch 357 not taken.
✗ Branch 358 not taken.
✗ Branch 359 not taken.
✗ Branch 360 not taken.
✗ Branch 361 not taken.
✗ Branch 362 not taken.
✗ Branch 363 not taken.
✗ Branch 364 not taken.
✗ Branch 365 not taken.
✗ Branch 366 not taken.
✗ Branch 367 not taken.
✗ Branch 368 not taken.
✗ Branch 369 not taken.
✗ Branch 370 not taken.
✗ Branch 371 not taken.
✗ Branch 372 not taken.
✗ Branch 373 not taken.
✗ Branch 374 not taken.
✗ Branch 375 not taken.
✗ Branch 376 not taken.
✗ Branch 377 not taken.
✗ Branch 378 not taken.
✗ Branch 379 not taken.
✗ Branch 380 not taken.
✗ Branch 381 not taken.
✗ Branch 382 not taken.
✗ Branch 383 not taken.
✗ Branch 384 not taken.
✗ Branch 385 not taken.
✗ Branch 386 not taken.
✗ Branch 387 not taken.
✗ Branch 388 not taken.
✗ Branch 389 not taken.
✗ Branch 390 not taken.
✗ Branch 391 not taken.
✗ Branch 392 not taken.
✗ Branch 393 not taken.
✗ Branch 394 not taken.
✗ Branch 395 not taken.
✗ Branch 396 not taken.
✗ Branch 397 not taken.
✗ Branch 398 not taken.
✗ Branch 399 not taken.
✗ Branch 400 not taken.
✗ Branch 401 not taken.
✗ Branch 402 not taken.
✗ Branch 403 not taken.
✗ Branch 404 not taken.
✗ Branch 405 not taken.
✗ Branch 406 not taken.
✗ Branch 407 not taken.
✗ Branch 408 not taken.
✗ Branch 409 not taken.
✗ Branch 410 not taken.
✗ Branch 411 not taken.
✗ Branch 412 not taken.
✗ Branch 413 not taken.
✗ Branch 414 not taken.
✗ Branch 415 not taken.
✗ Branch 416 not taken.
✗ Branch 417 not taken.
✗ Branch 418 not taken.
✗ Branch 419 not taken.
✗ Branch 420 not taken.
✗ Branch 421 not taken.
✗ Branch 422 not taken.
✗ Branch 423 not taken.
✗ Branch 424 not taken.
✗ Branch 425 not taken.
✗ Branch 426 not taken.
✗ Branch 427 not taken.
✗ Branch 428 not taken.
✗ Branch 429 not taken.
✗ Branch 430 not taken.
✗ Branch 431 not taken.
✗ Branch 432 not taken.
✗ Branch 433 not taken.
✗ Branch 434 not taken.
✗ Branch 435 not taken.
✗ Branch 436 not taken.
✗ Branch 437 not taken.
✗ Branch 438 not taken.
✗ Branch 439 not taken.
✗ Branch 440 not taken.
✗ Branch 441 not taken.
✗ Branch 442 not taken.
✗ Branch 443 not taken.
✗ Branch 444 not taken.
✗ Branch 445 not taken.
✗ Branch 446 not taken.
✗ Branch 447 not taken.
✗ Branch 448 not taken.
✗ Branch 449 not taken.
✗ Branch 450 not taken.
✗ Branch 451 not taken.
✗ Branch 452 not taken.
✗ Branch 453 not taken.
✗ Branch 454 not taken.
✗ Branch 455 not taken.
✗ Branch 456 not taken.
✗ Branch 457 not taken.
✗ Branch 458 not taken.
✗ Branch 459 not taken.
✗ Branch 460 not taken.
✗ Branch 461 not taken.
✗ Branch 462 not taken.
✗ Branch 463 not taken.
✗ Branch 464 not taken.
✗ Branch 465 not taken.
✗ Branch 466 not taken.
✗ Branch 467 not taken.
✗ Branch 468 not taken.
✗ Branch 469 not taken.
✗ Branch 470 not taken.
✗ Branch 471 not taken.
✗ Branch 472 not taken.
✗ Branch 473 not taken.
✗ Branch 474 not taken.
✗ Branch 475 not taken.
✗ Branch 476 not taken.
✗ Branch 477 not taken.
✗ Branch 478 not taken.
✗ Branch 479 not taken.
✗ Branch 480 not taken.
✗ Branch 481 not taken.
✗ Branch 482 not taken.
✗ Branch 483 not taken.
✗ Branch 484 not taken.
✗ Branch 485 not taken.
✗ Branch 486 not taken.
✗ Branch 487 not taken.
✗ Branch 488 not taken.
✗ Branch 489 not taken.
✗ Branch 490 not taken.
✗ Branch 491 not taken.
✗ Branch 492 not taken.
✗ Branch 493 not taken.
✗ Branch 494 not taken.
✗ Branch 495 not taken.
✗ Branch 496 not taken.
✗ Branch 497 not taken.
✗ Branch 498 not taken.
✗ Branch 499 not taken.
✗ Branch 500 not taken.
✗ Branch 501 not taken.
✗ Branch 502 not taken.
✗ Branch 503 not taken.
✗ Branch 504 not taken.
✗ Branch 505 not taken.
✗ Branch 506 not taken.
✗ Branch 507 not taken.
✗ Branch 508 not taken.
✗ Branch 509 not taken.
✗ Branch 510 not taken.
✗ Branch 511 not taken.
✗ Branch 512 not taken.
✗ Branch 513 not taken.
✗ Branch 514 not taken.
✗ Branch 515 not taken.
✗ Branch 516 not taken.
✗ Branch 517 not taken.
✗ Branch 518 not taken.
✗ Branch 519 not taken.
✗ Branch 520 not taken.
✗ Branch 521 not taken.
✗ Branch 522 not taken.
✗ Branch 523 not taken.
✗ Branch 524 not taken.
✗ Branch 525 not taken.
✗ Branch 526 not taken.
✗ Branch 527 not taken.
✗ Branch 528 not taken.
✗ Branch 529 not taken.
✗ Branch 530 not taken.
✗ Branch 531 not taken.
✗ Branch 532 not taken.
✗ Branch 533 not taken.
✗ Branch 534 not taken.
✗ Branch 535 not taken.
✗ Branch 536 not taken.
✗ Branch 537 not taken.
✗ Branch 538 not taken.
✗ Branch 539 not taken.
✗ Branch 540 not taken.
✗ Branch 541 not taken.
✗ Branch 542 not taken.
✗ Branch 543 not taken.
✗ Branch 544 not taken.
✗ Branch 545 not taken.
✗ Branch 546 not taken.
✗ Branch 547 not taken.
✗ Branch 548 not taken.
✗ Branch 549 not taken.
✗ Branch 550 not taken.
✗ Branch 551 not taken.
✗ Branch 552 not taken.
✗ Branch 553 not taken.
✗ Branch 554 not taken.
✗ Branch 555 not taken.
✗ Branch 556 not taken.
✗ Branch 557 not taken.
✗ Branch 558 not taken.
✗ Branch 559 not taken.
✗ Branch 560 not taken.
✗ Branch 561 not taken.
✗ Branch 562 not taken.
✗ Branch 563 not taken.
✗ Branch 564 not taken.
✗ Branch 565 not taken.
✗ Branch 566 not taken.
✗ Branch 567 not taken.
✗ Branch 568 not taken.
✗ Branch 569 not taken.
✗ Branch 570 not taken.
✗ Branch 571 not taken.
✗ Branch 572 not taken.
✗ Branch 573 not taken.
✗ Branch 574 not taken.
✗ Branch 575 not taken.
✗ Branch 576 not taken.
✗ Branch 577 not taken.
✗ Branch 578 not taken.
✗ Branch 579 not taken.
✗ Branch 580 not taken.
✗ Branch 581 not taken.
✗ Branch 582 not taken.
✗ Branch 583 not taken.
✗ Branch 584 not taken.
✗ Branch 585 not taken.
✗ Branch 586 not taken.
✗ Branch 587 not taken.
✗ Branch 588 not taken.
✗ Branch 589 not taken.
✗ Branch 590 not taken.
✗ Branch 591 not taken.
✗ Branch 592 not taken.
✗ Branch 593 not taken.
✗ Branch 594 not taken.
✗ Branch 595 not taken.
✗ Branch 596 not taken.
✗ Branch 597 not taken.
✗ Branch 598 not taken.
✗ Branch 599 not taken.
✗ Branch 600 not taken.
✗ Branch 601 not taken.
✗ Branch 602 not taken.
✗ Branch 603 not taken.
✗ Branch 604 not taken.
✗ Branch 605 not taken.
✗ Branch 606 not taken.
✗ Branch 607 not taken.
✗ Branch 608 not taken.
✗ Branch 609 not taken.
✗ Branch 610 not taken.
✗ Branch 611 not taken.
✗ Branch 612 not taken.
✗ Branch 613 not taken.
✗ Branch 614 not taken.
✗ Branch 615 not taken.
✗ Branch 616 not taken.
✗ Branch 617 not taken.
✗ Branch 618 not taken.
✗ Branch 619 not taken.
✗ Branch 620 not taken.
✗ Branch 621 not taken.
✗ Branch 622 not taken.
✗ Branch 623 not taken.
✗ Branch 624 not taken.
✗ Branch 625 not taken.
✗ Branch 626 not taken.
✗ Branch 627 not taken.
✗ Branch 628 not taken.
✗ Branch 629 not taken.
✗ Branch 630 not taken.
✗ Branch 631 not taken.
✗ Branch 632 not taken.
✗ Branch 633 not taken.
|
181145 | class Field |
345 | { | ||
346 | static constexpr int dim = GridView::dimension; | ||
347 | using ctype = typename GridView::ctype; | ||
348 | using Element = typename GridView::template Codim<0>::Entity; | ||
349 | |||
350 | public: | ||
351 | // template constructor selects the right VTKFunction implementation | ||
352 | template <typename F, class Mapper> | ||
353 | 179877 | Field(const GridView& gridView, const Mapper& mapper, F const& f, | |
354 | const std::string& name, int numComp = 1, int codim = 0, | ||
355 | Dune::VTK::DataMode dm = Dune::VTK::conforming, | ||
356 | Dumux::Vtk::Precision precision = Dumux::Vtk::Precision::float32) | ||
357 |
2/4✓ Branch 0 taken 33559 times.
✓ Branch 1 taken 56388 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
|
179877 | : codim_(codim) |
358 | { | ||
359 | if constexpr (dim > 1) | ||
360 | { | ||
361 |
2/2✓ Branch 0 taken 22634 times.
✓ Branch 1 taken 53669 times.
|
152589 | if (codim == dim) |
362 | { | ||
363 |
2/2✓ Branch 0 taken 20072 times.
✓ Branch 1 taken 2562 times.
|
45268 | if (dm == Dune::VTK::conforming) |
364 |
3/6✓ Branch 1 taken 20072 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 20072 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 20072 times.
|
40144 | field_ = std::make_shared< VectorP1VTKFunction<GridView, Mapper, F> >(gridView, mapper, f, name, numComp, precision); |
365 | else | ||
366 |
3/6✓ Branch 1 taken 2562 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2562 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2562 times.
|
5124 | field_ = std::make_shared< VectorP1NonConformingVTKFunction<GridView, Mapper, F> >(gridView, mapper, f, name, numComp, precision); |
367 | } | ||
368 |
2/2✓ Branch 0 taken 18 times.
✓ Branch 1 taken 53651 times.
|
107321 | else if (codim == 1) |
369 | { | ||
370 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 18 times.
|
36 | if (dm == Dune::VTK::conforming) |
371 | ✗ | DUNE_THROW(Dune::NotImplemented, "Only non-conforming output is implemented"); | |
372 | else | ||
373 |
3/6✓ Branch 1 taken 18 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 18 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 18 times.
|
36 | field_ = std::make_shared< VectorP1FaceNonConformingVTKFunction<GridView, Mapper, F> >(gridView, mapper, f, name, numComp, precision); |
374 | } | ||
375 |
1/2✓ Branch 0 taken 53651 times.
✗ Branch 1 not taken.
|
107285 | else if (codim == 0) |
376 |
3/6✓ Branch 1 taken 53651 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 53651 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 53651 times.
|
107285 | field_ = std::make_shared< VectorP0VTKFunction<GridView, Mapper, F> >(gridView, mapper, f, name, numComp, precision); |
377 | else | ||
378 | ✗ | DUNE_THROW(Dune::NotImplemented, "Only element, face or vertex quantities allowed."); | |
379 | } | ||
380 | else | ||
381 | { | ||
382 |
2/2✓ Branch 0 taken 10925 times.
✓ Branch 1 taken 2719 times.
|
27288 | if (codim == dim) |
383 | { | ||
384 |
2/2✓ Branch 0 taken 9145 times.
✓ Branch 1 taken 1780 times.
|
21850 | if (dm == Dune::VTK::conforming) |
385 |
3/6✓ Branch 1 taken 9145 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 9145 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 9145 times.
|
18290 | field_ = std::make_shared< VectorP1VTKFunction<GridView, Mapper, F> >(gridView, mapper, f, name, numComp, precision); |
386 | else | ||
387 |
3/6✓ Branch 1 taken 1780 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1780 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 1780 times.
|
3560 | field_ = std::make_shared< VectorP1NonConformingVTKFunction<GridView, Mapper, F> >(gridView, mapper, f, name, numComp, precision); |
388 | } | ||
389 |
1/2✓ Branch 0 taken 2719 times.
✗ Branch 1 not taken.
|
5438 | else if (codim == 0) |
390 |
3/6✓ Branch 1 taken 2719 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2719 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2719 times.
|
5438 | field_ = std::make_shared< VectorP0VTKFunction<GridView, Mapper, F> >(gridView, mapper, f, name, numComp, precision); |
391 | else | ||
392 | ✗ | DUNE_THROW(Dune::NotImplemented, "Only element or vertex quantities allowed."); | |
393 | } | ||
394 | 179877 | } | |
395 | |||
396 | //! return the name of this field | ||
397 | std::string name () const { return field_->name(); } | ||
398 | |||
399 | //! return the number of components of this field | ||
400 | int ncomps() const { return field_->ncomps(); } | ||
401 | |||
402 | //! return the precision of this field | ||
403 | Dumux::Vtk::Precision precision() const | ||
404 | { return field_->precision(); } | ||
405 | |||
406 | //! codimension of the entities on which the field values live | ||
407 | ✗ | int codim() const { return codim_; } | |
408 | |||
409 | //! element-local evaluation of the field | ||
410 | double evaluate(int mycomp, | ||
411 | const Element &element, | ||
412 | const Dune::FieldVector< ctype, dim > &xi) const | ||
413 | { return field_->evaluate(mycomp, element, xi); } | ||
414 | |||
415 | //! returns the underlying vtk function | ||
416 | std::shared_ptr<const Dune::VTKFunction<GridView>> get() const | ||
417 |
29/342✓ Branch 2 taken 39801 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 2186 times.
✗ Branch 7 not taken.
✓ Branch 10 taken 8 times.
✗ Branch 11 not taken.
✓ Branch 14 taken 2111 times.
✗ Branch 15 not taken.
✓ Branch 18 taken 3175 times.
✗ Branch 19 not taken.
✓ Branch 22 taken 1834 times.
✗ Branch 23 not taken.
✓ Branch 26 taken 28282 times.
✗ Branch 27 not taken.
✓ Branch 30 taken 3911 times.
✗ Branch 31 not taken.
✓ Branch 34 taken 637 times.
✗ Branch 35 not taken.
✓ Branch 38 taken 665 times.
✗ Branch 39 not taken.
✓ Branch 42 taken 2805 times.
✗ Branch 43 not taken.
✓ Branch 46 taken 4059 times.
✗ Branch 47 not taken.
✓ Branch 50 taken 2342 times.
✗ Branch 51 not taken.
✓ Branch 54 taken 46 times.
✗ Branch 55 not taken.
✓ Branch 58 taken 496 times.
✗ Branch 59 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✓ Branch 66 taken 2063 times.
✗ Branch 67 not taken.
✓ Branch 70 taken 2102 times.
✗ Branch 71 not taken.
✓ Branch 74 taken 157 times.
✗ Branch 75 not taken.
✓ Branch 78 taken 406 times.
✗ Branch 79 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✓ Branch 86 taken 272 times.
✗ Branch 87 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✓ Branch 94 taken 26 times.
✗ Branch 95 not taken.
✓ Branch 98 taken 13 times.
✗ Branch 99 not taken.
✓ Branch 102 taken 39 times.
✗ Branch 103 not taken.
✓ Branch 106 taken 33 times.
✗ Branch 107 not taken.
✗ Branch 110 not taken.
✗ Branch 111 not taken.
✗ Branch 114 not taken.
✗ Branch 115 not taken.
✓ Branch 118 taken 11 times.
✗ Branch 119 not taken.
✗ Branch 122 not taken.
✗ Branch 123 not taken.
✗ Branch 126 not taken.
✗ Branch 127 not taken.
✓ Branch 130 taken 2 times.
✗ Branch 131 not taken.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 138 not taken.
✗ Branch 139 not taken.
✗ Branch 142 not taken.
✗ Branch 143 not taken.
✓ Branch 146 taken 2 times.
✗ Branch 147 not taken.
✗ Branch 150 not taken.
✗ Branch 151 not taken.
✗ Branch 154 not taken.
✗ Branch 155 not taken.
✗ Branch 158 not taken.
✗ Branch 159 not taken.
✗ Branch 162 not taken.
✗ Branch 163 not taken.
✗ Branch 166 not taken.
✗ Branch 167 not taken.
✗ Branch 170 not taken.
✗ Branch 171 not taken.
✗ Branch 174 not taken.
✗ Branch 175 not taken.
✗ Branch 178 not taken.
✗ Branch 179 not taken.
✓ Branch 182 taken 33 times.
✗ Branch 183 not taken.
✗ Branch 186 not taken.
✗ Branch 187 not taken.
✗ Branch 190 not taken.
✗ Branch 191 not taken.
✗ Branch 194 not taken.
✗ Branch 195 not taken.
✓ Branch 198 taken 11 times.
✗ Branch 199 not taken.
✗ Branch 202 not taken.
✗ Branch 203 not taken.
✗ Branch 206 not taken.
✗ Branch 207 not taken.
✗ Branch 210 not taken.
✗ Branch 211 not taken.
✗ Branch 214 not taken.
✗ Branch 215 not taken.
✗ Branch 218 not taken.
✗ Branch 219 not taken.
✗ Branch 222 not taken.
✗ Branch 223 not taken.
✗ Branch 226 not taken.
✗ Branch 227 not taken.
✗ Branch 230 not taken.
✗ Branch 231 not taken.
✗ Branch 234 not taken.
✗ Branch 235 not taken.
✗ Branch 238 not taken.
✗ Branch 239 not taken.
✗ Branch 242 not taken.
✗ Branch 243 not taken.
✗ Branch 246 not taken.
✗ Branch 247 not taken.
✗ Branch 250 not taken.
✗ Branch 251 not taken.
✗ Branch 254 not taken.
✗ Branch 255 not taken.
✗ Branch 258 not taken.
✗ Branch 259 not taken.
✗ Branch 262 not taken.
✗ Branch 263 not taken.
✗ Branch 266 not taken.
✗ Branch 267 not taken.
✗ Branch 270 not taken.
✗ Branch 271 not taken.
✗ Branch 274 not taken.
✗ Branch 275 not taken.
✗ Branch 278 not taken.
✗ Branch 279 not taken.
✗ Branch 282 not taken.
✗ Branch 283 not taken.
✗ Branch 286 not taken.
✗ Branch 287 not taken.
✗ Branch 290 not taken.
✗ Branch 291 not taken.
✗ Branch 294 not taken.
✗ Branch 295 not taken.
✗ Branch 298 not taken.
✗ Branch 299 not taken.
✗ Branch 302 not taken.
✗ Branch 303 not taken.
✗ Branch 306 not taken.
✗ Branch 307 not taken.
✗ Branch 310 not taken.
✗ Branch 311 not taken.
✗ Branch 314 not taken.
✗ Branch 315 not taken.
✗ Branch 318 not taken.
✗ Branch 319 not taken.
✗ Branch 322 not taken.
✗ Branch 323 not taken.
✗ Branch 326 not taken.
✗ Branch 327 not taken.
✗ Branch 330 not taken.
✗ Branch 331 not taken.
✗ Branch 334 not taken.
✗ Branch 335 not taken.
✗ Branch 338 not taken.
✗ Branch 339 not taken.
✗ Branch 342 not taken.
✗ Branch 343 not taken.
✗ Branch 346 not taken.
✗ Branch 347 not taken.
✗ Branch 350 not taken.
✗ Branch 351 not taken.
✗ Branch 354 not taken.
✗ Branch 355 not taken.
✗ Branch 358 not taken.
✗ Branch 359 not taken.
✗ Branch 362 not taken.
✗ Branch 363 not taken.
✗ Branch 366 not taken.
✗ Branch 367 not taken.
✗ Branch 370 not taken.
✗ Branch 371 not taken.
✗ Branch 374 not taken.
✗ Branch 375 not taken.
✗ Branch 378 not taken.
✗ Branch 379 not taken.
✗ Branch 382 not taken.
✗ Branch 383 not taken.
✗ Branch 386 not taken.
✗ Branch 387 not taken.
✗ Branch 390 not taken.
✗ Branch 391 not taken.
✗ Branch 394 not taken.
✗ Branch 395 not taken.
✗ Branch 398 not taken.
✗ Branch 399 not taken.
✗ Branch 402 not taken.
✗ Branch 403 not taken.
✗ Branch 406 not taken.
✗ Branch 407 not taken.
✗ Branch 410 not taken.
✗ Branch 411 not taken.
✗ Branch 414 not taken.
✗ Branch 415 not taken.
✗ Branch 418 not taken.
✗ Branch 419 not taken.
✗ Branch 422 not taken.
✗ Branch 423 not taken.
✗ Branch 426 not taken.
✗ Branch 427 not taken.
✗ Branch 430 not taken.
✗ Branch 431 not taken.
✗ Branch 434 not taken.
✗ Branch 435 not taken.
✗ Branch 438 not taken.
✗ Branch 439 not taken.
✗ Branch 442 not taken.
✗ Branch 443 not taken.
✗ Branch 446 not taken.
✗ Branch 447 not taken.
✗ Branch 450 not taken.
✗ Branch 451 not taken.
✗ Branch 454 not taken.
✗ Branch 455 not taken.
✗ Branch 458 not taken.
✗ Branch 459 not taken.
✗ Branch 462 not taken.
✗ Branch 463 not taken.
✗ Branch 466 not taken.
✗ Branch 467 not taken.
✗ Branch 470 not taken.
✗ Branch 471 not taken.
✗ Branch 474 not taken.
✗ Branch 475 not taken.
✗ Branch 478 not taken.
✗ Branch 479 not taken.
✗ Branch 482 not taken.
✗ Branch 483 not taken.
✗ Branch 486 not taken.
✗ Branch 487 not taken.
✗ Branch 490 not taken.
✗ Branch 491 not taken.
✗ Branch 494 not taken.
✗ Branch 495 not taken.
✗ Branch 498 not taken.
✗ Branch 499 not taken.
✗ Branch 502 not taken.
✗ Branch 503 not taken.
✗ Branch 506 not taken.
✗ Branch 507 not taken.
✗ Branch 510 not taken.
✗ Branch 511 not taken.
✗ Branch 514 not taken.
✗ Branch 515 not taken.
✗ Branch 518 not taken.
✗ Branch 519 not taken.
✗ Branch 522 not taken.
✗ Branch 523 not taken.
✗ Branch 526 not taken.
✗ Branch 527 not taken.
✗ Branch 530 not taken.
✗ Branch 531 not taken.
✗ Branch 534 not taken.
✗ Branch 535 not taken.
✗ Branch 538 not taken.
✗ Branch 539 not taken.
✗ Branch 542 not taken.
✗ Branch 543 not taken.
✗ Branch 546 not taken.
✗ Branch 547 not taken.
✗ Branch 550 not taken.
✗ Branch 551 not taken.
✗ Branch 554 not taken.
✗ Branch 555 not taken.
✗ Branch 558 not taken.
✗ Branch 559 not taken.
✗ Branch 562 not taken.
✗ Branch 563 not taken.
✗ Branch 566 not taken.
✗ Branch 567 not taken.
✗ Branch 570 not taken.
✗ Branch 571 not taken.
✗ Branch 574 not taken.
✗ Branch 575 not taken.
✗ Branch 578 not taken.
✗ Branch 579 not taken.
✗ Branch 582 not taken.
✗ Branch 583 not taken.
✗ Branch 586 not taken.
✗ Branch 587 not taken.
✗ Branch 590 not taken.
✗ Branch 591 not taken.
✗ Branch 594 not taken.
✗ Branch 595 not taken.
✗ Branch 598 not taken.
✗ Branch 599 not taken.
✗ Branch 602 not taken.
✗ Branch 603 not taken.
✗ Branch 606 not taken.
✗ Branch 607 not taken.
✗ Branch 610 not taken.
✗ Branch 611 not taken.
✗ Branch 614 not taken.
✗ Branch 615 not taken.
✗ Branch 618 not taken.
✗ Branch 619 not taken.
✗ Branch 622 not taken.
✗ Branch 623 not taken.
✗ Branch 626 not taken.
✗ Branch 627 not taken.
✗ Branch 630 not taken.
✗ Branch 631 not taken.
✗ Branch 634 not taken.
✗ Branch 635 not taken.
✗ Branch 638 not taken.
✗ Branch 639 not taken.
✗ Branch 642 not taken.
✗ Branch 643 not taken.
✗ Branch 646 not taken.
✗ Branch 647 not taken.
✗ Branch 650 not taken.
✗ Branch 651 not taken.
✗ Branch 654 not taken.
✗ Branch 655 not taken.
✗ Branch 658 not taken.
✗ Branch 659 not taken.
✗ Branch 662 not taken.
✗ Branch 663 not taken.
✗ Branch 666 not taken.
✗ Branch 667 not taken.
✗ Branch 670 not taken.
✗ Branch 671 not taken.
✗ Branch 674 not taken.
✗ Branch 675 not taken.
✗ Branch 678 not taken.
✗ Branch 679 not taken.
✗ Branch 682 not taken.
✗ Branch 683 not taken.
|
97528 | { return field_; } |
418 | |||
419 | private: | ||
420 | int codim_; | ||
421 | // can point to anything fulfilling the VTKFunction interface | ||
422 | std::shared_ptr<Dune::VTKFunction<GridView>> field_; | ||
423 | }; | ||
424 | |||
425 | } // end namespace Dumux::Vtk | ||
426 | |||
427 | #endif | ||
428 |