version 3.11-dev
Loading...
Searching...
No Matches
porousmediumflow/boxdfm/fvelementgeometry.hh
Go to the documentation of this file.
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//
16
17#ifndef DUMUX_POROUSMEDIUMFLOW_BOXDFM_FV_ELEMENT_GEOMETRY_HH
18#define DUMUX_POROUSMEDIUMFLOW_BOXDFM_FV_ELEMENT_GEOMETRY_HH
19
20#include <optional>
21#include <utility>
22#include <ranges>
23
24#include <dune/geometry/type.hh>
25#include <dune/localfunctions/lagrange/pqkfactory.hh>
26
27
30#include "geometryhelper.hh"
31
32namespace Dumux {
33
43template<class GG, bool enableGridGeometryCache>
45
47template<class GG>
49{
50 using GridView = typename GG::GridView;
51 static constexpr int dim = GridView::dimension;
52 static constexpr int dimWorld = GridView::dimensionworld;
53 using GridIndexType = typename IndexTraits<GridView>::GridIndex;
54 using LocalIndexType = typename IndexTraits<GridView>::LocalIndex;
55 using CoordScalar = typename GridView::ctype;
56 using FeLocalBasis = typename GG::FeCache::FiniteElementType::Traits::LocalBasisType;
57 using GGCache = typename GG::Cache;
58 using GeometryHelper = typename GGCache::GeometryHelper;
59public:
61 using Element = typename GridView::template Codim<0>::Entity;
63 using SubControlVolume = typename GG::SubControlVolume;
65 using SubControlVolumeFace = typename GG::SubControlVolumeFace;
67 using GridGeometry = GG;
68
71 static constexpr std::size_t maxNumElementScvs = (1<<dim)*3;
72
74 [[deprecated("This Constructor is deprecated and will be removed after release 3.11. Always use localView(gridGeometry).")]]
77
79 BoxDfmFVElementGeometry(const GGCache& ggCache)
80 : ggCache_(&ggCache) {}
81
83 const SubControlVolume& scv(LocalIndexType scvIdx) const
84 { return ggCache_->scvs(eIdx_)[scvIdx]; }
85
87 const SubControlVolumeFace& scvf(LocalIndexType scvfIdx) const
88 { return ggCache_->scvfs(eIdx_)[scvfIdx]; }
89
98 friend inline Dune::IteratorRange<typename std::vector<SubControlVolume>::const_iterator>
99 scvs(const BoxDfmFVElementGeometry& fvGeometry)
100 {
101 using Iter = typename std::vector<SubControlVolume>::const_iterator;
102 const auto& s = fvGeometry.ggCache_->scvs(fvGeometry.eIdx_);
103 return Dune::IteratorRange<Iter>(s.begin(), s.end());
104 }
105
107 template<class LocalDof>
108 friend inline std::ranges::range auto
109 scvs(const BoxDfmFVElementGeometry& fvGeometry, const LocalDof& localDof)
110 {
111 return std::views::iota(0u, fvGeometry.numScv())
112 | std::views::filter([&](std::size_t i) { return fvGeometry.scv(i).localDofIndex() == localDof.index(); })
113 | std::views::transform([&](std::size_t i) -> const SubControlVolume& { return fvGeometry.scv(i); });
114 }
115
117 friend inline auto localDofs(const BoxDfmFVElementGeometry& fvGeometry)
118 {
119 return Dune::transformedRangeView(
120 Dune::range(fvGeometry.numLocalDofs()),
121 [&](const auto i) { return CVFE::LocalDof
122 {
123 static_cast<LocalIndexType>(fvGeometry.scv(i).localDofIndex()),
124 static_cast<GridIndexType>(fvGeometry.scv(i).dofIndex()),
125 static_cast<GridIndexType>(fvGeometry.scv(i).elementIndex())
126 }; }
127 );
128 }
129
131 friend inline auto cvLocalDofs(const BoxDfmFVElementGeometry& fvGeometry)
132 {
133 // Default it that all dofs are cv dofs
134 return localDofs(fvGeometry);
135 }
136
145 friend inline Dune::IteratorRange<typename std::vector<SubControlVolumeFace>::const_iterator>
147 {
148 using Iter = typename std::vector<SubControlVolumeFace>::const_iterator;
149 const auto& s = fvGeometry.ggCache_->scvfs(fvGeometry.eIdx_);
150 return Dune::IteratorRange<Iter>(s.begin(), s.end());
151 }
152
154 const FeLocalBasis& feLocalBasis() const
155 { return gridGeometry().feCache().get(element_->type()).localBasis(); }
156
158 std::size_t numScv() const
159 { return ggCache_->scvs(eIdx_).size(); }
160
162 std::size_t numLocalDofs() const
163 { return element().geometry().corners(); }
164
166 std::size_t numScvf() const
167 { return ggCache_->scvfs(eIdx_).size(); }
168
175 {
176 this->bindElement(element);
177 return std::move(*this);
178 }
179
182 void bind(const Element& element) &
183 { this->bindElement(element); }
184
191 {
192 this->bindElement(element);
193 return std::move(*this);
194 }
195
203 {
204 element_ = element;
205 elementGeometry_.emplace(element.geometry());
206 eIdx_ = gridGeometry().elementMapper().index(element);
207 }
208
211 { return ggCache_->gridGeometry(); }
212
214 bool isBound() const
215 { return static_cast<bool>(element_); }
216
218 const Element& element() const
219 { return *element_; }
220
222 const typename Element::Geometry& elementGeometry() const
223 { return *elementGeometry_; }
224
226 typename SubControlVolume::Traits::Geometry geometry(const SubControlVolume& scv) const
227 {
228 if (scv.isOnFracture())
229 DUNE_THROW(Dune::InvalidStateException, "The geometry object cannot be defined for fracture scvs "
230 "because the number of known corners is insufficient. "
231 "You can do this manually by extracting the corners from this scv "
232 "and extruding them by the corresponding aperture. ");
233
234 const GeometryHelper geometryHelper(element().geometry());
235 const auto corners = geometryHelper.getScvCorners(scv.index());
236 using ScvGeometry = typename SubControlVolume::Traits::Geometry;
237 return { Dune::GeometryTypes::cube(ScvGeometry::mydimension), corners };
238 }
239
241 typename SubControlVolumeFace::Traits::Geometry geometry(const SubControlVolumeFace& scvf) const
242 {
243 if (scvf.isOnFracture())
244 DUNE_THROW(Dune::InvalidStateException, "The geometry object cannot be defined for fracture scvs "
245 "because the number of known corners is insufficient. "
246 "You can do this manually by extracting the corners from this scv "
247 "and extruding them by the corresponding aperture. ");
248 const GeometryHelper geometryHelper(element().geometry());
249 const auto corners = geometryHelper.getScvfCorners(scvf.indexInElement());
250 using ScvfGeometry = typename SubControlVolumeFace::Traits::Geometry;
251 return { Dune::GeometryTypes::cube(ScvfGeometry::mydimension), corners };
252 }
253
254private:
255 const GGCache* ggCache_;
256
257 std::optional<Element> element_;
258 std::optional<typename Element::Geometry> elementGeometry_;
259 GridIndexType eIdx_;
260};
261
263template<class GG>
265{
266 using GridView = typename GG::GridView;
267 static constexpr int dim = GridView::dimension;
268 static constexpr int dimWorld = GridView::dimensionworld;
269
270 using GridIndexType = typename IndexTraits<GridView>::GridIndex;
271 using LocalIndexType = typename IndexTraits<GridView>::LocalIndex;
272
273 using CoordScalar = typename GridView::ctype;
274 using FeLocalBasis = typename GG::FeCache::FiniteElementType::Traits::LocalBasisType;
275 using GGCache = typename GG::Cache;
276 using GeometryHelper = typename GGCache::GeometryHelper;
277public:
279 using Element = typename GridView::template Codim<0>::Entity;
281 using SubControlVolume = typename GG::SubControlVolume;
283 using SubControlVolumeFace = typename GG::SubControlVolumeFace;
285 using GridGeometry = GG;
288 static constexpr std::size_t maxNumElementScvs = (1<<dim)*3;
289
291 [[deprecated("This Constructor is deprecated and will be removed after release 3.11. Always use localView(gridGeometry).")]]
294
296 BoxDfmFVElementGeometry(const GGCache& ggCache)
297 : ggCache_(&ggCache) {}
298
300 const SubControlVolume& scv(LocalIndexType scvIdx) const
301 { return scvs_[scvIdx]; }
302
304 const SubControlVolumeFace& scvf(LocalIndexType scvfIdx) const
305 { return scvfs_[scvfIdx]; }
306
315 friend inline Dune::IteratorRange<typename std::vector<SubControlVolume>::const_iterator>
316 scvs(const BoxDfmFVElementGeometry& fvGeometry)
317 {
318 using Iter = typename std::vector<SubControlVolume>::const_iterator;
319 return Dune::IteratorRange<Iter>(fvGeometry.scvs_.begin(), fvGeometry.scvs_.end());
320 }
321
323 template<class LocalDof>
324 friend inline std::ranges::range auto
325 scvs(const BoxDfmFVElementGeometry& fvGeometry, const LocalDof& localDof)
326 {
327 return std::views::iota(0u, fvGeometry.numScv())
328 | std::views::filter([&](std::size_t i) { return fvGeometry.scv(i).localDofIndex() == localDof.index(); })
329 | std::views::transform([&](std::size_t i) -> const SubControlVolume& { return fvGeometry.scv(i); });
330 }
331
333 friend inline auto localDofs(const BoxDfmFVElementGeometry& fvGeometry)
334 {
335 return Dune::transformedRangeView(
336 Dune::range(fvGeometry.numLocalDofs()),
337 [&](const auto i) { return CVFE::LocalDof
338 {
339 static_cast<LocalIndexType>(fvGeometry.scv(i).localDofIndex()),
340 static_cast<GridIndexType>(fvGeometry.scv(i).dofIndex()),
341 static_cast<GridIndexType>(fvGeometry.scv(i).elementIndex())
342 }; }
343 );
344 }
345
347 friend inline auto cvLocalDofs(const BoxDfmFVElementGeometry& fvGeometry)
348 {
349 // Default it that all dofs are cv dofs
350 return localDofs(fvGeometry);
351 }
352
361 friend inline Dune::IteratorRange<typename std::vector<SubControlVolumeFace>::const_iterator>
363 {
364 using Iter = typename std::vector<SubControlVolumeFace>::const_iterator;
365 return Dune::IteratorRange<Iter>(fvGeometry.scvfs_.begin(), fvGeometry.scvfs_.end());
366 }
367
369 const FeLocalBasis& feLocalBasis() const
370 { return gridGeometry().feCache().get(element_->type()).localBasis(); }
371
373 std::size_t numScv() const
374 { return scvs_.size(); }
375
377 std::size_t numLocalDofs() const
378 { return element().geometry().corners(); }
379
381 std::size_t numScvf() const
382 { return scvfs_.size(); }
383
390 {
391 this->bindElement(element);
392 return std::move(*this);
393 }
394
401 void bind(const Element& element) &
402 { this->bindElement(element); }
403
410 {
411 this->bindElement(element);
412 return std::move(*this);
413 }
414
420 {
421 element_ = element;
422 elementGeometry_.emplace(element.geometry());
423 eIdx_ = gridGeometry().elementMapper().index(element);
424 makeElementGeometries_();
425 }
426
429 { return ggCache_->gridGeometry(); }
430
432 bool isBound() const
433 { return static_cast<bool>(element_); }
434
436 const Element& element() const
437 { return *element_; }
438
440 const typename Element::Geometry& elementGeometry() const
441 { return *elementGeometry_; }
442
444 typename SubControlVolume::Traits::Geometry geometry(const SubControlVolume& scv) const
445 {
446 if (scv.isOnFracture())
447 DUNE_THROW(Dune::InvalidStateException, "The geometry object cannot be defined for fracture scvs "
448 "because the number of known corners is insufficient. "
449 "You can do this manually by extracting the corners from this scv "
450 "and extruding them by the corresponding aperture. ");
451
452 const GeometryHelper geometryHelper(element().geometry());
453 const auto corners = geometryHelper.getScvCorners(scv.index());
454 using ScvGeometry = typename SubControlVolume::Traits::Geometry;
455 return { Dune::GeometryTypes::cube(ScvGeometry::mydimension), corners };
456 }
457
459 typename SubControlVolumeFace::Traits::Geometry geometry(const SubControlVolumeFace& scvf) const
460 {
461 if (scvf.isOnFracture())
462 DUNE_THROW(Dune::InvalidStateException, "The geometry object cannot be defined for fracture scvs "
463 "because the number of known corners is insufficient. "
464 "You can do this manually by extracting the corners from this scv "
465 "and extruding them by the corresponding aperture. ");
466 const GeometryHelper geometryHelper(element().geometry());
467 const auto corners = geometryHelper.getScvfCorners(scvf.indexInElement());
468 using ScvfGeometry = typename SubControlVolumeFace::Traits::Geometry;
469 return { Dune::GeometryTypes::cube(ScvfGeometry::mydimension), corners };
470 }
471
472private:
473
474 void makeElementGeometries_()
475 {
476 // get the element geometry
477 const auto& element = *element_;
478 const auto elementGeometry = element.geometry();
479 const auto refElement = referenceElement(element);
480
481 // get the sub control volume geometries of this element
482 GeometryHelper geometryHelper(elementGeometry);
483
484 // construct the sub control volumes
485 scvs_.resize(elementGeometry.corners());
486 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
487 {
488 // get associated dof index
489 const auto dofIdxGlobal = gridGeometry().vertexMapper().subIndex(element, scvLocalIdx, dim);
490
491 // add scv to the local container
492 scvs_[scvLocalIdx] = SubControlVolume(geometryHelper,
493 scvLocalIdx,
494 eIdx_,
495 dofIdxGlobal);
496 }
497
498 // construct the sub control volume faces
499 const auto numInnerScvf = (dim==1) ? 1 : element.subEntities(dim-1);
500 scvfs_.resize(numInnerScvf);
501
502 LocalIndexType scvfLocalIdx = 0;
503 for (; scvfLocalIdx < numInnerScvf; ++scvfLocalIdx)
504 {
505 // find the local scv indices this scvf is connected to
506 std::array<LocalIndexType, 2> localScvIndices{{
507 static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 0, dim)),
508 static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 1, dim))
509 }};
510
511 scvfs_[scvfLocalIdx] = SubControlVolumeFace(geometryHelper,
512 element,
513 scvfLocalIdx,
514 std::move(localScvIndices));
515 }
516
517 // construct the ...
518 // ... sub-control volume faces on the domain boundary
519 // ... sub-control volumes on fracture facets
520 // ... sub-control volume faces on fracture facets
521 // NOTE We do not construct fracture scvfs on boundaries here!
522 // That means specifying Neumann fluxes on only the fractures is not possible
523 // However, it is difficult to interpret this here as a fracture ending on the boundary
524 // could also be connected to a facet which is both boundary and fracture at the same time!
525 // In that case, the fracture boundary scvf wouldn't make sense. In order to do it properly
526 // we would have to find only those fractures that are at the boundary and aren't connected
527 // to a fracture which is a boundary.
528 LocalIndexType scvLocalIdx = element.subEntities(dim);
529 for (const auto& intersection : intersections(gridGeometry().gridView(), element))
530 {
531 // first, obtain all vertex indices on this intersection
532 const auto& isGeometry = intersection.geometry();
533 const auto numCorners = isGeometry.corners();
534 const auto idxInInside = intersection.indexInInside();
535
536 std::vector<GridIndexType> isVertexIndices(numCorners);
537 for (unsigned int vIdxLocal = 0; vIdxLocal < numCorners; ++vIdxLocal)
538 isVertexIndices[vIdxLocal] = gridGeometry().vertexMapper().subIndex(element,
539 refElement.subEntity(idxInInside, 1, vIdxLocal, dim),
540 dim);
541
542 if (intersection.boundary())
543 {
544 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < numCorners; ++isScvfLocalIdx)
545 {
546 // find the scv this scvf is connected to
547 const LocalIndexType insideScvIdx = static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, isScvfLocalIdx, dim));
548 std::array<LocalIndexType, 2> localScvIndices{{insideScvIdx, insideScvIdx}};
549
550 scvfs_.emplace_back(geometryHelper,
551 intersection,
552 isScvfLocalIdx,
553 scvfLocalIdx,
554 std::move(localScvIndices));
555
556 // increment local counter
557 scvfLocalIdx++;
558 }
559 }
560
561 // maybe add fracture scvs & scvfs
562 if (this->gridGeometry().isOnFracture(element, intersection))
563 {
564 // add fracture scv for each vertex of intersection
565 const auto curNumScvs = scvs_.size();
566 scvs_.reserve(curNumScvs+numCorners);
567 for (unsigned int vIdxLocal = 0; vIdxLocal < numCorners; ++vIdxLocal)
568 scvs_.emplace_back(geometryHelper,
569 intersection,
570 isGeometry,
571 vIdxLocal,
572 static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, vIdxLocal, dim)),
573 scvLocalIdx++,
574 idxInInside,
575 eIdx_,
576 isVertexIndices[vIdxLocal]);
577
578 // add fracture scvf for each edge of the intersection in 3d
579 if (dim == 3)
580 {
581 const auto& faceRefElement = referenceElement(isGeometry);
582 for (unsigned int edgeIdx = 0; edgeIdx < faceRefElement.size(1); ++edgeIdx)
583 {
584 // inside/outside scv indices in face local node numbering
585 std::array<LocalIndexType, 2> localScvIndices{{
586 static_cast<LocalIndexType>(faceRefElement.subEntity(edgeIdx, 1, 0, dim-1)),
587 static_cast<LocalIndexType>(faceRefElement.subEntity(edgeIdx, 1, 1, dim-1))
588 }};
589
590 // add offset to get the right scv indices
591 std::for_each( localScvIndices.begin(),
592 localScvIndices.end(),
593 [curNumScvs] (auto& elemLocalIdx) { elemLocalIdx += curNumScvs; } );
594
595 // add scvf
596 scvfs_.emplace_back(geometryHelper,
597 intersection,
598 edgeIdx,
599 scvfLocalIdx++,
600 std::move(localScvIndices),
601 intersection.boundary());
602 }
603 }
604
605 // dim == 2, intersection is an edge, make 1 scvf
606 else
607 {
608 // inside/outside scv indices in face local node numbering
609 std::array<LocalIndexType, 2> localScvIndices{{0, 1}};
610
611 // add offset such that the fracture scvs above are addressed
612 std::for_each( localScvIndices.begin(),
613 localScvIndices.end(),
614 [curNumScvs] (auto& elemLocalIdx) { elemLocalIdx += curNumScvs; } );
615
616 // add scvf
617 scvfs_.emplace_back(geometryHelper,
618 intersection,
619 /*idxOnIntersection*/0,
620 scvfLocalIdx++,
621 std::move(localScvIndices),
622 intersection.boundary());
623 }
624 }
625 }
626 }
627
629 std::optional<Element> element_;
630 std::optional<typename Element::Geometry> elementGeometry_;
631 GridIndexType eIdx_;
632
634 const GGCache* ggCache_;
635
637 std::vector<SubControlVolume> scvs_;
638 std::vector<SubControlVolumeFace> scvfs_;
639};
640
641} // end namespace Dumux
642
643#endif
friend auto localDofs(const BoxDfmFVElementGeometry &fvGeometry)
range over local dofs
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:333
SubControlVolume::Traits::Geometry geometry(const SubControlVolume &scv) const
Create the geometry of a given sub control volume.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:444
const Element::Geometry & elementGeometry() const
The geometry of the bound element.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:440
const FeLocalBasis & feLocalBasis() const
Get a local finite element basis.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:369
const GridGeometry & gridGeometry() const
The global finite volume geometry we are a restriction of.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:428
BoxDfmFVElementGeometry(const GGCache &ggCache)
Constructor.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:296
static constexpr std::size_t maxNumElementScvs
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:288
std::size_t numLocalDofs() const
The total number of element-local dofs.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:377
BoxDfmFVElementGeometry bindElement(const Element &element) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:409
typename GridView::template Codim< 0 >::Entity Element
export type of the element
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:279
std::size_t numScvf() const
The total number of sub control volume faces.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:381
friend auto cvLocalDofs(const BoxDfmFVElementGeometry &fvGeometry)
range over control-volume local dofs
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:347
void bind(const Element &element) &
Binding of an element, has to be called before using the fvgeometries Prepares all the volume variabl...
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:401
const SubControlVolume & scv(LocalIndexType scvIdx) const
Get a sub control volume with a local scv index.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:300
BoxDfmFVElementGeometry bind(const Element &element) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:389
const Element & element() const
The bound element.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:436
SubControlVolumeFace::Traits::Geometry geometry(const SubControlVolumeFace &scvf) const
Create the geometry of a given sub control volume face.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:459
BoxDfmFVElementGeometry(const GridGeometry &gridGeometry)
Constructor.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:292
std::size_t numScv() const
The total number of sub control volumes.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:373
bool isBound() const
Returns true if bind/bindElement has already been called.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:432
friend Dune::IteratorRange< typename std::vector< SubControlVolume >::const_iterator > scvs(const BoxDfmFVElementGeometry &fvGeometry)
Iterator range for sub control volumes.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:316
friend std::ranges::range auto scvs(const BoxDfmFVElementGeometry &fvGeometry, const LocalDof &localDof)
range over sub control volumes related to a local dof.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:325
GG GridGeometry
Export type of finite volume grid geometry.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:285
typename GG::SubControlVolumeFace SubControlVolumeFace
Export type of subcontrol volume face.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:283
friend Dune::IteratorRange< typename std::vector< SubControlVolumeFace >::const_iterator > scvfs(const BoxDfmFVElementGeometry &fvGeometry)
Iterator range for sub control volumes faces.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:362
const SubControlVolumeFace & scvf(LocalIndexType scvfIdx) const
Get a sub control volume face with a local scvf index.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:304
typename GG::SubControlVolume SubControlVolume
Export type of subcontrol volume.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:281
void bindElement(const Element &element) &
Binding of an element, has to be called before using the fvgeometries Prepares all the volume variabl...
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:419
typename GG::SubControlVolumeFace SubControlVolumeFace
Export type of subcontrol volume face.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:65
void bindElement(const Element &element) &
Binding of an element, has to be called before using the fvgeometries.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:202
friend auto localDofs(const BoxDfmFVElementGeometry &fvGeometry)
range over local dofs
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:117
std::size_t numScv() const
The total number of sub control volumes.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:158
GG GridGeometry
Export type of finite volume grid geometry.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:67
const Element & element() const
The bound element.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:218
void bind(const Element &element) &
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:182
BoxDfmFVElementGeometry(const GridGeometry &gridGeometry)
Constructor.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:75
std::size_t numLocalDofs() const
The total number of element-local dofs.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:162
std::size_t numScvf() const
The total number of sub control volume faces.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:166
const FeLocalBasis & feLocalBasis() const
Get a local finite element basis.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:154
typename GridView::template Codim< 0 >::Entity Element
export type of the element
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:61
typename GG::SubControlVolume SubControlVolume
Export type of subcontrol volume.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:63
SubControlVolumeFace::Traits::Geometry geometry(const SubControlVolumeFace &scvf) const
Create the geometry of a given sub control volume face.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:241
const Element::Geometry & elementGeometry() const
The geometry of the bound element.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:222
friend auto cvLocalDofs(const BoxDfmFVElementGeometry &fvGeometry)
range over control-volume local dofs
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:131
const SubControlVolumeFace & scvf(LocalIndexType scvfIdx) const
Get a sub control volume face with a local scvf index.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:87
BoxDfmFVElementGeometry(const GGCache &ggCache)
Constructor.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:79
static constexpr std::size_t maxNumElementScvs
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:71
const SubControlVolume & scv(LocalIndexType scvIdx) const
Get a sub control volume with a local scv index.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:83
BoxDfmFVElementGeometry bind(const Element &element) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:174
friend Dune::IteratorRange< typename std::vector< SubControlVolume >::const_iterator > scvs(const BoxDfmFVElementGeometry &fvGeometry)
Iterator range for sub control volumes.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:99
friend std::ranges::range auto scvs(const BoxDfmFVElementGeometry &fvGeometry, const LocalDof &localDof)
range over sub control volumes related to a local dof.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:109
const GridGeometry & gridGeometry() const
The global finite volume geometry we are a restriction of.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:210
bool isBound() const
Returns true if bind/bindElement has already been called.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:214
SubControlVolume::Traits::Geometry geometry(const SubControlVolume &scv) const
Create the geometry of a given sub control volume.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:226
friend Dune::IteratorRange< typename std::vector< SubControlVolumeFace >::const_iterator > scvfs(const BoxDfmFVElementGeometry &fvGeometry)
Iterator range for sub control volumes faces.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:146
BoxDfmFVElementGeometry bindElement(const Element &element) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:190
Base class for the finite volume geometry vector for box discrete fracture model.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:44
@ element
Definition fieldtype.hh:23
Defines the index types used for grid and local indices.
std::size_t numCorners(Shape shape)
Returns the number of corners of a given geometry.
Definition throatproperties.hh:220
Definition adapt.hh:17
const Scalar PengRobinsonMixture< Scalar, StaticParameters >::u
Definition pengrobinsonmixture.hh:138
auto localDofs(const FVElementGeometry &fvGeometry)
range over local dofs
Definition localdof.hh:50
Helper class constructing the dual grid finite volume geometries for the box discrete fracture model.
Class providing iterators over sub control volumes and sub control volume faces of an element.
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
unsigned int LocalIndex
Definition indextraits.hh:28