3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
facet/couplingmapper.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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_FACETCOUPLING_MAPPER_HH
25#define DUMUX_FACETCOUPLING_MAPPER_HH
26
27#include <memory>
28
29#include <dune/common/indices.hh>
31
32namespace Dumux {
33
49template< class BulkFVG,
50 class LowDimFVG,
51 std::size_t bulkId = 0,
52 std::size_t lowDimId = 1,
53 class DiscretizationMethod = typename BulkFVG::DiscretizationMethod >
55
68template< class BulkFVG, class FacetFVG, class EdgeFVG,
69 std::size_t bulkId = 0,
70 std::size_t facetId = 1,
71 std::size_t edgeId = 2 >
73: public FacetCouplingMapper<BulkFVG, FacetFVG, bulkId, facetId>
74, public FacetCouplingMapper<FacetFVG, EdgeFVG, facetId, edgeId>
75{
78
79 // grid dimensions
80 static constexpr int bulkDim = BulkFVG::GridView::dimension;
81 static constexpr int facetDim = FacetFVG::GridView::dimension;
82 static constexpr int edgeDim = EdgeFVG::GridView::dimension;
83
85 template<std::size_t id>
86 using GridIdType = Dune::index_constant<id>;
87
88public:
90 static constexpr auto bulkGridId = Dune::index_constant< bulkId >();
91 static constexpr auto facetGridId = Dune::index_constant< facetId >();
92 static constexpr auto edgeGridId = Dune::index_constant< edgeId >();
93
95 template<std::size_t i>
96 using Stencil = typename std::conditional< (i == edgeId),
97 typename FacetEdgeMapper::template Stencil<i>,
98 typename BulkFacetMapper::template Stencil<i> >::type;
99
101 template<std::size_t i, std::size_t j>
102 using CouplingMap = typename std::conditional< (i != edgeId && j != edgeId),
103 typename BulkFacetMapper::template CouplingMap<i,j>,
104 typename FacetEdgeMapper::template CouplingMap<i,j> >::type;
105
107 template<int dim>
108 static constexpr GridIdType< ( dim == bulkDim ? bulkId : (dim == facetDim ? facetId : edgeId) ) > gridId()
109 { return GridIdType< ( dim == bulkDim ? bulkId : (dim == facetDim ? facetId : edgeId) ) >(); }
110
119 template< class Embeddings >
120 void update(const BulkFVG& bulkFvGridGeometry,
121 const FacetFVG& facetFvGridGeometry,
122 const EdgeFVG& edgeFvGridGeometry,
123 std::shared_ptr<const Embeddings> embeddings)
124 {
125 BulkFacetMapper::update(bulkFvGridGeometry, facetFvGridGeometry, embeddings);
126 FacetEdgeMapper::update(facetFvGridGeometry, edgeFvGridGeometry, embeddings);
127 }
128
130 using BulkFacetMapper::update;
131 using FacetEdgeMapper::update;
132
134 using BulkFacetMapper::couplingMap;
135 using FacetEdgeMapper::couplingMap;
136};
137
138} // end namespace Dumux
139
140// Here, we have to include all available implementations
144
145#endif
The available discretization methods in Dumux.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition adapt.hh:29
Implementation for the coupling mapper that sets up and stores the coupling maps between two domains ...
Definition facet/couplingmapper.hh:54
Specialization of the mapper class for the case of three domains with the grid dimensions d,...
Definition facet/couplingmapper.hh:75
static constexpr GridIdType<(dim==bulkDim ? bulkId :(dim==facetDim ? facetId :edgeId)) > gridId()
Allow retrievment of grid id for a given grid dimension.
Definition facet/couplingmapper.hh:108
static constexpr auto edgeGridId
Definition facet/couplingmapper.hh:92
static constexpr auto bulkGridId
export domain ids
Definition facet/couplingmapper.hh:90
static constexpr auto facetGridId
Definition facet/couplingmapper.hh:91
void update(const BulkFVG &bulkFvGridGeometry, const FacetFVG &facetFvGridGeometry, const EdgeFVG &edgeFvGridGeometry, std::shared_ptr< const Embeddings > embeddings)
Update coupling maps.
Definition facet/couplingmapper.hh:120
typename std::conditional<(i !=edgeId &&j !=edgeId), typename BulkFacetMapper::template CouplingMap< i, j >, typename FacetEdgeMapper::template CouplingMap< i, j > >::type CouplingMap
Export the coupling map type for the provided domain indices.
Definition facet/couplingmapper.hh:102
typename std::conditional<(i==edgeId), typename FacetEdgeMapper::template Stencil< i >, typename BulkFacetMapper::template Stencil< i > >::type Stencil
Export the coupling stencil type for the provided domain index.
Definition facet/couplingmapper.hh:96
Implementation for the coupling mapper that sets up and stores the coupling maps between two domains ...
Implementation for the coupling mapper that sets up and stores the coupling maps between two domains ...
Implementation for the coupling mapper that sets up and stores the coupling maps between two domains ...