Skip to content

Commit

Permalink
Turns out in real problems this iterateIdealH shifting between radial…
Browse files Browse the repository at this point in the history
…Only and fixShape doesn't work well
  • Loading branch information
jmikeowen committed Oct 9, 2024
1 parent 131410a commit 0dc23a9
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/Utilities/iterateIdealH.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,18 @@ iterateIdealH(DataBase<Dimension>& dataBase,
}
}

// Check if we're using ASPH and radialOnly. If so we'll switch to fixShape for the iteration.
auto radialOnly = false;
ASPHSmoothingScale<Dimension>* asphPkg = nullptr;
for (auto* pkg: packages) {
asphPkg = dynamic_cast<ASPHSmoothingScale<Dimension>*>(pkg);
if (asphPkg != nullptr and asphPkg->radialOnly()) {
radialOnly = true;
asphPkg->radialOnly(false);
asphPkg->fixShape(true);
break;
}
}
// // Check if we're using ASPH and radialOnly. If so we'll switch to fixShape for the iteration.
// auto radialOnly = false;
// ASPHSmoothingScale<Dimension>* asphPkg = nullptr;
// for (auto* pkg: packages) {
// asphPkg = dynamic_cast<ASPHSmoothingScale<Dimension>*>(pkg);
// if (asphPkg != nullptr and asphPkg->radialOnly()) {
// radialOnly = true;
// asphPkg->radialOnly(false);
// asphPkg->fixShape(true);
// break;
// }
// }

// Build a list of flags to indicate which nodes have been completed.
auto flagNodeDone = dataBase.newFluidFieldList(0, "node completed");
Expand Down Expand Up @@ -265,12 +265,12 @@ iterateIdealH(DataBase<Dimension>& dataBase,
for (auto* boundaryPtr: range(boundaries.begin(), boundaries.end())) boundaryPtr->applyFieldListGhostBoundary(m);
for (auto* boundaryPtr: range(boundaries.begin(), boundaries.end())) boundaryPtr->finalizeGhostBoundary();

// Restore ASPH radialOnly choice if necessary
if (radialOnly) {
CHECK(asphPkg != nullptr);
asphPkg->radialOnly(true);
asphPkg->fixShape(false);
}
// // Restore ASPH radialOnly choice if necessary
// if (radialOnly) {
// CHECK(asphPkg != nullptr);
// asphPkg->radialOnly(true);
// asphPkg->fixShape(false);
// }

// Report the final timing.
const auto t1 = clock();
Expand Down

0 comments on commit 0dc23a9

Please sign in to comment.