From c08bb9d93db82635bd63eb0a063d2042a53710cd Mon Sep 17 00:00:00 2001 From: Josh Bazar <45159255+TameTheGame@users.noreply.github.com> Date: Tue, 8 Sep 2026 20:27:06 -0400 Subject: [PATCH] test(postprocessing): check signed magnitudes in 1-D faceflow cases --- autotest/test_postprocessing.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/autotest/test_postprocessing.py b/autotest/test_postprocessing.py index fcebe5fbf..5aebc0f21 100644 --- a/autotest/test_postprocessing.py +++ b/autotest/test_postprocessing.py @@ -149,6 +149,16 @@ def test_get_structured_faceflows(function_tmpdir, nlay, nrow, ncol): assert np.any(fff) == (nrow > 1) assert np.any(flf) == (nlay > 1) + if nlay * nrow * ncol == 3: + # The 1-D cases have unit K and cell dimensions, with all heads + # prescribed as 11, 12, 13. Darcy flow is -1 toward increasing + # column, row, or layer number; the final face has no neighbor. + expected = np.array([-1.0, -1.0, 0.0]).reshape(nlay, nrow, ncol) + for flow, size in zip((frf, fff, flf), (ncol, nrow, nlay)): + if size == 3: + np.testing.assert_allclose(flow, expected, rtol=0.0, atol=1e-8) + assert flow.flat[-1] == 0.0 + @pytest.mark.mf6 @requires_exe("mf6")