1 #ifndef DUNE_SPGRID_INTERSECTION_HH
2 #define DUNE_SPGRID_INTERSECTION_HH
6 #include <dune/common/typetraits.hh>
8 #include <dune/geometry/type.hh>
10 #include <dune/grid/common/intersection.hh>
21 template<
int,
int,
class >
35 template<
class Gr
id >
40 typedef typename std::remove_const< Grid >::type::Traits Traits;
42 typedef typename Traits::ReferenceCube ReferenceCube;
45 typedef typename ReferenceCube::ctype
ctype;
47 static const int dimension = ReferenceCube::dimension;
51 typedef typename Traits::template Codim< 0 >::Entity
Entity;
53 typedef typename Traits::template Codim< 1 >::Geometry
Geometry;
54 typedef typename Traits::template Codim< 1 >::LocalGeometry
LocalGeometry;
81 insideInfo_( insideInfo )
91 return (insideInfo_.
id()[ normalId_.
axis() ] + normalId_.
sign() == 2*
gridLevel().globalMesh().bound( normalId_ ));
183 template<
class Gr
id >
187 MultiIndex id = insideInfo_.id() + normalId_ + normalId_;
191 const PartitionList &allPartition = gridLevel().template partition< All_Partition >();
194 assert( partition.
hasNeighbor( indexInInside() ) );
198 const int bound = nbPartition.
bound( -normalId_ );
199 id[ normalId_.axis() ] = bound + normalId_.sign()*(1 - (bound & 1));
Definition: iostream.hh:7
const Partition & partition(const unsigned int number) const
Definition: cachedpartitionlist.hh:94
Definition: entity.hh:146
Definition: entityinfo.hh:24
const GridLevel & gridLevel() const
Definition: entityinfo.hh:66
const MultiIndex & id() const
Definition: entityinfo.hh:68
unsigned int partitionNumber() const
Definition: entityinfo.hh:73
bool equals(const This &other) const
Definition: entityinfo.hh:77
ctype faceVolume(int i) const
Definition: geometricgridlevel.hh:75
Definition: geometry.hh:87
Base::LocalVector LocalVector
Definition: geometry.hh:108
Definition: gridlevel.hh:35
const Grid & grid() const
Definition: gridlevel.hh:82
const PartitionList & partition() const
Definition: gridlevel.hh:227
size_t boundaryIndex(const MultiIndex &id, const unsigned int partitionNumber, const int face) const
Definition: gridlevel.hh:272
Definition: intersection.hh:37
__SPGrid::EntityInfo< Grid, 1 > EntityInfo
Definition: intersection.hh:62
NormalVector outerNormal(const LocalVector &local) const
Definition: intersection.hh:140
const GridLevel & gridLevel() const
Definition: intersection.hh:159
int indexInOutside() const
Definition: intersection.hh:138
std::size_t boundarySegmentIndex() const
Definition: intersection.hh:99
GeometryType type() const
Definition: intersection.hh:135
bool equals(const This &other) const
Definition: intersection.hh:154
LocalGeometry geometryInOutside() const
Definition: intersection.hh:125
bool neighbor() const
Definition: intersection.hh:105
bool conforming() const
Definition: intersection.hh:115
EntityImpl::EntityInfo ElementInfo
Definition: intersection.hh:61
SPIntersection(const EntityInfo &entityInfo, int face)
Definition: intersection.hh:84
bool boundary() const
Definition: intersection.hh:89
Traits::template Codim< 1 >::Geometry Geometry
Definition: intersection.hh:53
NormalVector centerUnitOuterNormal() const
Definition: intersection.hh:150
void setEntityInfo(const EntityInfo &entityInfo)
Definition: intersection.hh:163
void setInside(const ElementInfo &insideInfo)
Definition: intersection.hh:161
Geometry geometry() const
Definition: intersection.hh:130
LocalGeometry geometryInInside() const
Definition: intersection.hh:120
static const int dimensionworld
Definition: intersection.hh:49
NormalVector unitOuterNormal(const LocalVector &local) const
Definition: intersection.hh:152
SPIntersection(const ElementInfo &insideInfo, int face)
Definition: intersection.hh:79
Entity inside() const
Definition: intersection.hh:111
Traits::template Codim< 0 >::Entity Entity
Definition: intersection.hh:51
Traits::template Codim< 1 >::LocalGeometry LocalGeometry
Definition: intersection.hh:54
EntityInfo entityInfo() const
Definition: intersection.hh:168
static const int dimension
Definition: intersection.hh:47
static const int mydimension
Definition: intersection.hh:48
int indexInInside() const
Definition: intersection.hh:137
EntityImpl::GridLevel GridLevel
Definition: intersection.hh:64
SPNormalVector< ctype, dimensionworld > NormalVector
Definition: intersection.hh:67
ReferenceCube::ctype ctype
Definition: intersection.hh:45
Entity outside() const
Definition: intersection.hh:185
GeometryImpl::LocalVector LocalVector
Definition: intersection.hh:66
NormalVector integrationOuterNormal(const LocalVector &local) const
Definition: intersection.hh:145
int boundaryId() const
Definition: intersection.hh:94
int sign() const
Definition: normal.hh:86
int face() const
Definition: normal.hh:82
int axis() const
Definition: normal.hh:84
const MultiIndex & bound(unsigned int b) const
Definition: partition.hh:37
Definition: partition.hh:79
unsigned int number() const
Definition: partition.hh:242
bool hasNeighbor(const int face) const
Definition: partition.hh:267
const unsigned int & neighbor(const int face) const
Definition: partition.hh:250