Skip to content
Snippets Groups Projects
Commit a74b2cdb authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Small bugfix in findElInfoAtPoint, thanks to Francisco.

parent bc349314
No related branches found
No related tags found
No related merge requests found
......@@ -674,10 +674,22 @@ namespace AMDiS {
mel_info->fillMacroInfo(mel);
// We have the care about not to visite a macro element twice. In this case the
// function would end up in an infinite loop. If a macro element is visited a
// second time, what can happen with periodic boundary conditions, the point is
// not within the mesh!
std::set<int> macrosVisited;
macrosVisited.insert(mel->getIndex());
int k;
while ((k = mel_info->worldToCoord(xy, &lambda)) >= 0) {
if (mel->getNeighbour(k)) {
mel = mel->getNeighbour(k);
mel = mel->getNeighbour(k);
if (macrosVisited.count(mel->getIndex()))
return false;
macrosVisited.insert(mel->getIndex());
mel_info->fillMacroInfo(mel);
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment