Skip to content
Snippets Groups Projects
Commit a4f7f475 authored by Martin Nolte's avatar Martin Nolte
Browse files

fix isCube for dim == 0

[[Imported from SVN: r6267]]
parent 1af5bc01
No related branches found
No related tags found
No related merge requests found
......@@ -231,7 +231,7 @@ namespace Dune {
/** \brief Return true if entity is a cube of any dimension */
bool isCube() const {
return ! none_ && (topologyId_ | 1) == (unsigned int)((1<<dim_)-1);
return ! none_ && ((topologyId_ ^ ((1 << dim_)-1)) >> 1 == 0);
}
/** \brief Return true if entity is a singular of any dimension */
......
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