Aero: fix sampled GLOBE forces and clarify recipe quadrature - #1971
peterdsharpe wants to merge 18 commits into
Conversation
MeshToDomainMesh in cell_centroids mode turns each source cell into an interior query point and discards the cells. Any integral over those points (forces, area-weighted losses or metrics) then has no measure to weight by, and after SubsampleMesh the retained cells' measure weights are lost as well. Record cell_measures(mesh) (area times composed measure weights) on the interior under the reserved point_data key TARGET_QUADRATURE_MEASURE_KEY, aligned one-for-one with the centroids. Reject the key as a user target or as a pre-existing input field so it cannot be silently shadowed. Also validate the shape of the reserved per-cell measure-weights field and of tensor factors passed to compose_measure_weights: TensorDict only checks the leading dimension, so a (n_cells, 1) tensor was storable but broadcast wrongly against cell_areas.
…, drop query measure from saved outputs forces.py and infer.py said that force/moment coefficients from a subsampled vehicle surface "cover only the kept cells" and shrink by the kept-area fraction. That is no longer true: SubsampleMesh records each kept cell's inverse inclusion probability as a measure weight and Mesh.integrate multiplies by it, so the coefficients are unbiased (if noisy) estimates of the full-surface integrals. Correct the module docstring and the once-per-run warning, and pin the behaviour with a test on a subsampled closed surface. MeshToDomainMesh now records the query measure on the interior. It is in training-geometry units and would be stale after rescale_geometry, so attach_and_save drops it alongside the training-space targets.
CODEOWNERS review mapCurrent for commit ⏳ @coreyjadams — 8 file(s)
⏳ @negin513 — 4 file(s)
⏳ @peterdsharpe — 6 file(s)
No CODEOWNER
Comment |
|
/ok to test e39cd39 |
…dit-fix-1971-sept9 Signed-off-by: Peter Sharpe <peterdsharpe@gmail.com>
Signed-off-by: Peter Sharpe <peterdsharpe@gmail.com>
|
/ok to test a71c242 |
Signed-off-by: Peter Sharpe <peterdsharpe@gmail.com>
Signed-off-by: Peter Sharpe <peterdsharpe@gmail.com>
|
/ok to test fc52b33 |
|
The PR is not safe to merge until the GLOBE visualization force integration preserves and consumes the corrected measure on subsampled prediction surfaces. Findings
SummaryThis PR replaces multiplier-style mesh weights with complete cell and point measures, propagates those measures through sampling and geometry operations, introduces explicit point-sample integration, and updates the external-aero documentation and inference contracts.
Reviews (1) · Last reviewed commit: "Merge unified measures into aero force d..." |
|
/ok to test f4475b3 |
Co-authored-by: megnvidia <mmiranda@nvidia.com>
|
/ok to test 697f465 |
|
/ok to test 1256171 |
|
/ok to test 890e992 |
Subsampled GLOBE DrivAerML visualization forces discarded the sampling correction and integrated using geometric triangle areas. Keeping half the surface therefore halved the reported force in a constant-traction case. Postprocessing now preserves the effective measure, and force integration consumes it without retaining reference cell fields that conflict with predictions.
The unified aero recipe already uses effective measures. This PR corrects its force documentation and subsampling warning, and verifies that exported query measures remain usable in physical coordinates.
Builds on the measure API from #1970, which is now merged.
Validation: 41 focused CPU tests passed across GLOBE dataset measures and recipe force/inference tests; all applicable pre-commit hooks passed. Three new regression cases failed before the GLOBE fix. Earlier broader recipe validation had 185 passes, one skip, and a pre-existing failure in
test_sdf_normals_near_wall_use_face_normal, also reproduced on #1970 and the pre-update #1971 head (22219d40).