Skip to content
Snippets Groups Projects
Commit 6bf969bd authored by Oliver Sander's avatar Oliver Sander
Browse files

[bugfix] Properly implement entity seeds for UGGrid facets and edges

Due to unclear semantics of the hasEntity capability, these case are not
currently tested by the checkentityseed.hh grid test.
parent afc9237e
No related branches found
No related tags found
1 merge request!84Fix uggrid entityseeds
Pipeline #
......@@ -240,9 +240,6 @@ namespace Dune {
typedef typename GridImp::template Codim<codim>::Geometry Geometry;
/** \brief The type of UGGrid Entity seeds */
typedef typename GridImp::Traits::template Codim<codim>::EntitySeed EntitySeed;
UGEdgeEntity()
: target_(nullptr)
, gridImp_(nullptr)
......@@ -297,9 +294,6 @@ namespace Dune {
//! geometry of this entity
Geometry geometry () const { return Geometry( *geo_ ); }
/** \brief Get the seed corresponding to this entity */
EntitySeed seed () const { return EntitySeed( *this ); }
protected:
#ifdef ModelP
/** \brief Return true if at least one copy of the edge on another processor is marked as 'border' */
......@@ -370,6 +364,8 @@ namespace Dune {
{
public:
/** \brief The type of UGGrid Entity seeds */
typedef typename GridImp::Traits::template Codim<1>::EntitySeed EntitySeed;
UGGridEntity()
{}
......@@ -378,6 +374,15 @@ namespace Dune {
: UGEdgeEntity<2,GridImp>(target,gridImp)
{}
/** \brief Get the seed corresponding to this entity
*
* This method cannot be moved to the base class, because the 'this' pointer has the wrong type there.
*/
EntitySeed seed () const
{
return EntitySeed( *this );
}
};
/*! \brief Specialization for edge in 3D
......@@ -389,6 +394,8 @@ namespace Dune {
{
public:
/** \brief The type of UGGrid Entity seeds */
typedef typename GridImp::Traits::template Codim<2>::EntitySeed EntitySeed;
UGGridEntity()
{}
......@@ -397,8 +404,16 @@ namespace Dune {
: UGEdgeEntity<3,GridImp>(target,gridImp)
{}
};
/** \brief Get the seed corresponding to this entity
*
* This method cannot be moved to the base class, because the 'this' pointer has the wrong type there.
*/
EntitySeed seed () const
{
return EntitySeed( *this );
}
};
/*! \brief UGGrid face entity in 3d grids
* \ingroup UGGrid
......@@ -416,6 +431,9 @@ namespace Dune {
typedef typename GridImp::template Codim<codim>::Geometry Geometry;
/** \brief The type of UGGrid Entity seeds */
typedef typename GridImp::Traits::template Codim<codim>::EntitySeed EntitySeed;
UGGridEntity()
: target_(nullptr)
, gridImp_(nullptr)
......@@ -497,6 +515,12 @@ namespace Dune {
//! geometry of this entity
Geometry geometry () const { return Geometry( *geo_ ); }
/** \brief Get the seed corresponding to this entity */
EntitySeed seed () const
{
return EntitySeed( *this );
}
/** \brief Set to a UG side vector object
\param target The UG side vector to point to
\param gridImp Dummy argument, only for consistency with codim-0 entities
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment