Loading...
Searching...
No Matches
intersectionindexset.hh
Go to the documentation of this file.
// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
#include <dune/grid-glue/gridglue.hh>
#include <dune/grid-glue/adapter/intersection.hh>
#ifndef ONLY_SIMPLEX_INTERSECTIONS
// we currently support only one intersection type. If we want to support more,
// we have to think about the semantics of our IndexSet
#error Not Implemented
#endif
namespace Dune {
namespace GridGlue {
template<typename P0, typename P1>
class IntersectionIndexSet
{
friend class ::Dune::GridGlue::GridGlue<P0,P1>;
typedef ::Dune::GridGlue::GridGlue<P0,P1> GridGlue;
public:
typedef typename GridGlue::IndexType IndexType;
typedef size_t SizeType;
template<int I, int O>
IndexType index (const Intersection<P0,P1,I,O> & i) const
{
return i.i_->index_;
}
SizeType size () const
{
return glue_->size();
}
private:
IntersectionIndexSet(const GridGlue * g) :
glue_(g) {}
const GridGlue * glue_;
};
} // end namespace GridGlue
} // end namespace Dune
#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
gridglue.hh
Central component of the module implementing the coupling of two grids.
intersection.hh
Model of the Intersection concept provided by GridGlue.
Dune
Definition gridglue.hh:37
Dune::GridGlue
Definition gridglue.hh:38
Dune::GridGlue::GridGlue
sequential adapter to couple two grids at specified close together boundaries
Definition gridglue.hh:67
Dune::GridGlue::GridGlue::IndexType
unsigned int IndexType
Definition gridglue.hh:147
Dune::GridGlue::Intersection
The intersection of two entities of the two patches of a GridGlue.
Definition intersection.hh:257
Dune::GridGlue::IntersectionIndexSet
Definition intersectionindexset.hh:20
Dune::GridGlue::IntersectionIndexSet::size
SizeType size() const
Return total number of intersections.
Definition intersectionindexset.hh:41
Dune::GridGlue::IntersectionIndexSet::IndexType
GridGlue::IndexType IndexType
The type used for the indices.
Definition intersectionindexset.hh:27
Dune::GridGlue::IntersectionIndexSet::index
IndexType index(const Intersection< P0, P1, I, O > &i) const
Map Dune::GridGlue::Intersection to index.
Definition intersectionindexset.hh:34
Dune::GridGlue::IntersectionIndexSet::SizeType
size_t SizeType
The type used for the size.
Definition intersectionindexset.hh:29