Skip to content

Guard None MeshOptions in RelaxMesh and NaN nodes in remove_drift. - #126

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_1025429385
Nov 19, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_1025429385

Conversation

@copybara-service

Copy link
Copy Markdown

Guard None MeshOptions in RelaxMesh and NaN nodes in remove_drift.

RelaxMeshConfig.options defaults to None, so maybe_update_init_state raised AttributeError during irregular-element regularization whenever options was omitted. Similarly, relax_mesh with remove_drift=True averaged over NaN-masked exterior nodes, poisoning the entire mesh with NaN.

Check options is not None in RelaxMesh.maybe_update_init_state to match _preprocess_prev. Compute remove_drift center-of-mass offsets over finite mesh nodes only and zero velocities on masked exterior nodes.

`RelaxMeshConfig.options` defaults to `None`, so `maybe_update_init_state` raised `AttributeError` during irregular-element regularization whenever `options` was omitted. Similarly, `relax_mesh` with `remove_drift=True` averaged over `NaN`-masked exterior nodes, poisoning the entire mesh with `NaN`.

Check `options is not None` in `RelaxMesh.maybe_update_init_state` to match `_preprocess_prev`. Compute `remove_drift` center-of-mass offsets over finite mesh nodes only and zero velocities on masked exterior nodes.

PiperOrigin-RevId: 1025870697
@copybara-service
copybara-service Bot merged commit c194126 into main Nov 19, 2026
1 check passed
@copybara-service
copybara-service Bot deleted the test_1025429385 branch November 19, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant