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 Core | ||
10 | * \brief Implements a spline with a fixed number of sampling points | ||
11 | */ | ||
12 | #ifndef DUMUX_FIXED_LENGTH_SPLINE_HH | ||
13 | #define DUMUX_FIXED_LENGTH_SPLINE_HH | ||
14 | |||
15 | #include <dune/common/fvector.hh> | ||
16 | #include <dune/common/fmatrix.hh> | ||
17 | #include <dune/istl/btdmatrix.hh> | ||
18 | |||
19 | #include "splinecommon_.hh" | ||
20 | |||
21 | namespace Dumux { | ||
22 | |||
23 | /*! | ||
24 | * \ingroup Core | ||
25 | * \brief The common code for all 3rd order polynomial splines with | ||
26 | * more than two sampling points. | ||
27 | */ | ||
28 | template<class ScalarT, int nSamples> | ||
29 |
17/60✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✓ Branch 8 taken 1 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 1 times.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✓ Branch 21 taken 1 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 1 times.
✗ Branch 24 not taken.
✓ Branch 26 taken 1 times.
✗ Branch 27 not taken.
✓ Branch 28 taken 1 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 1 times.
✗ Branch 32 not taken.
✓ Branch 33 taken 1 times.
✗ Branch 34 not taken.
✓ Branch 36 taken 1 times.
✗ Branch 37 not taken.
✓ Branch 38 taken 1 times.
✗ Branch 39 not taken.
✓ Branch 41 taken 1 times.
✗ Branch 42 not taken.
✓ Branch 43 taken 1 times.
✗ Branch 44 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
✓ Branch 48 taken 1 times.
✗ Branch 49 not taken.
✓ Branch 51 taken 1 times.
✗ Branch 52 not taken.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 56 not taken.
✗ Branch 57 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 60 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 64 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
|
18 | class FixedLengthSpline_ |
30 | : public SplineCommon_<ScalarT, | ||
31 | FixedLengthSpline_<ScalarT, nSamples> > | ||
32 | { | ||
33 | friend class SplineCommon_<ScalarT, FixedLengthSpline_<ScalarT, nSamples> >; | ||
34 | |||
35 | using Scalar = ScalarT; | ||
36 | using Vector = Dune::FieldVector<Scalar, nSamples>; | ||
37 | using BlockVector = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >; | ||
38 | using BTDMatrix = Dune::BTDMatrix<Dune::FieldMatrix<Scalar, 1, 1> >; | ||
39 | |||
40 | protected: | ||
41 | 9 | FixedLengthSpline_() | |
42 | 27 | : m_(nSamples) | |
43 | 9 | {}; | |
44 | |||
45 | public: | ||
46 | /*! | ||
47 | * \brief Returns the number of sampling points. | ||
48 | */ | ||
49 | ✗ | int numSamples() const | |
50 | ✗ | { return nSamples; } | |
51 | |||
52 | /////////////////////////////////////// | ||
53 | /////////////////////////////////////// | ||
54 | /////////////////////////////////////// | ||
55 | // Full splines // | ||
56 | /////////////////////////////////////// | ||
57 | /////////////////////////////////////// | ||
58 | /////////////////////////////////////// | ||
59 | |||
60 | /*! | ||
61 | * \brief Set the sampling points and the boundary slopes of a | ||
62 | * full spline using C-style arrays. | ||
63 | * | ||
64 | * This method uses separate array-like objects for the values of | ||
65 | * the X and Y coordinates. In this context 'array-like' means | ||
66 | * that an access to the members is provided via the [] | ||
67 | * operator. (e.g. C arrays, std::vector, std::array, etc.) Each | ||
68 | * array must be of size 'numberSamples' at least. Also, the number of | ||
69 | * sampling points must be larger than 1. | ||
70 | */ | ||
71 | template <class ScalarArrayX, class ScalarArrayY> | ||
72 | void setXYArrays(int numberSamples, | ||
73 | const ScalarArrayX &x, | ||
74 | const ScalarArrayY &y, | ||
75 | Scalar m0, Scalar m1) | ||
76 | { | ||
77 | 2 | assert(numberSamples == numSamples()); | |
78 | |||
79 |
6/6✓ Branch 0 taken 5 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 5 times.
✓ Branch 3 taken 1 times.
✓ Branch 4 taken 5 times.
✓ Branch 5 taken 1 times.
|
18 | for (int i = 0; i < numberSamples; ++i) { |
80 | 20 | xPos_[i] = x[i]; | |
81 | 35 | yPos_[i] = y[i]; | |
82 | } | ||
83 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
3 | makeFullSpline_(m0, m1); |
84 | } | ||
85 | |||
86 | /*! | ||
87 | * \brief Set the sampling points and the boundary slopes of a | ||
88 | * full spline using STL-compatible containers. | ||
89 | * | ||
90 | * This method uses separate STL-compatible containers for the | ||
91 | * values of the sampling points' X and Y | ||
92 | * coordinates. "STL-compatible" means that the container provides | ||
93 | * access to iterators using the begin(), end() methods and also | ||
94 | * provides a size() method. Also, the number of entries in the X | ||
95 | * and the Y containers must be equal and larger than 1. | ||
96 | */ | ||
97 | template <class ScalarContainerX, class ScalarContainerY> | ||
98 | void setXYContainers(const ScalarContainerX &x, | ||
99 | const ScalarContainerY &y, | ||
100 | Scalar m0, Scalar m1) | ||
101 | { | ||
102 | assert(x.size() == y.size()); | ||
103 | assert(x.size() == numSamples()); | ||
104 | |||
105 | std::copy(x.begin(), x.end(), xPos_.begin()); | ||
106 | std::copy(y.begin(), y.end(), yPos_.begin()); | ||
107 | makeFullSpline_(m0, m1); | ||
108 | } | ||
109 | |||
110 | /*! | ||
111 | * \brief Set the sampling points and the boundary slopes of a | ||
112 | * full spline using a C-style array. | ||
113 | * | ||
114 | * This method uses a single array of sampling points, which are | ||
115 | * seen as an array-like object which provides access to the X and | ||
116 | * Y coordinates. In this context 'array-like' means that an | ||
117 | * access to the members is provided via the [] operator. (e.g. C | ||
118 | * arrays, std::vector, std::array, etc.) The array containing | ||
119 | * the sampling points must be of size 'numberSamples' at least. Also, | ||
120 | * the number of sampling points must be larger than 1. | ||
121 | */ | ||
122 | template <class PointArray> | ||
123 | void setArrayOfPoints(int numberSamples, | ||
124 | const PointArray &points, | ||
125 | Scalar m0, | ||
126 | Scalar m1) | ||
127 | { | ||
128 | // a spline with no or just one sampling points? what an | ||
129 | // incredible bad idea! | ||
130 | assert(numberSamples == numSamples()); | ||
131 | |||
132 |
2/2✓ Branch 0 taken 5 times.
✓ Branch 1 taken 1 times.
|
6 | for (int i = 0; i < numberSamples; ++i) { |
133 | 5 | xPos_[i] = points[i][0]; | |
134 | 10 | yPos_[i] = points[i][1]; | |
135 | } | ||
136 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | makeFullSpline_(m0, m1); |
137 | } | ||
138 | |||
139 | /*! | ||
140 | * \brief Set the sampling points and the boundary slopes of a | ||
141 | * full spline using a STL-compatible container of | ||
142 | * array-like objects. | ||
143 | * | ||
144 | * This method uses a single STL-compatible container of sampling | ||
145 | * points, which are assumed to be array-like objects storing the | ||
146 | * X and Y coordinates. "STL-compatible" means that the container | ||
147 | * provides access to iterators using the begin(), end() methods | ||
148 | * and also provides a size() method. Also, the number of entries | ||
149 | * in the X and the Y containers must be equal and larger than 1. | ||
150 | */ | ||
151 | template <class XYContainer> | ||
152 | 1 | void setContainerOfPoints(const XYContainer &points, | |
153 | Scalar m0, | ||
154 | Scalar m1) | ||
155 | { | ||
156 |
2/4✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
|
2 | assert(points.size() == numSamples()); |
157 | |||
158 | typename XYContainer::const_iterator it = points.begin(); | ||
159 | typename XYContainer::const_iterator endIt = points.end(); | ||
160 |
4/4✓ Branch 0 taken 5 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 5 times.
✓ Branch 3 taken 1 times.
|
12 | for (int i = 0; it != endIt; ++i, ++it) { |
161 | 5 | xPos_[i] = (*it)[0]; | |
162 | 10 | yPos_[i] = (*it)[1]; | |
163 | } | ||
164 | |||
165 | // make a full spline | ||
166 | 1 | makeFullSpline_(m0, m1); | |
167 | 1 | } | |
168 | |||
169 | /*! | ||
170 | * \brief Set the sampling points and the boundary slopes of a | ||
171 | * full spline using a STL-compatible container of | ||
172 | * tuple-like objects. | ||
173 | * | ||
174 | * This method uses a single STL-compatible container of sampling | ||
175 | * points, which are assumed to be tuple-like objects storing the | ||
176 | * X and Y coordinates. "tuple-like" means that the objects | ||
177 | * provide access to the x values via std::get<0>(obj) and to the | ||
178 | * y value via std::get<1>(obj) (e.g. std::tuple or | ||
179 | * std::pair). "STL-compatible" means that the container provides | ||
180 | * access to iterators using the begin(), end() methods and also | ||
181 | * provides a size() method. Also, the number of entries in the X | ||
182 | * and the Y containers must be equal and larger than 1. | ||
183 | */ | ||
184 | template <class XYContainer> | ||
185 | 1 | void setContainerOfTuples(const XYContainer &points, | |
186 | Scalar m0, | ||
187 | Scalar m1) | ||
188 | { | ||
189 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
|
1 | assert(points.size() == numSamples()); |
190 | |||
191 | 1 | typename XYContainer::const_iterator it = points.begin(); | |
192 | 1 | typename XYContainer::const_iterator endIt = points.end(); | |
193 |
2/2✓ Branch 0 taken 5 times.
✓ Branch 1 taken 1 times.
|
6 | for (int i = 0; it != endIt; ++i, ++it) { |
194 | 10 | xPos_[i] = std::get<0>(*it); | |
195 | 15 | yPos_[i] = std::get<1>(*it); | |
196 | } | ||
197 | |||
198 | // make a full spline | ||
199 | 1 | makeFullSpline_(m0, m1); | |
200 | 1 | } | |
201 | |||
202 | /////////////////////////////////////// | ||
203 | /////////////////////////////////////// | ||
204 | /////////////////////////////////////// | ||
205 | // Natural splines // | ||
206 | /////////////////////////////////////// | ||
207 | /////////////////////////////////////// | ||
208 | /////////////////////////////////////// | ||
209 | /*! | ||
210 | * \brief Set the sampling points natural spline using C-style arrays. | ||
211 | * | ||
212 | * This method uses separate array-like objects for the values of | ||
213 | * the X and Y coordinates. In this context 'array-like' means | ||
214 | * that an access to the members is provided via the [] | ||
215 | * operator. (e.g. C arrays, std::vector, std::array, etc.) Each | ||
216 | * array must be of size 'numberSamples' at least. Also, the number of | ||
217 | * sampling points must be larger than 1. | ||
218 | */ | ||
219 | template <class ScalarArrayX, class ScalarArrayY> | ||
220 | void setXYArrays(int numberSamples, | ||
221 | const ScalarArrayX &x, | ||
222 | const ScalarArrayY &y) | ||
223 | { | ||
224 | 2 | assert(numberSamples == numSamples()); | |
225 | |||
226 |
6/6✓ Branch 0 taken 5 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 5 times.
✓ Branch 3 taken 1 times.
✓ Branch 4 taken 5 times.
✓ Branch 5 taken 1 times.
|
18 | for (int i = 0; i < numberSamples; ++i) { |
227 | 20 | xPos_[i] = x[i]; | |
228 | 35 | yPos_[i] = y[i]; | |
229 | } | ||
230 | |||
231 |
3/6✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
|
3 | makeNaturalSpline_(); |
232 | } | ||
233 | |||
234 | /*! | ||
235 | * \brief Set the sampling points of a natural spline using | ||
236 | * STL-compatible containers. | ||
237 | * | ||
238 | * This method uses separate STL-compatible containers for the | ||
239 | * values of the sampling points' X and Y | ||
240 | * coordinates. "STL-compatible" means that the container provides | ||
241 | * access to iterators using the begin(), end() methods and also | ||
242 | * provides a size() method. Also, the number of entries in the X | ||
243 | * and the Y containers must be equal and larger than 1. | ||
244 | */ | ||
245 | template <class ScalarContainerX, class ScalarContainerY> | ||
246 | void setXYContainers(const ScalarContainerX &x, | ||
247 | const ScalarContainerY &y) | ||
248 | { | ||
249 | assert(x.size() == y.size()); | ||
250 | assert(x.size() > 1); | ||
251 | |||
252 | setNumSamples_(x.size()); | ||
253 | std::copy(x.begin(), x.end(), xPos_.begin()); | ||
254 | std::copy(y.begin(), y.end(), yPos_.begin()); | ||
255 | makeNaturalSpline_(); | ||
256 | } | ||
257 | |||
258 | |||
259 | /*! | ||
260 | * \brief Set the sampling points of a natural spline using a | ||
261 | * C-style array. | ||
262 | * | ||
263 | * This method uses a single array of sampling points, which are | ||
264 | * seen as an array-like object which provides access to the X and | ||
265 | * Y coordinates. In this context 'array-like' means that an | ||
266 | * access to the members is provided via the [] operator. (e.g. C | ||
267 | * arrays, std::vector, std::array, etc.) The array containing | ||
268 | * the sampling points must be of size 'numberSamples' at least. Also, | ||
269 | * the number of sampling points must be larger than 1. | ||
270 | */ | ||
271 | template <class PointArray> | ||
272 | void setArrayOfPoints(int numberSamples, | ||
273 | const PointArray &points) | ||
274 | { | ||
275 | assert(numberSamples == numSamples()); | ||
276 | |||
277 | for (int i = 0; i < numberSamples; ++i) { | ||
278 | xPos_[i] = points[i][0]; | ||
279 | yPos_[i] = points[i][1]; | ||
280 | } | ||
281 | makeNaturalSpline_(); | ||
282 | } | ||
283 | |||
284 | /*! | ||
285 | * \brief Set the sampling points of a natural spline using a | ||
286 | * STL-compatible container of array-like objects. | ||
287 | * | ||
288 | * This method uses a single STL-compatible container of sampling | ||
289 | * points, which are assumed to be array-like objects storing the | ||
290 | * X and Y coordinates. "STL-compatible" means that the container | ||
291 | * provides access to iterators using the begin(), end() methods | ||
292 | * and also provides a size() method. Also, the number of entries | ||
293 | * in the X and the Y containers must be equal and larger than 1. | ||
294 | */ | ||
295 | template <class XYContainer> | ||
296 | 1 | void setContainerOfPoints(const XYContainer &points) | |
297 | { | ||
298 |
2/4✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
|
2 | assert(points.size() == numSamples()); |
299 | |||
300 | typename XYContainer::const_iterator it = points.begin(); | ||
301 | typename XYContainer::const_iterator endIt = points.end(); | ||
302 |
4/4✓ Branch 0 taken 5 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 5 times.
✓ Branch 3 taken 1 times.
|
12 | for (int i = 0; it != endIt; ++ i, ++it) { |
303 | 5 | xPos_[i] = (*it)[0]; | |
304 | 10 | yPos_[i] = (*it)[1]; | |
305 | } | ||
306 | |||
307 | // make a natural spline | ||
308 | 1 | makeNaturalSpline_(); | |
309 | 1 | } | |
310 | |||
311 | /*! | ||
312 | * \brief Set the sampling points of a natural spline using a | ||
313 | * STL-compatible container of tuple-like objects. | ||
314 | * | ||
315 | * This method uses a single STL-compatible container of sampling | ||
316 | * points, which are assumed to be tuple-like objects storing the | ||
317 | * X and Y coordinates. "tuple-like" means that the objects | ||
318 | * provide access to the x values via std::get<0>(obj) and to the | ||
319 | * y value via std::get<1>(obj) (e.g. std::tuple or | ||
320 | * std::pair). "STL-compatible" means that the container provides | ||
321 | * access to iterators using the begin(), end() methods and also | ||
322 | * provides a size() method. Also, the number of entries in the X | ||
323 | * and the Y containers must be equal and larger than 1. | ||
324 | */ | ||
325 | template <class XYContainer> | ||
326 | 1 | void setContainerOfTuples(const XYContainer &points) | |
327 | { | ||
328 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
|
1 | assert(points.size() == numSamples()); |
329 | |||
330 | 1 | typename XYContainer::const_iterator it = points.begin(); | |
331 | 1 | typename XYContainer::const_iterator endIt = points.end(); | |
332 |
2/2✓ Branch 0 taken 5 times.
✓ Branch 1 taken 1 times.
|
6 | for (int i = 0; it != endIt; ++i, ++it) { |
333 | 10 | xPos_[i] = std::get<0>(*it); | |
334 | 15 | yPos_[i] = std::get<1>(*it); | |
335 | } | ||
336 | |||
337 | // make a natural spline | ||
338 | 1 | makeNaturalSpline_(); | |
339 | 1 | } | |
340 | |||
341 | protected: | ||
342 | /*! | ||
343 | * \brief Create a full spline from the already set sampling points. | ||
344 | * | ||
345 | * Also creates temporary matrix and right hand side vector. | ||
346 | */ | ||
347 | 6 | void makeFullSpline_(Scalar m0, Scalar m1) | |
348 | { | ||
349 | 6 | BTDMatrix M(numSamples()); | |
350 |
2/6✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 6 times.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
|
18 | BlockVector d(numSamples()); |
351 | |||
352 | // create linear system of equations | ||
353 |
1/2✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
|
6 | this->makeFullSystem_(M, d, m0, m1); |
354 | |||
355 | // solve for the moments | ||
356 |
1/2✓ Branch 1 taken 6 times.
✗ Branch 2 not taken.
|
6 | M.solve(m_, d); |
357 | 6 | } | |
358 | |||
359 | /*! | ||
360 | * \brief Create a natural spline from the already set sampling points. | ||
361 | * | ||
362 | * Also creates temporary matrix and right hand side vector. | ||
363 | */ | ||
364 | 5 | void makeNaturalSpline_() | |
365 | { | ||
366 | 5 | BTDMatrix M(numSamples()); | |
367 |
2/6✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 5 times.
✗ Branch 4 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
|
15 | BlockVector d(numSamples()); |
368 | |||
369 | // create linear system of equations | ||
370 |
1/2✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
|
5 | this->makeNaturalSystem_(M, d); |
371 | |||
372 | // solve for the moments | ||
373 |
1/2✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
|
5 | M.solve(m_, d); |
374 | 5 | } | |
375 | |||
376 | /*! | ||
377 | * \brief Returns the x coordinate of the i-th sampling point. | ||
378 | */ | ||
379 | Scalar x_(int i) const | ||
380 |
100/176✗ Branch 0 not taken.
✓ Branch 1 taken 1972 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1972 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1972 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 1972 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1972 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 1972 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 1972 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1972 times.
✗ Branch 16 not taken.
✓ Branch 17 taken 2053 times.
✗ Branch 18 not taken.
✓ Branch 19 taken 2053 times.
✗ Branch 20 not taken.
✓ Branch 21 taken 2053 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 2053 times.
✗ Branch 24 not taken.
✓ Branch 25 taken 33 times.
✗ Branch 26 not taken.
✓ Branch 27 taken 33 times.
✗ Branch 28 not taken.
✓ Branch 29 taken 33 times.
✗ Branch 30 not taken.
✓ Branch 31 taken 33 times.
✗ Branch 32 not taken.
✓ Branch 33 taken 33 times.
✗ Branch 34 not taken.
✓ Branch 35 taken 33 times.
✗ Branch 36 not taken.
✓ Branch 37 taken 33 times.
✗ Branch 38 not taken.
✓ Branch 39 taken 33 times.
✗ Branch 40 not taken.
✓ Branch 41 taken 33 times.
✗ Branch 42 not taken.
✓ Branch 43 taken 33 times.
✗ Branch 44 not taken.
✓ Branch 45 taken 33 times.
✗ Branch 46 not taken.
✓ Branch 47 taken 33 times.
✗ Branch 92 not taken.
✓ Branch 93 taken 2113 times.
✗ Branch 94 not taken.
✓ Branch 95 taken 2113 times.
✗ Branch 96 not taken.
✓ Branch 97 taken 2113 times.
✗ Branch 98 not taken.
✓ Branch 99 taken 2113 times.
✗ Branch 100 not taken.
✓ Branch 101 taken 6 times.
✗ Branch 102 not taken.
✓ Branch 103 taken 6 times.
✗ Branch 104 not taken.
✓ Branch 105 taken 6 times.
✗ Branch 106 not taken.
✓ Branch 107 taken 6 times.
✗ Branch 120 not taken.
✓ Branch 121 taken 6 times.
✗ Branch 122 not taken.
✓ Branch 123 taken 6 times.
✗ Branch 124 not taken.
✓ Branch 125 taken 6 times.
✗ Branch 126 not taken.
✓ Branch 127 taken 6 times.
✓ Branch 132 taken 2053 times.
✗ Branch 133 not taken.
✓ Branch 134 taken 2053 times.
✗ Branch 135 not taken.
✗ Branch 136 not taken.
✓ Branch 137 taken 2053 times.
✗ Branch 138 not taken.
✓ Branch 139 taken 2053 times.
✗ Branch 140 not taken.
✗ Branch 141 not taken.
✗ Branch 142 not taken.
✗ Branch 143 not taken.
✗ Branch 146 not taken.
✗ Branch 147 not taken.
✗ Branch 148 not taken.
✗ Branch 149 not taken.
✓ Branch 152 taken 1146 times.
✓ Branch 153 taken 2960 times.
✓ Branch 154 taken 1146 times.
✓ Branch 155 taken 2960 times.
✓ Branch 156 taken 2113 times.
✗ Branch 157 not taken.
✓ Branch 158 taken 2113 times.
✗ Branch 159 not taken.
✗ Branch 160 not taken.
✓ Branch 161 taken 2113 times.
✗ Branch 162 not taken.
✓ Branch 163 taken 2113 times.
✗ 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 not taken.
✗ Branch 171 not taken.
✓ Branch 176 taken 1206 times.
✓ Branch 177 taken 3020 times.
✓ Branch 178 taken 1206 times.
✓ Branch 179 taken 3020 times.
✓ Branch 180 taken 1963 times.
✗ Branch 181 not taken.
✓ Branch 182 taken 1963 times.
✗ Branch 183 not taken.
✓ Branch 184 taken 1963 times.
✗ Branch 185 not taken.
✓ Branch 186 taken 1963 times.
✗ Branch 187 not taken.
✓ Branch 188 taken 1963 times.
✗ Branch 189 not taken.
✓ Branch 190 taken 1963 times.
✗ Branch 191 not taken.
✓ Branch 192 taken 1963 times.
✗ Branch 193 not taken.
✓ Branch 194 taken 1963 times.
✗ Branch 195 not taken.
✓ Branch 196 taken 1048 times.
✓ Branch 197 taken 2878 times.
✓ Branch 198 taken 1048 times.
✓ Branch 199 taken 2878 times.
✓ Branch 200 taken 1963 times.
✗ Branch 201 not taken.
✓ Branch 202 taken 1963 times.
✗ Branch 203 not taken.
✓ Branch 204 taken 1956 times.
✓ Branch 205 taken 7 times.
✓ Branch 206 taken 1956 times.
✓ Branch 207 taken 7 times.
✓ Branch 208 taken 10 times.
✓ Branch 209 taken 4 times.
✓ Branch 210 taken 10 times.
✓ Branch 211 taken 4 times.
✓ Branch 218 taken 7 times.
✗ Branch 219 not taken.
✓ Branch 220 taken 7 times.
✗ Branch 221 not taken.
✓ Branch 224 taken 1982 times.
✓ Branch 225 taken 20 times.
✓ Branch 226 taken 1982 times.
✓ Branch 227 taken 20 times.
✓ Branch 228 taken 1962 times.
✓ Branch 229 taken 20 times.
✓ Branch 230 taken 1962 times.
✓ Branch 231 taken 20 times.
✓ Branch 232 taken 1960 times.
✓ Branch 233 taken 2 times.
✓ Branch 234 taken 1960 times.
✓ Branch 235 taken 2 times.
✓ Branch 238 taken 10 times.
✓ Branch 239 taken 10 times.
✓ Branch 240 taken 10 times.
✓ Branch 241 taken 10 times.
✓ Branch 242 taken 20 times.
✗ Branch 243 not taken.
✓ Branch 244 taken 20 times.
✗ Branch 245 not taken.
✓ Branch 248 taken 10 times.
✓ Branch 249 taken 10 times.
✓ Branch 250 taken 10 times.
✓ Branch 251 taken 10 times.
✓ Branch 252 taken 1962 times.
✗ Branch 253 not taken.
✓ Branch 254 taken 1962 times.
✗ Branch 255 not taken.
|
93176 | { return xPos_[i]; } |
381 | |||
382 | /*! | ||
383 | * \brief Returns the y coordinate of the i-th sampling point. | ||
384 | */ | ||
385 | Scalar y_(int i) const | ||
386 |
12/24✗ Branch 0 not taken.
✓ Branch 1 taken 1972 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1972 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1972 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 1972 times.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✓ Branch 28 taken 10 times.
✓ Branch 29 taken 10 times.
✓ Branch 30 taken 10 times.
✓ Branch 31 taken 10 times.
✓ Branch 32 taken 10 times.
✓ Branch 33 taken 10 times.
✓ Branch 34 taken 10 times.
✓ Branch 35 taken 10 times.
|
8256 | { return yPos_[i]; } |
387 | |||
388 | /*! | ||
389 | * \brief Returns the moment (i.e. second derivative) of the | ||
390 | * spline at the i-th sampling point. | ||
391 | */ | ||
392 | Scalar moment_(int i) const | ||
393 |
7/12✗ Branch 0 not taken.
✓ Branch 1 taken 1972 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1972 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1972 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 1972 times.
✓ Branch 10 taken 981 times.
✓ Branch 11 taken 982 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 981 times.
|
13795 | { return m_[i]; } |
394 | |||
395 | Vector xPos_; | ||
396 | Vector yPos_; | ||
397 | BlockVector m_; | ||
398 | }; | ||
399 | |||
400 | } // end namespace Dumux | ||
401 | |||
402 | #endif | ||
403 |