{"id": "order_selection", "title": "Output-driven order selection", "description": "The polynomial degree of the inviscid bump-channel case (12 x 4 elements) is raised from p = 1, each level continued from the one below, until the adjoint-based estimate of the error of the drag coefficient meets a tolerance. The checks are those of the contract: when the result says the tolerance is met, the estimated error of the selected degree is within it and that of every lower degree is not; a tighter tolerance never selects a lower degree; a tolerance that cannot be met within the allowed degrees is reported as not met. The estimate itself is compared with the difference to an independent solution two degrees higher, and every level with an independent solve at its degree.", "passed": true, "checks": [{"name": "independent solves from the free stream at p = 1 to 5: converged", "value": "5 of 5", "expected": "all", "passed": true}, {"name": "tolerance 0.02: met, and |estimated error| at the selected degree p = 1", "value": 0.011385464791574734, "expected": "<= 0.02", "passed": true}, {"name": "tolerance 0.008: met, and |estimated error| at the selected degree p = 2", "value": 0.005188660565720153, "expected": "<= 0.008", "passed": true}, {"name": "tolerance 0.008: smallest |estimated error| of the degrees below the selected one", "value": 0.011385464791574734, "expected": "> 0.008 (the lowest sufficient degree is selected)", "passed": true}, {"name": "tolerance 0.001: met, and |estimated error| at the selected degree p = 3", "value": 7.77035679591246e-05, "expected": "<= 0.001", "passed": true}, {"name": "tolerance 0.001: smallest |estimated error| of the degrees below the selected one", "value": 0.005188660565720153, "expected": "> 0.001 (the lowest sufficient degree is selected)", "passed": true}, {"name": "selected degrees for tolerances 0.02, 0.008, 0.001", "value": "1, 2, 3", "expected": "non-decreasing as the tolerance is tightened", "passed": true}, {"name": "tolerance 1e-06 with at most degree 2: reported as not met, |estimated error| at degree 2", "value": 0.005188660565720153, "expected": "> 1e-06, met = false, degree = 2", "passed": true}, {"name": "cd of a degree reached by continuation versus an independent solve from the free stream (largest difference)", "value": 8.422814312333826e-15, "expected": "< 1e-10 (both converged to a relative residual of 1e-12)", "passed": true}, {"name": "Newton steps of a level continued from the degree below, relative to a solve from the free stream (largest)", "value": 0.6, "expected": "< 1", "passed": true}, {"name": "p = 1: |cd \u2212 cd at p + 2| / |estimated error|", "value": 1.5446643906837965, "expected": "0.4 \u2026 2.5 (regression bound, not a guarantee of the estimator; the ratios measured in this run are in the notes)", "passed": true}, {"name": "p = 2: |cd \u2212 cd at p + 2| / |estimated error|", "value": 1.0857015390043585, "expected": "0.4 \u2026 2.5 (regression bound, not a guarantee of the estimator; the ratios measured in this run are in the notes)", "passed": true}, {"name": "p = 3: |cd \u2212 cd at p + 2| / |estimated error|", "value": 1.5903158885255426, "expected": "0.4 \u2026 2.5 (regression bound, not a guarantee of the estimator; the ratios measured in this run are in the notes)", "passed": true}], "charts": [{"id": "error_vs_order", "type": "line", "title": "Estimated and actual error of the drag coefficient by degree", "xlabel": "polynomial degree p", "ylabel": "error of cd", "xscale": "linear", "yscale": "log", "series": [{"name": "|estimated error|", "x": [1, 2, 3], "y": [0.011385464791574734, 0.005188660565720153, 7.77035679591246e-05]}, {"name": "|cd \u2212 cd at p + 2|", "x": [1, 2, 3], "y": [0.017586722034929603, 0.005633336761573596, 0.0001235732187205201]}, {"name": "tolerance 0.02", "x": [1, 3], "y": [0.02, 0.02]}, {"name": "tolerance 0.008", "x": [1, 3], "y": [0.008, 0.008]}, {"name": "tolerance 0.001", "x": [1, 3], "y": [0.001, 0.001]}], "note": "Horizontal lines are the tolerances; the selected degree is the first whose estimated error lies below the line."}], "tables": [{"id": "levels", "title": "Levels of each selection", "columns": ["tolerance", "p", "DOF", "cd", "|estimated error|", "|cd \u2212 cd at p + 2|", "actual / estimated", "Newton steps", "outcome"], "rows": [[0.02, 1, 768, 0.017727490587180223, 0.011385464791574734, 0.017586722034929603, 1.5446643906837965, 9, "selected"], [0.008, 1, 768, 0.017727490587180223, 0.011385464791574734, 0.017586722034929603, 1.5446643906837965, 9, "error above the tolerance"], [0.008, 2, 1728, 0.005694777551261704, 0.005188660565720153, 0.005633336761573596, 1.0857015390043585, 6, "selected"], [0.001, 1, 768, 0.017727490587180223, 0.011385464791574734, 0.017586722034929603, 1.5446643906837965, 9, "error above the tolerance"], [0.001, 2, 1728, 0.005694777551261704, 0.005188660565720153, 0.005633336761573596, 1.0857015390043585, 6, "error above the tolerance"], [0.001, 3, 3072, 0.00014076855224219795, 7.77035679591246e-05, 0.0001235732187205201, 1.5903158885255426, 6, "selected"], [1e-06, 1, 768, 0.017727490587180223, 0.011385464791574734, 0.017586722034929603, 1.5446643906837965, 9, "error above the tolerance"], [1e-06, 2, 1728, 0.005694777551261704, 0.005188660565720153, 0.005633336761573596, 1.0857015390043585, 6, "last allowed degree, tolerance not met"]]}, {"id": "references", "title": "Independent solves from the free stream", "columns": ["p", "DOF", "cd", "Newton steps"], "rows": [[1, 768, 0.017727490587180223, 9], [2, 1728, 0.005694777551254145, 10], [3, 3072, 0.00014076855225062077, 10], [4, 4800, 6.144078968810804e-05, 11], [5, 6912, 1.7195333521677846e-05, 11]]}], "provenance": {"version": "0.4.0", "commit": "39979fcf902ad6116eb550b881b4278d4599c8e2", "dirty": false, "describe": "39979fcf90", "device": {"platform": "cpu", "device": "cpu:0", "device_kind": "cpu", "jax": "0.11.2", "x64": true}, "timestamp": "2026-11-12T11:46:30-0500"}, "wall_time": 364.44, "notes": "Measured in this run: tolerances 0.02, 0.008, 0.001 selected degrees 1, 2, 3. The difference to the solution two degrees higher was 1.09 to 1.59 times the estimated error (degrees 1 to 3); the estimate predicts the output one degree higher, so a ratio of one is not expected exactly. Levels continued from the degree below needed at most 0.60 of the Newton steps of a solve from the free stream. The exact drag of this inviscid subsonic flow is zero.", "level": "quick"}