Skip to content
Snippets Groups Projects
Commit b74dbfba authored by Hörl, Maximilian's avatar Hörl, Maximilian
Browse files

[bugfix] fix subentity codimension in getDiameter()

parent 65d8d90c
Branches
Tags
No related merge requests found
...@@ -521,9 +521,9 @@ protected: ...@@ -521,9 +521,9 @@ protected:
{ {
Scalar diameter(0.0); Scalar diameter(0.0);
for (int i = 0; i < ((dim + 1) * dim) / 2; i++) for (int i = 0; i < elem.subEntities(dim-1); i++)
{ {
const auto& edge = elem.template subEntity<1>(i); const auto& edge = elem.template subEntity<dim-1>(i);
diameter = std::max(diameter, edge.geometry().volume()); diameter = std::max(diameter, edge.geometry().volume());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment