Fix constantface comm#542
Open
NickvonWit wants to merge 3 commits into
Open
Conversation
Create a new test file for a Constant Face and Periodic Face respectively. We remove the old file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix face-specific boundary detection in
ExtrapolateFace::apply()This PR fixes #541. It also adds problem specific, Constant or Periodic Face, test files for the CG Solver.
The new test file for the constant face accounts for #535 by shifting the coordinates, to have the halo cells lie on the boundary instead of. The mechanism is explained in detail in my thesis.
File:
src/Field/BcTypes.hpp(ExtrapolateFace<Field>::apply())The old boundary check used an OR over both faces, so a rank touching the lower
global boundary would also apply the upper face BC (and vice versa). On multiple
ranks this overwrote internal halo cells that should come from neighbouring
ranks, breaking
ConstantFace/ZeroFaceproblems.The check is now face-specific: a face is only treated as a physical boundary if
this rank owns the matching global boundary side. Internal interfaces fall
through to halo exchange as intended.
Before:
bool isBoundary = (lDomains[myRank][d].max() == domain[d].max()) || (lDomains[myRank][d].min() == domain[d].min());After:
Running the same tests as in #541, again with 4 ranks/CPUs:
TestCGSolver_convergence_constant:
TestCGSolver_convergence_periodic: