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-FileCopyrightText: 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 OnePTests | ||
10 | * \brief Wrapper around the current FVGridVariables to fulfill the layout | ||
11 | * of the new grid variables to test grid variables-based assembly. | ||
12 | */ | ||
13 | #ifndef DUMUX_COMPRESSIBLE_ONEP_TEST_GRID_VARIABLES_HH | ||
14 | #define DUMUX_COMPRESSIBLE_ONEP_TEST_GRID_VARIABLES_HH | ||
15 | |||
16 | #include <dumux/experimental/discretization/gridvariables.hh> | ||
17 | |||
18 | namespace Dumux::OnePCompressibleTest { | ||
19 | |||
20 | template<class GG, class BaseGridVariables, class SolutionVector> | ||
21 | class TestGridVariables | ||
22 | : public BaseGridVariables | ||
23 | , public Dumux::Experimental::GridVariables<GG, SolutionVector> | ||
24 | { | ||
25 | using ExperimentalBase = Dumux::Experimental::GridVariables<GG, SolutionVector>; | ||
26 | |||
27 | public: | ||
28 | // export some types to avoid ambiguity | ||
29 | using GridGeometry = GG; | ||
30 | using Scalar = typename BaseGridVariables::Scalar; | ||
31 | |||
32 | template<class Problem> | ||
33 | 1 | TestGridVariables(std::shared_ptr<Problem> problem, | |
34 | std::shared_ptr<const GridGeometry> gridGeometry, | ||
35 | const SolutionVector& x) | ||
36 | : BaseGridVariables(problem, gridGeometry) | ||
37 |
3/6✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
3 | , ExperimentalBase(gridGeometry, x) |
38 | { | ||
39 | 1 | BaseGridVariables::init(x); | |
40 | 1 | } | |
41 | |||
42 | // update to a new solution | ||
43 | 53 | void update(const SolutionVector& x) | |
44 | { | ||
45 | 53 | BaseGridVariables::update(x); | |
46 | 53 | ExperimentalBase::update(x); | |
47 | } | ||
48 | |||
49 | // overload some functions to avoid ambiguity | ||
50 | 2256 | decltype(auto) gridGeometry() const | |
51 |
6/18✓ Branch 1 taken 11 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 11 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 11 times.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✓ Branch 9 taken 1100 times.
✓ Branch 12 taken 11 times.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✓ Branch 24 taken 11 times.
✗ Branch 25 not taken.
|
2245 | { return ExperimentalBase::gridGeometry(); } |
52 | }; | ||
53 | |||
54 | } // end namespace Dumux::OnePCompressibleTest | ||
55 | |||
56 | #endif | ||
57 |