Fix gauss output when there's a conductive wall #370
Merged
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.
Previously, the
divefield of gauss output includes virtual surface charges, butrhoonly includes the charge deposited by actual particles. The gauss check itself simply sliced out the layer with the surface charges, which would have been a correct way to handle them, except the slice caused indices of error-ful cells to be off by 1 when printed (I think). However, the dumped data were not sliced in this way. This made it necessary to manually ignore that layer in postprocessing, or else you would see massive apparent errors, obscuring any actual errors.Now,
rhois simply set todivein the layer with surface charges, so it is no longer necessary to skip the layer when looking for errors. Of course, this erases information about the actualrhoin that layer, but that can be obtained through multiple other means (pfd_moments or prt).This PR also does a few minor, related improvements, such as an
exit_on_failureoption for checks (that works in release builds!).