Skip to content
Snippets Groups Projects
Commit 086750ff authored by Martin Alkaemper's avatar Martin Alkaemper
Browse files

fixed false positive in hasboundaryintersections of entity

parent 247790a7
No related branches found
No related tags found
No related merge requests found
...@@ -538,7 +538,7 @@ namespace Dune { ...@@ -538,7 +538,7 @@ namespace Dune {
// on ghost elements return false // on ghost elements return false
if( isGhost() ) return false; if( isGhost() ) return false;
enum { numFaces = EntityCount<GridImp::elementType>::numFaces }; enum { numFaces = dim == 3 ? EntityCount<GridImp::elementType>::numFaces : (elementType == tetra ? 3 : 4) };
typedef typename ImplTraits::HasFaceType HasFaceType; typedef typename ImplTraits::HasFaceType HasFaceType;
typedef typename ImplTraits::GEOFaceType GEOFaceType; typedef typename ImplTraits::GEOFaceType GEOFaceType;
......
...@@ -104,7 +104,25 @@ namespace Dune ...@@ -104,7 +104,25 @@ namespace Dune
::referenceElementCoordinatesUnrefined ( SideIdentifier side, LocalCoordinateType &result ) const ::referenceElementCoordinatesUnrefined ( SideIdentifier side, LocalCoordinateType &result ) const
{ {
//TODO use connector.face.nChild and (maybe twist) referenceElementCoordinatesRefined ( side, cornerCoords ) //TODO use connector.face.nChild and (maybe twist) referenceElementCoordinatesRefined ( side, cornerCoords )
result = LocalCoordinateType(0.);
// get the parent's face coordinates on the reference element (Dune reference element)
LocalCoordinateType cornerCoords;
referenceElementCoordinatesRefined ( side, cornerCoords );
if(connector_.face().nChild() == 0){
result[0] = cornerCoords[0];
result[1] = ( cornerCoords[1] + cornerCoords[0] );
result[1] *=0.5;
}
else if(connector_.face().nChild() == 1)
{
result[0] = ( cornerCoords[1] + cornerCoords[0] );
result[0] *= 0.5;
result[1] = cornerCoords[1];
}
else
std::cerr << "Trying to access more than two children on one face" << std::endl;
} }
......
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