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 MultiDomain | ||
10 | * \brief A class glueing two grids of potentially different dimension geometrically. | ||
11 | * Intersections are computed using axis-aligned bounding box trees | ||
12 | */ | ||
13 | |||
14 | #ifndef DUMUX_MULTIDOMAIN_GLUE_HH | ||
15 | #define DUMUX_MULTIDOMAIN_GLUE_HH | ||
16 | |||
17 | #include <dumux/geometry/geometricentityset.hh> | ||
18 | #include <dumux/geometry/boundingboxtree.hh> | ||
19 | #include <dumux/geometry/intersectionentityset.hh> | ||
20 | |||
21 | namespace Dumux { | ||
22 | |||
23 | /*! | ||
24 | * \ingroup MultiDomain | ||
25 | * \brief A convenience alias for the IntersectionEntitySet of two GridViewGeometricEntitySets | ||
26 | */ | ||
27 | template<class DomainGridView, class TargetGridView, class DomainMapper, class TargetMapper> | ||
28 | using MultiDomainGlue = IntersectionEntitySet<GridViewGeometricEntitySet<DomainGridView, 0, DomainMapper>, | ||
29 | GridViewGeometricEntitySet<TargetGridView, 0, TargetMapper>>; | ||
30 | |||
31 | /*! | ||
32 | * \ingroup MultiDomain | ||
33 | * \brief Creates the glue object containing the intersections | ||
34 | * between two grids obtained from given grid geometries. | ||
35 | * \param domainGridGeometry The grid geometry of the domain | ||
36 | * \param targetGridGeometry The grid geometry of the target domain | ||
37 | * \return The glue object containing the intersections | ||
38 | */ | ||
39 | template<class DomainGG, class TargetGG> | ||
40 | MultiDomainGlue< typename DomainGG::GridView, typename TargetGG::GridView, | ||
41 | typename DomainGG::ElementMapper, typename TargetGG::ElementMapper > | ||
42 | 15 | makeGlue(const DomainGG& domainGridGeometry, const TargetGG& targetGridGeometry) | |
43 | { | ||
44 | MultiDomainGlue< typename DomainGG::GridView, typename TargetGG::GridView, | ||
45 |
1/2✓ Branch 1 taken 15 times.
✗ Branch 2 not taken.
|
15 | typename DomainGG::ElementMapper, typename TargetGG::ElementMapper > glue; |
46 |
3/6✓ Branch 1 taken 15 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 15 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 15 times.
✗ Branch 8 not taken.
|
45 | glue.build(domainGridGeometry.boundingBoxTree(), targetGridGeometry.boundingBoxTree()); |
47 | 15 | return glue; | |
48 | } | ||
49 | |||
50 | } // end namespace Dumux | ||
51 | |||
52 | #endif | ||
53 |