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

Remove the method ReferenceElement::checkInside<codim>

As decided on http://users.dune-project.org/doodles/39

The method never worked, until fixed rather by coincidence right
before the release of dune-geometry-2.4.  So apparently demand
for it was low.
parent 3c700672
No related branches found
No related tags found
No related merge requests found
......@@ -166,26 +166,6 @@ namespace Dune
return GenericGeometry::template checkInside< ctype, dim >( type().id(), dim, local, tolerance );
}
/** \brief check if a point is in the reference element of
* the i-th subentity with codimension codim
*
* Denote by E the i-th subentity of codimension codim of the current
* reference element. This method return true, if the given local
* coordinate is within the reference element for the entity E.
*
* \tparam codim codimension of subentity E
*
* \param[in] local coordinates of the point with respect to the
* reference element of E
* \param[in] i number of subentity E (0 <= i < size( c ))
*/
template< int codim >
bool checkInside ( const FieldVector< ctype, dim-codim > &local, int i ) const
{
const ctype tolerance = ctype( 64 ) * std::numeric_limits< ctype >::epsilon();
return GenericGeometry::template checkInside< ctype, dim-codim >( type( i, codim ).id(), dim-codim, local, tolerance );
}
/** \brief obtain the embedding of subentity (i,codim) into the reference
* element
*
......
......@@ -125,13 +125,8 @@ int main () try
const ReferenceElement<double,2>::Codim<0>::Geometry referenceTriangleMapping = referenceTriangle.geometry< 0 >( 0 );
referenceTriangleMapping.corner(0);
// test the checkInside methods
// test the checkInside method
test(referenceTriangle.checkInside({0.3,0.3}));
for (int i=0; i<3; i++)
{
test(referenceTriangle.checkInside<1>({0.5}, i));
test(!referenceTriangle.checkInside<1>({-0.5}, i));
}
// //////////////////////////////////////////////////////////////////////////
// Test quadrilateral
......@@ -266,23 +261,9 @@ int main () try
const ReferenceElement<double,3>::Codim<0>::Geometry referenceTetraMapping = referenceTetra.geometry< 0 >( 0 );
referenceTetraMapping.corner(0);
// test the checkInside methods
// test the checkInside method
test(referenceTetra.checkInside({0.3,0.3,0.3}));
// checkInside for edges
for (int i=0; i<6; i++)
{
test(referenceTetra.checkInside<2>({0.5}, i));
test(!referenceTetra.checkInside<2>({-0.5}, i));
}
// checkInside for faces
for (int i=0; i<4; i++)
{
test(referenceTetra.checkInside<1>({0.3,0.3}, i));
test(!referenceTetra.checkInside<1>({1.0,1.0}, i));
}
// //////////////////////////////////////////////////////////////////////////
// Test pyramid
// //////////////////////////////////////////////////////////////////////////
......
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