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 FacetCoupling | ||
10 | * \copydoc Dumux::CCMpfaOFacetCouplingInteractionVolume | ||
11 | */ | ||
12 | #ifndef DUMUX_MULTIDOMAIN_FACET_CC_MPFA_O_INTERACTIONVOLUME_HH | ||
13 | #define DUMUX_MULTIDOMAIN_FACET_CC_MPFA_O_INTERACTIONVOLUME_HH | ||
14 | |||
15 | #include <dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh> | ||
16 | #include <dumux/discretization/cellcentered/mpfa/omethod/scvgeometryhelper.hh> | ||
17 | #include <dumux/discretization/cellcentered/mpfa/interactionvolumebase.hh> | ||
18 | #include <dumux/discretization/cellcentered/mpfa/localfacedata.hh> | ||
19 | #include <dumux/discretization/cellcentered/mpfa/methods.hh> | ||
20 | |||
21 | #include "localassembler.hh" | ||
22 | #include "localsubcontrolentities.hh" | ||
23 | |||
24 | namespace Dumux { | ||
25 | |||
26 | //! Forward declaration of the facet coupling MPFA-O interaction volume | ||
27 | template< class Traits > class CCMpfaOFacetCouplingInteractionVolume; | ||
28 | |||
29 | /*! | ||
30 | * \ingroup FacetCoupling | ||
31 | * \brief The default interaction volume traits class for the mpfa-o method | ||
32 | * in the context of facet coupling. This uses dynamic types types for | ||
33 | * matrices/vectors in order to work on general grids. | ||
34 | * | ||
35 | * \tparam NodalIndexSet The type used for the dual grid's nodal index sets | ||
36 | * \tparam Scalar The Type used for scalar values | ||
37 | */ | ||
38 | template< class NodalIndexSet, class Scalar > | ||
39 | struct CCMpfaOFacetCouplingDefaultInteractionVolumeTraits | ||
40 | : public CCMpfaODefaultInteractionVolumeTraits< NodalIndexSet, Scalar > | ||
41 | { | ||
42 | private: | ||
43 | //! export the type for the interaction volume index set | ||
44 | using IVIndexSet = CCMpfaOInteractionVolumeIndexSet< NodalIndexSet >; | ||
45 | |||
46 | static constexpr int dim = NodalIndexSet::Traits::GridView::dimension; | ||
47 | static constexpr int dimWorld = NodalIndexSet::Traits::GridView::dimensionworld; | ||
48 | |||
49 | public: | ||
50 | //! export the type of interaction-volume local scvs | ||
51 | using LocalScvType = CCMpfaOFacetCouplingInteractionVolumeLocalScv< IVIndexSet, Scalar, dim, dimWorld >; | ||
52 | //! export the type of interaction-volume local scvfs | ||
53 | using LocalScvfType = CCMpfaOFacetCouplingInteractionVolumeLocalScvf< IVIndexSet >; | ||
54 | |||
55 | //! Use the assembler that considers the coupled domain | ||
56 | template<class Problem, class FVElementGeometry, class ElemVolVars> | ||
57 | using LocalAssembler = MpfaOFacetCouplingInteractionVolumeAssembler<Problem, FVElementGeometry, ElemVolVars>; | ||
58 | }; | ||
59 | |||
60 | /*! | ||
61 | * \ingroup FacetCoupling | ||
62 | * \brief Class for the interaction volume of the mpfa-o scheme in the | ||
63 | * context of models involving coupling to a lower-dimensional | ||
64 | * domain across the element facets. | ||
65 | */ | ||
66 | template< class Traits > | ||
67 | 27013336 | class CCMpfaOFacetCouplingInteractionVolume | |
68 | : public CCMpfaInteractionVolumeBase< Traits > | ||
69 | { | ||
70 | using GridView = typename Traits::GridView; | ||
71 | using Element = typename GridView::template Codim<0>::Entity; | ||
72 | |||
73 | using IndexSet = typename Traits::IndexSet; | ||
74 | using GridIndexType = typename IndexSet::GridIndexType; | ||
75 | using LocalIndexType = typename IndexSet::LocalIndexType; | ||
76 | using Stencil = typename IndexSet::NodalGridStencilType; | ||
77 | |||
78 | using LocalScvType = typename Traits::LocalScvType; | ||
79 | using LocalScvfType = typename Traits::LocalScvfType; | ||
80 | using LocalFaceData = typename Traits::LocalFaceData; | ||
81 | |||
82 | public: | ||
83 | //! Reuse standard o-scheme's Dirichlet Data class | ||
84 | using DirichletData = typename CCMpfaOInteractionVolume<Traits>::DirichletData; | ||
85 | |||
86 | //! Define data structure to store which scvfs lie on interior boundaries | ||
87 | class InteriorBoundaryData | ||
88 | { | ||
89 | GridIndexType scvfIdx_; | ||
90 | |||
91 | public: | ||
92 | //! Constructor | ||
93 | 873472 | InteriorBoundaryData(GridIndexType scvfIdx) : scvfIdx_(scvfIdx) {} | |
94 | |||
95 | //! Return corresponding scvf index | ||
96 | ✗ | GridIndexType scvfIndex() const { return scvfIdx_; } | |
97 | }; | ||
98 | |||
99 | //! publicly state the mpfa-scheme this interaction volume is associated with | ||
100 | static constexpr MpfaMethods MpfaMethod = MpfaMethods::oMethod; | ||
101 | |||
102 | //! Sets up the local scope for a given iv index set | ||
103 | template< class Problem, class FVElementGeometry > | ||
104 | 6925384 | void bind(const IndexSet& indexSet, | |
105 | const Problem& problem, | ||
106 | const FVElementGeometry& fvGeometry) | ||
107 | { | ||
108 | // for the o-scheme, the stencil is equal to the scv | ||
109 | // index set of the dual grid's nodal index set | ||
110 | 6925384 | stencil_ = &indexSet.nodalIndexSet().gridScvIndices(); | |
111 | |||
112 | // find out how many facet elements appear in this iv | ||
113 | 6925384 | std::size_t numFacetElems = 0; | |
114 | 6925384 | std::size_t numOutsideFaces = 0; | |
115 | 13850768 | std::vector<bool> isOnInteriorBoundary(indexSet.numFaces(), false); | |
116 |
2/2✓ Branch 0 taken 21617407 times.
✓ Branch 1 taken 3859048 times.
|
47022455 | for (LocalIndexType fIdx = 0; fIdx < indexSet.numFaces(); ++fIdx) |
117 | { | ||
118 | 40097071 | const auto& scvf = fvGeometry.scvf(indexSet.gridScvfIndex(fIdx)); | |
119 |
1/2✓ Branch 1 taken 21617407 times.
✗ Branch 2 not taken.
|
80194142 | const auto element = fvGeometry.gridGeometry().element(scvf.insideScvIdx()); |
120 |
6/6✓ Branch 0 taken 873472 times.
✓ Branch 1 taken 20743935 times.
✓ Branch 2 taken 873472 times.
✓ Branch 3 taken 20743935 times.
✓ Branch 4 taken 873472 times.
✓ Branch 5 taken 20743935 times.
|
120291213 | if (problem.couplingManager().isOnInteriorBoundary(element, scvf)) |
121 | { | ||
122 | 1709104 | numFacetElems++; | |
123 |
2/2✓ Branch 0 taken 872884 times.
✓ Branch 1 taken 588 times.
|
1709104 | if (!scvf.boundary()) |
124 | 3417032 | numOutsideFaces += scvf.numOutsideScvs(); | |
125 |
2/4✓ Branch 1 taken 873472 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 873472 times.
✗ Branch 5 not taken.
|
3418208 | isOnInteriorBoundary[fIdx] = true; |
126 |
1/2✓ Branch 1 taken 873472 times.
✗ Branch 2 not taken.
|
1709104 | interiorBoundaryData_.emplace_back( scvf.index() ); |
127 | } | ||
128 | } | ||
129 | |||
130 | // number of interaction-volume-local scvs(=node-local for o-scheme) and scvfs | ||
131 | 6925384 | numFaces_ = indexSet.numFaces() + numOutsideFaces; | |
132 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3859048 times.
|
6925384 | const auto numLocalScvs = indexSet.numScvs(); |
133 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3859048 times.
|
6925384 | const auto numGlobalScvfs = indexSet.nodalIndexSet().numScvfs(); |
134 | |||
135 | // reserve memory for local entities | ||
136 |
2/4✗ Branch 0 not taken.
✓ Branch 1 taken 3859048 times.
✓ Branch 3 taken 3859048 times.
✗ Branch 4 not taken.
|
6925384 | elements_.clear(); elements_.reserve(numLocalScvs); |
137 |
2/4✗ Branch 0 not taken.
✓ Branch 1 taken 3859048 times.
✓ Branch 3 taken 3859048 times.
✗ Branch 4 not taken.
|
6925384 | scvs_.clear(); scvs_.reserve(numLocalScvs); |
138 |
3/5✗ Branch 0 not taken.
✓ Branch 1 taken 3500748 times.
✓ Branch 2 taken 358300 times.
✓ Branch 3 taken 3500748 times.
✗ Branch 4 not taken.
|
6925384 | scvfs_.clear(); scvfs_.reserve(numFaces_); |
139 |
2/4✗ Branch 0 not taken.
✓ Branch 1 taken 3859048 times.
✓ Branch 3 taken 3859048 times.
✗ Branch 4 not taken.
|
6925384 | localFaceData_.clear(); localFaceData_.reserve(numGlobalScvfs); |
140 |
2/4✗ Branch 0 not taken.
✓ Branch 1 taken 3859048 times.
✓ Branch 3 taken 3859048 times.
✗ Branch 4 not taken.
|
6925384 | dirichletData_.clear(); dirichletData_.reserve(numFaces_); |
141 | |||
142 | // keep track of the number of unknowns etc | ||
143 | 6925384 | numUnknowns_ = 0; | |
144 | 6925384 | numKnowns_ = numLocalScvs + numFacetElems; | |
145 | |||
146 | // index map from grid scvf index to local scvf index | ||
147 | 13850768 | std::unordered_map<GridIndexType, LocalIndexType> scvfIndexMap; | |
148 | |||
149 | // set up objects related to sub-control volume faces | ||
150 | 6925384 | LocalIndexType facetElementCounter = 0; | |
151 |
2/2✓ Branch 0 taken 21617407 times.
✓ Branch 1 taken 3859048 times.
|
47022455 | for (LocalIndexType faceIdxLocal = 0; faceIdxLocal < indexSet.numFaces(); ++faceIdxLocal) |
152 | { | ||
153 | 40097071 | const auto gridScvfIdx = indexSet.gridScvfIndex(faceIdxLocal); | |
154 | 80194142 | const auto& flipScvfIdxSet = fvGeometry.gridGeometry().flipScvfIndexSet()[gridScvfIdx]; | |
155 | 40097071 | const auto& scvf = fvGeometry.scvf(gridScvfIdx); | |
156 |
1/2✓ Branch 1 taken 21617407 times.
✗ Branch 2 not taken.
|
80194142 | const auto element = fvGeometry.gridGeometry().element(scvf.insideScvIdx()); |
157 | |||
158 | // the neighboring scvs in local indices (order: 0 - inside scv, 1..n - outside scvs) | ||
159 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 21617407 times.
|
40097071 | const auto& neighborScvIndicesLocal = indexSet.neighboringLocalScvIndices(faceIdxLocal); |
160 |
1/2✓ Branch 1 taken 1409840 times.
✗ Branch 2 not taken.
|
40097071 | const auto numNeighborScvs = neighborScvIndicesLocal.size(); |
161 | |||
162 | // the ív-local scvf index of the face about to be created | ||
163 |
1/2✓ Branch 1 taken 21617407 times.
✗ Branch 2 not taken.
|
40097071 | const auto curLocalScvfIdx = scvfs_.size(); |
164 |
1/2✓ Branch 1 taken 21617407 times.
✗ Branch 2 not taken.
|
40097071 | scvfIndexMap[gridScvfIdx] = curLocalScvfIdx; |
165 |
2/4✓ Branch 1 taken 21617407 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 20207567 times.
✗ Branch 5 not taken.
|
78784302 | localFaceData_.emplace_back(curLocalScvfIdx, neighborScvIndicesLocal[0], scvf.index()); |
166 | |||
167 | // on interior boundaries, create local scvfs for inside AND all outside scvfs | ||
168 |
6/6✓ Branch 0 taken 873472 times.
✓ Branch 1 taken 20743935 times.
✓ Branch 2 taken 873472 times.
✓ Branch 3 taken 20743935 times.
✓ Branch 4 taken 873472 times.
✓ Branch 5 taken 20743935 times.
|
120291213 | if (isOnInteriorBoundary[faceIdxLocal]) |
169 | { | ||
170 | 1709104 | const LocalIndexType facetLocalDofIdx = numLocalScvs + facetElementCounter++; | |
171 |
4/4✓ Branch 0 taken 588 times.
✓ Branch 1 taken 872884 times.
✓ Branch 2 taken 588 times.
✓ Branch 3 taken 841842 times.
|
3418208 | const bool isDirichlet = problem.interiorBoundaryTypes(element, scvf).hasOnlyDirichlet(); |
172 | |||
173 | // create local scvf | ||
174 |
2/2✓ Branch 0 taken 588 times.
✓ Branch 1 taken 872884 times.
|
1709104 | if (isDirichlet) |
175 |
1/2✓ Branch 1 taken 588 times.
✗ Branch 2 not taken.
|
588 | scvfs_.emplace_back(scvf, neighborScvIndicesLocal, facetLocalDofIdx, /*isDirichlet*/true, facetLocalDofIdx); |
176 | else | ||
177 |
1/2✓ Branch 1 taken 872884 times.
✗ Branch 2 not taken.
|
1708516 | scvfs_.emplace_back(scvf, neighborScvIndicesLocal, numUnknowns_++, /*isDirichlet*/false, facetLocalDofIdx); |
178 | |||
179 | // create "outside" local scvfs | ||
180 |
2/2✓ Branch 0 taken 872884 times.
✓ Branch 1 taken 588 times.
|
1709104 | if (!scvf.boundary()) |
181 | { | ||
182 |
2/2✓ Branch 0 taken 872884 times.
✓ Branch 1 taken 872884 times.
|
3417032 | for (LocalIndexType i = 1; i < numNeighborScvs; ++i) |
183 | { | ||
184 | 1708516 | const auto outsideGridScvfIdx = flipScvfIdxSet[i-1]; | |
185 | 1708516 | const auto& flipScvf = fvGeometry.scvf(outsideGridScvfIdx); | |
186 |
2/4✓ Branch 1 taken 17840 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 17840 times.
✗ Branch 5 not taken.
|
3417032 | const auto& outsideFlipScvfIdxSet = fvGeometry.gridGeometry().flipScvfIndexSet()[outsideGridScvfIdx]; |
187 | |||
188 | // rearrange the neighbor scv index vector corresponding to this scvfs flip scvf index set | ||
189 | using std::swap; | ||
190 |
2/4✓ Branch 1 taken 17840 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 17840 times.
✗ Branch 4 not taken.
|
1744196 | auto outsideNeighborScvIdxSet = neighborScvIndicesLocal; |
191 | 3399192 | outsideNeighborScvIdxSet[0] = outsideNeighborScvIdxSet[i]; | |
192 |
4/4✓ Branch 0 taken 872884 times.
✓ Branch 1 taken 872884 times.
✓ Branch 2 taken 17840 times.
✓ Branch 3 taken 17840 times.
|
3417032 | for (LocalIndexType j = 0; j < outsideFlipScvfIdxSet.size(); ++j) |
193 | { | ||
194 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 855044 times.
|
1708516 | const auto flipScvfIdx = outsideFlipScvfIdxSet[j]; |
195 |
3/6✗ Branch 0 not taken.
✓ Branch 1 taken 855044 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 855044 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 855044 times.
|
5125548 | auto it = std::find(flipScvfIdxSet.begin(), flipScvfIdxSet.end(), flipScvfIdx); |
196 | |||
197 | // if we found the index, use corresponding local scv index | ||
198 |
3/6✗ Branch 0 not taken.
✓ Branch 1 taken 872884 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 872884 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 17840 times.
|
3434872 | if (it != flipScvfIdxSet.end()) |
199 | ✗ | outsideNeighborScvIdxSet[j+1] = neighborScvIndicesLocal[std::distance(flipScvfIdxSet.begin(), it)+1]; | |
200 | |||
201 | // otherwise this must be the "inside" scvf again | ||
202 | else | ||
203 | { | ||
204 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 872884 times.
|
1708516 | assert(flipScvfIdx == gridScvfIdx); |
205 | 5107708 | outsideNeighborScvIdxSet[j+1] = neighborScvIndicesLocal[0]; | |
206 | } | ||
207 | } | ||
208 | |||
209 |
1/2✓ Branch 1 taken 872884 times.
✗ Branch 2 not taken.
|
1708516 | scvfIndexMap[outsideGridScvfIdx] = curLocalScvfIdx+i; |
210 |
2/4✓ Branch 1 taken 872884 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 855044 times.
✗ Branch 5 not taken.
|
3399192 | localFaceData_.emplace_back(curLocalScvfIdx+i, outsideNeighborScvIdxSet[0], flipScvf.index()); |
211 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 872884 times.
|
1708516 | if (isDirichlet) |
212 | ✗ | scvfs_.emplace_back(flipScvf, outsideNeighborScvIdxSet, facetLocalDofIdx, /*isDirichlet*/true, facetLocalDofIdx); | |
213 | else | ||
214 |
1/4✓ Branch 1 taken 872884 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
|
1708516 | scvfs_.emplace_back(flipScvf, outsideNeighborScvIdxSet, numUnknowns_++, /*isDirichlet*/false, facetLocalDofIdx); |
215 | } | ||
216 | } | ||
217 | } | ||
218 | |||
219 | // otherwise create boundary scvf ... | ||
220 |
2/2✓ Branch 0 taken 323068 times.
✓ Branch 1 taken 20420867 times.
|
38387967 | else if (scvf.boundary()) |
221 | { | ||
222 |
6/6✓ Branch 0 taken 14850 times.
✓ Branch 1 taken 267944 times.
✓ Branch 2 taken 44414 times.
✓ Branch 3 taken 278654 times.
✓ Branch 4 taken 44414 times.
✓ Branch 5 taken 236780 times.
|
1474560 | if (problem.boundaryTypes(element, scvf).hasOnlyDirichlet()) |
223 | { | ||
224 |
1/2✓ Branch 1 taken 46014 times.
✗ Branch 2 not taken.
|
46394 | scvfs_.emplace_back(scvf, neighborScvIndicesLocal, numKnowns_++, /*isDirichlet*/true); |
225 |
2/4✓ Branch 1 taken 46014 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 46014 times.
✗ Branch 5 not taken.
|
92788 | dirichletData_.emplace_back(scvf.outsideScvIdx()); |
226 | } | ||
227 | else | ||
228 |
1/2✓ Branch 1 taken 277054 times.
✗ Branch 2 not taken.
|
502466 | scvfs_.emplace_back(scvf, neighborScvIndicesLocal, numUnknowns_++, /*isDirichlet*/false); |
229 | } | ||
230 | |||
231 | // ... or interior scvf | ||
232 | else | ||
233 | { | ||
234 |
1/2✓ Branch 1 taken 20420867 times.
✗ Branch 2 not taken.
|
37839107 | scvfs_.emplace_back(scvf, neighborScvIndicesLocal, numUnknowns_++, /*isDirichlet*/false); |
235 | |||
236 | // add local face data objects for the outside faces | ||
237 |
2/2✓ Branch 0 taken 20420867 times.
✓ Branch 1 taken 20420867 times.
|
75678214 | for (LocalIndexType i = 1; i < numNeighborScvs; ++i) |
238 | { | ||
239 | // loop over scvfs in outside scv until we find the one coinciding with current scvf | ||
240 | 37839107 | const auto outsideLocalScvIdx = neighborScvIndicesLocal[i]; | |
241 | 113517321 | const auto& flipScvfIndex = fvGeometry.gridGeometry().flipScvfIndexSet()[scvf.index()][i-1]; | |
242 | 37839107 | const auto& flipScvf = fvGeometry.scvf(flipScvfIndex); | |
243 |
1/2✓ Branch 1 taken 20420867 times.
✗ Branch 2 not taken.
|
37839107 | scvfIndexMap[flipScvfIndex] = curLocalScvfIdx; |
244 | 113517321 | localFaceData_.emplace_back(curLocalScvfIdx, // iv-local scvf idx | |
245 | outsideLocalScvIdx, // iv-local scv index | ||
246 |
1/2✓ Branch 1 taken 20420867 times.
✗ Branch 2 not taken.
|
37839107 | i-1, // scvf-local index in outside faces |
247 | flipScvf.index()); // global scvf index | ||
248 | } | ||
249 | } | ||
250 | } | ||
251 | |||
252 | // set up stuff related to sub-control volumes | ||
253 |
2/2✓ Branch 0 taken 21455579 times.
✓ Branch 1 taken 3859048 times.
|
46747731 | for (LocalIndexType scvIdxLocal = 0; scvIdxLocal < numLocalScvs; scvIdxLocal++) |
254 | { | ||
255 |
3/6✓ Branch 1 taken 21455579 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 21455579 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 21455579 times.
✗ Branch 8 not taken.
|
79644694 | elements_.emplace_back(fvGeometry.gridGeometry().element( stencil()[scvIdxLocal] )); |
256 |
1/2✓ Branch 1 taken 21455579 times.
✗ Branch 2 not taken.
|
39822347 | scvs_.emplace_back(fvGeometry.gridGeometry().mpfaHelper(), |
257 | fvGeometry, | ||
258 |
4/4✓ Branch 0 taken 3859048 times.
✓ Branch 1 taken 17596531 times.
✓ Branch 2 taken 3859048 times.
✓ Branch 3 taken 17596531 times.
|
79644694 | fvGeometry.scv( stencil()[scvIdxLocal] ), |
259 | scvIdxLocal, | ||
260 | indexSet, | ||
261 | scvfIndexMap); | ||
262 | } | ||
263 | 6925384 | } | |
264 | |||
265 | //! returns the number of primary scvfs of this interaction volume | ||
266 | ✗ | std::size_t numFaces() const | |
267 | ✗ | { return numFaces_; } | |
268 | |||
269 | //! returns the number of intermediate unknowns within this interaction volume | ||
270 | ✗ | std::size_t numUnknowns() const | |
271 | ✗ | { return numUnknowns_; } | |
272 | |||
273 | //! returns the number of (in this context) known solution values within this interaction volume | ||
274 | ✗ | std::size_t numKnowns() const | |
275 | ✗ | { return numKnowns_; } | |
276 | |||
277 | //! returns the number of scvs embedded in this interaction volume | ||
278 | std::size_t numScvs() const | ||
279 |
6/6✓ Branch 0 taken 16234497 times.
✓ Branch 1 taken 4099956 times.
✓ Branch 2 taken 12524048 times.
✓ Branch 3 taken 3223032 times.
✓ Branch 4 taken 8243648 times.
✓ Branch 5 taken 2120832 times.
|
46446013 | { return scvs_.size(); } |
280 | |||
281 | //! returns the cell-stencil of this interaction volume | ||
282 | ✗ | const Stencil& stencil() const | |
283 | ✗ | { return *stencil_; } | |
284 | |||
285 | //! returns the grid element corresponding to a given iv-local scv idx | ||
286 | const Element& element(LocalIndexType ivLocalScvIdx) const | ||
287 |
6/11✓ Branch 1 taken 5615706 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2267730 times.
✓ Branch 4 taken 5615706 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2267730 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 4606476 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 4606476 times.
✗ Branch 13 not taken.
|
300432574 | { return elements_[ivLocalScvIdx]; } |
288 | |||
289 | //! returns the local scvf entity corresponding to a given iv-local scvf idx | ||
290 | const LocalScvfType& localScvf(LocalIndexType ivLocalScvfIdx) const | ||
291 |
42/46✓ Branch 2 taken 13607288 times.
✓ Branch 3 taken 49344 times.
✓ Branch 4 taken 23106475 times.
✓ Branch 5 taken 9548531 times.
✓ Branch 6 taken 9499187 times.
✓ Branch 7 taken 9499187 times.
✓ Branch 8 taken 8258055 times.
✓ Branch 9 taken 10280911 times.
✓ Branch 10 taken 16141491 times.
✓ Branch 11 taken 18164347 times.
✓ Branch 12 taken 7883436 times.
✓ Branch 13 taken 7883436 times.
✓ Branch 14 taken 6828316 times.
✓ Branch 15 taken 8531852 times.
✓ Branch 16 taken 13446124 times.
✓ Branch 17 taken 15149660 times.
✓ Branch 18 taken 6617808 times.
✓ Branch 19 taken 6617808 times.
✓ Branch 20 taken 17907140 times.
✓ Branch 21 taken 7256840 times.
✓ Branch 22 taken 17907140 times.
✓ Branch 23 taken 7256840 times.
✓ Branch 28 taken 11162994 times.
✓ Branch 29 taken 11162994 times.
✓ Branch 30 taken 11162994 times.
✓ Branch 31 taken 11162994 times.
✓ Branch 32 taken 9547630 times.
✓ Branch 33 taken 12177974 times.
✓ Branch 34 taken 9547630 times.
✓ Branch 35 taken 12177974 times.
✓ Branch 38 taken 7831856 times.
✓ Branch 39 taken 31320 times.
✓ Branch 40 taken 7831856 times.
✓ Branch 41 taken 31320 times.
✓ Branch 46 taken 4606476 times.
✓ Branch 47 taken 4606476 times.
✓ Branch 48 taken 4606476 times.
✓ Branch 49 taken 4606476 times.
✓ Branch 50 taken 3931588 times.
✓ Branch 51 taken 5035444 times.
✓ Branch 52 taken 3931588 times.
✓ Branch 53 taken 5035444 times.
✗ Branch 56 not taken.
✗ Branch 57 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
|
504792550 | { return scvfs_[ivLocalScvfIdx]; } |
292 | |||
293 | //! returns the local scv entity corresponding to a given iv-local scv idx | ||
294 | const LocalScvType& localScv(LocalIndexType ivLocalScvIdx) const | ||
295 |
50/62✓ Branch 0 taken 13607288 times.
✓ Branch 1 taken 49344 times.
✓ Branch 2 taken 13607288 times.
✓ Branch 3 taken 49344 times.
✓ Branch 4 taken 2447420 times.
✓ Branch 5 taken 7051767 times.
✓ Branch 6 taken 2447420 times.
✓ Branch 7 taken 7051767 times.
✓ Branch 8 taken 4334542 times.
✓ Branch 9 taken 12818377 times.
✓ Branch 10 taken 4334542 times.
✓ Branch 11 taken 12818377 times.
✓ Branch 12 taken 1887860 times.
✓ Branch 13 taken 5792224 times.
✓ Branch 14 taken 2029452 times.
✓ Branch 15 taken 6207552 times.
✓ Branch 16 taken 13654068 times.
✓ Branch 17 taken 5295032 times.
✓ Branch 18 taken 13723224 times.
✓ Branch 19 taken 5492528 times.
✓ Branch 20 taken 1784380 times.
✓ Branch 21 taken 5478072 times.
✓ Branch 22 taken 1643608 times.
✓ Branch 23 taken 5067828 times.
✓ Branch 24 taken 1924692 times.
✓ Branch 25 taken 5222070 times.
✓ Branch 26 taken 1854716 times.
✓ Branch 27 taken 5019490 times.
✓ Branch 28 taken 2792848 times.
✓ Branch 29 taken 8184434 times.
✓ Branch 30 taken 2792848 times.
✓ Branch 31 taken 8184434 times.
✓ Branch 32 taken 8850080 times.
✓ Branch 33 taken 3187404 times.
✓ Branch 34 taken 8850080 times.
✓ Branch 35 taken 3187404 times.
✓ Branch 36 taken 147972 times.
✓ Branch 37 taken 410476 times.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✓ Branch 40 taken 1244216 times.
✓ Branch 41 taken 3362260 times.
✓ Branch 42 taken 1244216 times.
✓ Branch 43 taken 3362260 times.
✓ Branch 44 taken 1237726 times.
✓ Branch 45 taken 3789542 times.
✓ Branch 46 taken 1093648 times.
✓ Branch 47 taken 3389868 times.
✗ Branch 48 not taken.
✗ Branch 49 not taken.
✓ Branch 50 taken 270486 times.
✓ Branch 51 taken 752058 times.
✗ 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 taken 290522 times.
✓ Branch 63 taken 807766 times.
|
304643054 | { return scvs_[ivLocalScvIdx]; } |
296 | |||
297 | //! returns a reference to the container with the local face data | ||
298 | const std::vector<LocalFaceData>& localFaceData() const | ||
299 |
6/6✓ Branch 0 taken 31232410 times.
✓ Branch 1 taken 40439932 times.
✓ Branch 2 taken 28090096 times.
✓ Branch 3 taken 4459616 times.
✓ Branch 4 taken 16589320 times.
✓ Branch 5 taken 2120832 times.
|
141914986 | { return localFaceData_; } |
300 | |||
301 | //! returns a reference to the information container on Dirichlet BCs within this iv | ||
302 | const std::vector<DirichletData>& dirichletData() const | ||
303 | 9443820 | { return dirichletData_; } | |
304 | |||
305 | //! returns a reference to the data container on interior boundaries | ||
306 | const std::vector<InteriorBoundaryData>& interiorBoundaryData() const | ||
307 | 9443820 | { return interiorBoundaryData_; } | |
308 | |||
309 | //! returns the geometry of the i-th local scv | ||
310 | template< class FVElementGeometry > | ||
311 | auto getScvGeometry(LocalIndexType ivLocalScvIdx, const FVElementGeometry& fvGeometry) const | ||
312 | { return CCMpfaOScvGeometryHelper<LocalScvType>::computeScvGeometry(ivLocalScvIdx, *this, fvGeometry); } | ||
313 | |||
314 | //! returns the number of interaction volumes living around a vertex | ||
315 | template< class NI > | ||
316 | ✗ | static constexpr std::size_t numIVAtVertex(const NI& nodalIndexSet) | |
317 | ✗ | { return 1; } | |
318 | |||
319 | //! adds the iv index sets living around a vertex to a given container | ||
320 | //! and stores the the corresponding index in a map for each scvf | ||
321 | template< class IvIndexSetContainer, | ||
322 | class ScvfIndexMap, | ||
323 | class NodalIndexSet, | ||
324 | class FlipScvfIndexSet > | ||
325 | static void addIVIndexSets(IvIndexSetContainer& ivIndexSetContainer, | ||
326 | ScvfIndexMap& scvfIndexMap, | ||
327 | const NodalIndexSet& nodalIndexSet, | ||
328 | const FlipScvfIndexSet& flipScvfIndexSet) | ||
329 | { | ||
330 | // reuse the function of the standard mpfa-o interaction volume | ||
331 |
1/2✓ Branch 1 taken 26934 times.
✗ Branch 2 not taken.
|
26934 | CCMpfaOInteractionVolume<Traits>::addIVIndexSets(ivIndexSetContainer, |
332 | scvfIndexMap, | ||
333 | nodalIndexSet, | ||
334 | flipScvfIndexSet); | ||
335 | } | ||
336 | |||
337 | private: | ||
338 | // pointer to cell stencil (in iv index set) | ||
339 | const Stencil* stencil_; | ||
340 | |||
341 | // Variables defining the local scope | ||
342 | std::vector<Element> elements_; | ||
343 | std::vector<LocalScvType> scvs_; | ||
344 | std::vector<LocalScvfType> scvfs_; | ||
345 | std::vector<LocalFaceData> localFaceData_; | ||
346 | std::vector<DirichletData> dirichletData_; | ||
347 | std::vector<InteriorBoundaryData> interiorBoundaryData_; | ||
348 | |||
349 | // sizes involved in the local system equations | ||
350 | std::size_t numFaces_; | ||
351 | std::size_t numUnknowns_; | ||
352 | std::size_t numKnowns_; | ||
353 | }; | ||
354 | |||
355 | } // end namespace | ||
356 | |||
357 | #endif | ||
358 |