GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/multidomain/facet/box/couplingmapper.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 75 78 96.2%
Functions: 40 48 83.3%
Branches: 172 385 44.7%

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::FacetCouplingMapper
11 */
12 #ifndef DUMUX_BOX_FACETCOUPLING_MAPPER_HH
13 #define DUMUX_BOX_FACETCOUPLING_MAPPER_HH
14
15 #include <dune/common/indices.hh>
16
17 #include <dumux/common/indextraits.hh>
18 #include <dumux/discretization/method.hh>
19 #include <dumux/multidomain/facet/couplingmapper.hh>
20 #include <dumux/multidomain/facet/couplingmapperbase.hh>
21 #include <dumux/multidomain/facet/codimonegridadapter.hh>
22
23 namespace Dumux {
24
25 /*!
26 * \ingroup FacetCoupling
27 * \brief Base class for the coupling mapper that sets up and stores
28 * the coupling maps between two domains of dimension d and (d-1).
29 * This specialization is for the bulk domain using the box scheme.
30 *
31 * \tparam BulkFVG The d-dimensional finite-volume grid geometry
32 * \tparam LowDimFVG The (d-1)-dimensional finite-volume grid geometry
33 * \tparam bulkId The domain id of the bulk problem
34 * \tparam lowDimId The domain id of the lower-dimensional problem
35 */
36 template<class BulkFVG, class LowDimFVG, std::size_t bulkId, std::size_t lowDimId>
37 28 class FacetCouplingMapper<BulkFVG, LowDimFVG, bulkId, lowDimId, DiscretizationMethods::Box>
38 : public virtual FacetCouplingMapperBase<BulkFVG, LowDimFVG, bulkId, lowDimId>
39 {
40 using ParentType = FacetCouplingMapperBase<BulkFVG, LowDimFVG, bulkId, lowDimId>;
41 using LowDimElement = typename LowDimFVG::GridView::template Codim<0>::Entity;
42
43 // dimensions of the two grids
44 using BulkGridView = typename BulkFVG::GridView;
45 using LowDimGridView = typename LowDimFVG::GridView;
46 static constexpr int bulkDim = BulkGridView::dimension;
47 static constexpr int lowDimDim = LowDimGridView::dimension;
48
49 public:
50 //! export domain ids
51 using ParentType::bulkGridId;
52 using ParentType::facetGridId;
53
54 /*!
55 * \brief Update coupling maps. This is the standard
56 * interface required by any mapper implementation.
57 *
58 * \param bulkFvGridGeometry The finite-volume grid geometry of the bulk grid
59 * \param lowDimFvGridGeometry The finite-volume grid geometry of the lower-dimensional grid
60 * \param embeddings Class that contains the embedments among the grids and entity insertion indices
61 */
62 template< class Embeddings >
63 28 void update(const BulkFVG& bulkFvGridGeometry,
64 const LowDimFVG& lowDimFvGridGeometry,
65 std::shared_ptr<const Embeddings> embeddings)
66 {
67 // forward to update function with instantiated vertex adapter
68 using GridAdapter = CodimOneGridAdapter<Embeddings, bulkGridId, facetGridId>;
69
4/12
✓ Branch 2 taken 26 times.
✗ Branch 3 not taken.
✓ Branch 6 taken 26 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 26 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 26 times.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
56 update(bulkFvGridGeometry, lowDimFvGridGeometry, embeddings, GridAdapter(embeddings));
70 28 }
71
72 /*!
73 * \brief Update coupling maps with a given grid adapter.
74 *
75 * \param bulkFvGridGeometry The finite-volume grid geometry of the bulk grid
76 * \param lowDimFvGridGeometry The finite-volume grid geometry of the lower-dimensional grid
77 * \param embeddings Class that contains the embedments among the grids and entity insertion indices
78 * \param codimOneGridAdapter Allows direct access to data on the bulk grid for lowdim grid entities
79 */
80 template< class Embeddings, class CodimOneGridAdapter >
81 28 void update(const BulkFVG& bulkFvGridGeometry,
82 const LowDimFVG& lowDimFvGridGeometry,
83 std::shared_ptr<const Embeddings> embeddings,
84 const CodimOneGridAdapter& codimOneGridAdapter)
85 {
86 // define the policy how to add map entries for given lowdim element and adjoined entity indices
87 7748 auto addCouplingEntryPolicy = [&] (auto&& adjoinedEntityIndices,
88 const LowDimElement& lowDimElement,
89 const LowDimFVG& lowDimFvGridGeometry,
90 1012 const BulkFVG& bulkFvGridGeometry)
91 {
92 using LowDimIndexType = typename IndexTraits<LowDimGridView>::GridIndex;
93 using BulkIndexType = typename IndexTraits<BulkGridView>::GridIndex;
94
95 2024 const auto lowDimElemIdx = lowDimFvGridGeometry.elementMapper().index(lowDimElement);
96 2024 auto& lowDimData = this->couplingMap_(facetGridId, bulkGridId)[lowDimElemIdx];
97
98 // determine corner indices (in bulk grid indices)
99 1012 const auto& eg = lowDimElement.geometry();
100 1012 const auto numElementCorners = eg.corners();
101 3036 std::vector<BulkIndexType> elementCorners(numElementCorners);
102
4/4
✓ Branch 0 taken 1976 times.
✓ Branch 1 taken 924 times.
✓ Branch 2 taken 264 times.
✓ Branch 3 taken 88 times.
3252 for (int i = 0; i < numElementCorners; ++i)
103
4/12
✗ Branch 0 not taken.
✓ Branch 1 taken 1976 times.
✓ Branch 3 taken 1976 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✓ Branch 8 taken 264 times.
✓ Branch 10 taken 264 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
2240 elementCorners[i] = codimOneGridAdapter.bulkGridVertexIndex(lowDimElement.template subEntity<lowDimDim>(i));
104
105 // save unsorted set of corner indices and search scvfs in adjoined entities
106
5/13
✓ Branch 1 taken 924 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 924 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 64 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✓ Branch 8 taken 88 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 88 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
2088 const auto unsortedElemCorners = elementCorners;
107 3036 std::sort(elementCorners.begin(), elementCorners.end());
108
109
4/7
✓ Branch 0 taken 64 times.
✓ Branch 1 taken 796 times.
✓ Branch 2 taken 64 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✓ Branch 5 taken 88 times.
✗ Branch 6 not taken.
2024 auto fvGeometry = localView(bulkFvGridGeometry);
110
8/8
✓ Branch 0 taken 1808 times.
✓ Branch 1 taken 924 times.
✓ Branch 2 taken 1808 times.
✓ Branch 3 taken 924 times.
✓ Branch 4 taken 176 times.
✓ Branch 5 taken 88 times.
✓ Branch 6 taken 176 times.
✓ Branch 7 taken 88 times.
7004 for (auto bulkElemIdx : adjoinedEntityIndices)
111 {
112
2/4
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 176 times.
✗ Branch 5 not taken.
3824 const auto bulkElement = bulkFvGridGeometry.element(bulkElemIdx);
113
2/4
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 176 times.
✗ Branch 5 not taken.
1984 const auto bulkRefElem = referenceElement(bulkElement);
114
115 // find the bulk element facet that lies on this low dim element (assumes conformity!)
116 1984 const auto coupledFacetIndex = [&]
117 {
118 1984 bool found = false;
119 1984 unsigned int coupledFacetIndex = 0;
120
1/4
✓ Branch 1 taken 1792 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
1984 std::vector<unsigned int> handledFacets;
121
8/13
✓ Branch 1 taken 1792 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 128 times.
✓ Branch 5 taken 2862 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 128 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 272 times.
✓ Branch 10 taken 2862 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 144 times.
✓ Branch 13 taken 1198 times.
✗ Branch 14 not taken.
8932 for (const auto& is : intersections(bulkFvGridGeometry.gridView(), bulkElement))
122 {
123 // skip already handled facets (necessary for e.g. Dune::FoamGrid)
124
2/5
✗ Branch 0 not taken.
✓ Branch 1 taken 3134 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2862 times.
7732 if (std::count(handledFacets.begin(), handledFacets.end(), is.indexInInside()))
125 continue;
126
127
2/4
✓ Branch 1 taken 3134 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 3134 times.
✗ Branch 5 not taken.
3750 handledFacets.push_back(is.indexInInside());
128
129 // determine if it lies on low dim element by comparing corner indices
130
3/6
✓ Branch 1 taken 3134 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 272 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 272 times.
✗ Branch 6 not taken.
3458 const auto numCorners = is.geometry().corners();
131
4/10
✓ Branch 1 taken 3134 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 3134 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 3134 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1342 times.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
13322 std::vector<BulkIndexType> facetIndices(numCorners);
132
2/2
✓ Branch 0 taken 6876 times.
✓ Branch 1 taken 3134 times.
11286 for (int i = 0; i < numCorners; ++i)
133 {
134
1/2
✓ Branch 1 taken 6060 times.
✗ Branch 2 not taken.
8644 const auto vIdxLocal = bulkRefElem.subEntity(is.indexInInside(), 1, i, bulkDim);
135
2/6
✓ Branch 1 taken 6876 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 816 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
7828 facetIndices[i] = bulkFvGridGeometry.vertexMapper().vertexIndex(bulkElement.template subEntity<bulkDim>(vIdxLocal));
136 }
137
138 10374 std::sort(facetIndices.begin(), facetIndices.end());
139
5/8
✓ Branch 0 taken 3134 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 3134 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 3134 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 1792 times.
✓ Branch 7 taken 1342 times.
13832 if ( std::equal(facetIndices.begin(), facetIndices.end(), elementCorners.begin(), elementCorners.end()) )
140 {
141
2/3
✓ Branch 0 taken 128 times.
✓ Branch 1 taken 1664 times.
✗ Branch 2 not taken.
1984 coupledFacetIndex = is.indexInInside();
142
1/2
✓ Branch 0 taken 1792 times.
✗ Branch 1 not taken.
3968 found = true; break;
143 }
144 }
145
146 // ensure that we found the facet!
147
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1792 times.
1984 if (!found)
148 DUNE_THROW(Dune::InvalidStateException, "Could not find the bulk element coupling facet!");
149
150
1/2
✓ Branch 0 taken 1792 times.
✗ Branch 1 not taken.
3968 return coupledFacetIndex;
151
5/10
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 7052 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 3134 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 3134 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 1792 times.
✗ Branch 12 not taken.
18712 }();
152
153 // we should always find numElementCorners coupling scvfs
154
2/4
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 176 times.
✗ Branch 5 not taken.
1984 fvGeometry.bindElement(bulkElement);
155
156 1984 unsigned int foundCounter = 0;
157
4/13
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1808 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✓ Branch 9 taken 176 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 176 times.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
5952 std::vector<BulkIndexType> embeddedScvfIndices(numElementCorners);
158
8/8
✓ Branch 0 taken 11594 times.
✓ Branch 1 taken 1808 times.
✓ Branch 2 taken 11594 times.
✓ Branch 3 taken 1808 times.
✓ Branch 4 taken 1680 times.
✓ Branch 5 taken 176 times.
✓ Branch 6 taken 1680 times.
✓ Branch 7 taken 176 times.
17242 for (const auto& scvf : scvfs(fvGeometry))
159 {
160
8/8
✓ Branch 0 taken 4076 times.
✓ Branch 1 taken 7518 times.
✓ Branch 3 taken 3872 times.
✓ Branch 4 taken 204 times.
✓ Branch 5 taken 624 times.
✓ Branch 6 taken 1056 times.
✓ Branch 8 taken 528 times.
✓ Branch 9 taken 96 times.
13274 if (scvf.interiorBoundary() && scvf.facetIndexInElement() == coupledFacetIndex)
161 {
162 // we want to order the set of scvfs lying on the lower-dimensional element such that the i-th scvf
163 // coincides with the i-th low dim element corner. This will help later to identify which scvf fluxes
164 // enter which scv of the low dim element if the lower-dimensional domain uses the box scheme
165 4400 const auto vIdxLocal = bulkRefElem.subEntity(coupledFacetIndex, 1, scvf.indexInElementFacet(), bulkDim);
166
4/8
✓ Branch 1 taken 3872 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 3872 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 528 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 528 times.
✗ Branch 11 not taken.
8800 const auto vIdxGlobal = bulkFvGridGeometry.vertexMapper().vertexIndex(bulkElement, vIdxLocal, bulkDim);
167 13200 const auto it = std::find(unsortedElemCorners.begin(), unsortedElemCorners.end(), vIdxGlobal);
168
6/12
✗ Branch 0 not taken.
✓ Branch 1 taken 3872 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 3872 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 3872 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 528 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 528 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 528 times.
13200 assert(it != unsortedElemCorners.end());
169 8800 const auto lowDimElemLocalCornerIdx = std::distance(unsortedElemCorners.begin(), it);
170 4400 embeddedScvfIndices[lowDimElemLocalCornerIdx] = scvf.index();
171 4400 foundCounter++;
172 }
173 }
174
175 // ensure we found all scvfs
176
2/4
✗ Branch 0 not taken.
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 176 times.
1984 if (foundCounter != numElementCorners)
177 DUNE_THROW(Dune::InvalidStateException, "Found " << foundCounter << " instead of " << numElementCorners << " coupling scvfs in the bulk element");
178
179 // add each dof in the low dim element to coupling stencil of the bulk element
180
4/8
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1808 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 176 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 176 times.
✗ Branch 11 not taken.
3968 auto& bulkData = this->couplingMap_(bulkGridId, facetGridId)[bulkElemIdx];
181
5/9
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1808 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 176 times.
✓ Branch 7 taken 256 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 176 times.
4224 const auto lowDimElementDofs = LowDimFVG::discMethod == DiscretizationMethods::box
182 ? this->extractNodalDofs_(lowDimElement, lowDimFvGridGeometry)
183 : std::vector<LowDimIndexType>({lowDimElemIdx});
184
185
8/8
✓ Branch 0 taken 3360 times.
✓ Branch 1 taken 1808 times.
✓ Branch 2 taken 3360 times.
✓ Branch 3 taken 1808 times.
✓ Branch 4 taken 528 times.
✓ Branch 5 taken 176 times.
✓ Branch 6 taken 528 times.
✓ Branch 7 taken 176 times.
13728 for (auto lowDimDofIdx : lowDimElementDofs)
186 {
187
2/4
✓ Branch 1 taken 3360 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 528 times.
✗ Branch 5 not taken.
3888 bulkData.couplingStencil.push_back(lowDimDofIdx);
188
2/4
✓ Branch 1 taken 3360 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 528 times.
✗ Branch 5 not taken.
3888 auto& couplingScvfs = bulkData.dofToCouplingScvfMap[lowDimDofIdx];
189
10/20
✓ Branch 1 taken 3360 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 3360 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 3360 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 3360 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 3360 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 528 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 528 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 528 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 528 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 528 times.
✗ Branch 29 not taken.
19440 couplingScvfs.insert(couplingScvfs.end(), embeddedScvfIndices.begin(), embeddedScvfIndices.end());
190 }
191
192 // add info on which scvfs coincide with which low dim element
193
2/4
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 176 times.
✗ Branch 5 not taken.
1984 bulkData.couplingElementStencil.push_back(lowDimElemIdx);
194
2/4
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 176 times.
✗ Branch 5 not taken.
1984 auto& elemToScvfMap = bulkData.elementToScvfMap[lowDimElemIdx];
195
10/24
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1808 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1808 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1808 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1808 times.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✓ Branch 18 taken 176 times.
✗ Branch 19 not taken.
✓ Branch 21 taken 176 times.
✗ Branch 22 not taken.
✓ Branch 24 taken 176 times.
✗ Branch 25 not taken.
✓ Branch 27 taken 176 times.
✗ Branch 28 not taken.
✓ Branch 30 taken 176 times.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 33 not taken.
9920 elemToScvfMap.insert(elemToScvfMap.end(), embeddedScvfIndices.begin(), embeddedScvfIndices.end());
196
197 // add embedment and the bulk cell dofs to coupling stencil of low dim element
198
2/4
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 176 times.
✗ Branch 5 not taken.
1984 lowDimData.embedments.emplace_back(bulkElemIdx, std::move(embeddedScvfIndices));
199
200
6/16
✓ Branch 1 taken 1808 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1808 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 1808 times.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✓ Branch 10 taken 176 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 176 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 176 times.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
5952 const auto bulkElementDofs = this->extractNodalDofs_(bulkElement, bulkFvGridGeometry);
201
8/8
✓ Branch 0 taken 6920 times.
✓ Branch 1 taken 1808 times.
✓ Branch 2 taken 6920 times.
✓ Branch 3 taken 1808 times.
✓ Branch 4 taken 704 times.
✓ Branch 5 taken 176 times.
✓ Branch 6 taken 704 times.
✓ Branch 7 taken 176 times.
13576 for (auto bulkDofIdx : bulkElementDofs)
202
2/4
✓ Branch 1 taken 6920 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 704 times.
✗ Branch 5 not taken.
7624 lowDimData.couplingStencil.push_back(bulkDofIdx);
203 }
204 };
205
206 // let the parent do the update subject to the execution policy defined above
207
2/6
✓ Branch 2 taken 26 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 26 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
28 ParentType::update_(bulkFvGridGeometry, lowDimFvGridGeometry, embeddings, addCouplingEntryPolicy);
208
209 // coupling stencils might not be unique with the policy above
210 5174 auto makeStencilUnique = [] (auto& data)
211 {
212 2721 auto& cs = data.second.couplingStencil;
213 8163 std::sort(cs.begin(), cs.end());
214 13605 cs.erase( std::unique(cs.begin(), cs.end()), cs.end() );
215 };
216
217 28 auto& lowDimCouplingData = this->couplingMap_(facetGridId, bulkGridId);
218 84 std::for_each(lowDimCouplingData.begin(), lowDimCouplingData.end(), makeStencilUnique);
219
220 // bulk coupling stencil is only non-unique if box is used
221 if (LowDimFVG::discMethod == DiscretizationMethods::box)
222 {
223 24 auto& bulkCouplingData = this->couplingMap_(bulkGridId, facetGridId);
224 72 std::for_each(bulkCouplingData.begin(), bulkCouplingData.end(), makeStencilUnique);
225 }
226 28 }
227 };
228
229 } // end namespace Dumux
230
231 #endif
232