Commit c21c94de authored by Praetorius, Simon's avatar Praetorius, Simon

some changes in Mesh to allow for better findElInfoAtPoint

parent 26179bbc
......@@ -709,23 +709,26 @@ namespace AMDiS {
int k;
while ((k = mel_info->worldToCoord(xy, &lambda)) >= 0) {
macrosVisited.insert(mel->getIndex());
if (mel->getNeighbour(k) && !macrosVisited.count(mel->getNeighbour(k)->getIndex())) {
// look for next macro-element in the direction of the coordinates xy
mel = mel->getNeighbour(k);
// if (macrosVisited.count(mel->getIndex())) // Nur für periodische RB interessant, muss noch implementiert werden
// return false;
mel_info->fillMacroInfo(mel);
continue;
} else {
// consider all neighbors of the current macro-element to visit next
for (int i = 0; i < dim + 1; ++i) {
if (i != k && mel->getNeighbour(i) && !macrosVisited.count(mel->getNeighbour(i)->getIndex()))
active.push(mel->getNeighbour(i));
}
if (active.empty()) {
if (macrosVisited.size() == getNumberOfMacros()) {
// if all neighbors are visited already
if (active.empty()) {
if (macrosVisited.size() == static_cast<size_t>(getNumberOfMacros())) {
// if all macro-elements are visited -> no element found!
delete mel_info;
return false;
} else {
// go to an arbitrary macro-element to continue the search
deque<MacroElement*>::iterator it;
bool found = false;
for (it = firstMacroElement(); it != endOfMacroElements(); it++) {
......
......@@ -85,7 +85,7 @@ namespace AMDiS { namespace Parallel {
TEST_EXIT(meshDistributor)("No meshDistributor provided. Should not happen!\n");
MPI::COMM_WORLD.Barrier();
double wtime = MPI::Wtime();
Timer t;
if (createMatrixData)
fillPetscMatrix(const_cast< Matrix< DOFMatrix* >* >(A.getOriginalMat()));
......@@ -93,7 +93,7 @@ namespace AMDiS { namespace Parallel {
fillPetscRhs(&b);
INFO(info, 8)("creation of parallel data structures needed %.5f seconds\n",
MPI::Wtime() - wtime);
t.elapsed());
solvePetscMatrix(x, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment