Skip to content
Snippets Groups Projects
Commit 8eb4202a authored by Dennis Gläser's avatar Dennis Gläser
Browse files

Merge branch 'fix/1d3d-extendend-source-stencil' into 'master'

[bugfix][embedded] Fix index constants

See merge request !2200
parents 78496c41 748442b4
No related branches found
No related tags found
1 merge request!2200[bugfix][embedded] Fix index constants
......@@ -52,10 +52,8 @@ class ExtendedSourceStencil
template<std::size_t id> using GridView = typename GridGeometry<id>::GridView;
template<std::size_t id> using Element = typename GridView<id>::template Codim<0>::Entity;
template<std::size_t id>
static constexpr std::size_t subDomainIdx = typename MDTraits::template SubDomain<id>::Index();
static constexpr std::size_t bulkIdx = subDomainIdx<0>;
static constexpr std::size_t lowDimIdx = subDomainIdx<1>;
static constexpr auto bulkIdx = typename MDTraits::template SubDomain<0>::Index();
static constexpr auto lowDimIdx = typename MDTraits::template SubDomain<1>::Index();
template<std::size_t id>
static constexpr bool isBox()
......@@ -169,16 +167,16 @@ public:
private:
//! the extended source stencil due to the source average (always empty for lowdim, but may be filled for bulk)
template<std::size_t id>
const auto& extendedSourceStencil_(const CouplingManager& couplingManager, Dune::index_constant<id> bulkDomain, const Element<id>& bulkElement) const
const auto& extendedSourceStencil_(const CouplingManager& couplingManager, Dune::index_constant<id> domainId, const Element<id>& element) const
{
if constexpr (subDomainIdx<id> == bulkIdx)
if constexpr (domainId == bulkIdx)
{
const auto bulkElementIdx = couplingManager.problem(bulkIdx).gridGeometry().elementMapper().index(bulkElement);
const auto bulkElementIdx = couplingManager.problem(bulkIdx).gridGeometry().elementMapper().index(element);
if (sourceStencils_.count(bulkElementIdx))
return sourceStencils_.at(bulkElementIdx);
}
return couplingManager.emptyStencil(subDomainIdx<id>);
return couplingManager.emptyStencil(domainId);
}
//! the additional stencil for the kernel evaluations / circle averages
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment