Conversation
For a plain 2D case (no bubbles, no hypoelasticity) s_write_probe_files wrote only (t, rho, vel(1), pres) to D/probe<i>_prim.dat and printed a 'time = ... rho = ... pres = ...' line to stdout every step. The 3D and 2D bubble/hypoelastic branches all write vel(2), so this was just the plain-2D branch being incomplete. Add vel(2) under the same case- optimization guard the neighbouring branches use, remove the print, and add a '2D -> 1 Fluid(s) -> probe' test with a non-zero vel(2) so the new column is exercised. Fixes MFlowCode#1841
Lines of Code
|
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.
For a plain 2D case (no bubbles, no hypoelasticity),
s_write_probe_fileswrote only(t, rho, vel(1), pres)toD/probe<i>_prim.datand thenprintedtime = ... rho = ... pres = ...to stdout on every step. The 3D branch and the 2D bubble/hypoelastic branches all includevel(2), so the plain-2D branch was just incomplete, and theprintlooks like leftover debugging — one line per probe per step in the job log.This adds
vel(2)to that branch and drops theprint. Thewriteis wrapped in the same#:if not MFC_CASE_OPTIMIZATION or num_dims > 1guard the neighbouring bubble and hypoelastic branches use, sincevel(2)does not exist under 1D case optimization. The 2D probe file now has 5 columns,(t, rho, vel(1), vel(2), pres).Testing. There was no test covering the plain-2D probe path (the only 2D probe case is the hypoelastic one, which already writes
vel(2)), so this adds2D -> 1 Fluid(s) -> probe(tests/863E4401) with a probe at (0.5, 0.5) and a non-zerovel(2)on patch 2 so the new column is actually discriminating rather than a column of zeros. Generated on pristinemasterthe golden shows 4 values per step; running the fixed binary against that golden fails withVariable count didn't match for D/probe1_prim.dat, and the committed golden (regenerated with the fix) has 5 values per step with the fourth being the 0.1 y-velocity.Any external 2D golden probe files (outside this repo) will need regenerating for the extra column, as noted in the issue.
Fixes #1841