Skip to content

Commit 613d768

Browse files
mnabianclaude
andauthored
Drop test recipe (#1583)
* drop test recipe * address greptile comments, minor edits, cleanup * Update CHANGELOG.md * formatting * fix license header * add docstrings to satisfy interrogate coverage check Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8b8a97f commit 613d768

23 files changed

Lines changed: 3240 additions & 0 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
including new variant that uses a dual tree traversal algorithm to reduce the
1515
complexity of the kernel evaluations from O(N^2) to O(N).
1616
- Adds GLOBE AirFRANS example case (`examples/cfd/external_aerodynamics/globe/airfrans`)
17+
- Adds drop-test dynamics recipe.
1718
- Adds concrete dropout uncertainty quantification for GeoTransolver. Learnable
1819
per-layer dropout rates enable MC-Dropout inference for uncertainty
1920
estimates. Disabled by default (`concrete_dropout: false`).

docs/img/drop_test/drop_test.png

442 KB
Loading

examples/structural_mechanics/drop_test/README.md

Lines changed: 347 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
_target_: datapipe.DropTestGraphDataset
18+
_convert_: all
19+
data_dir: ${training.raw_data_dir}
20+
global_features_filepath: ${training.global_features_filepath}
21+
num_samples: ${training.num_training_samples}
22+
num_steps: ${training.num_time_steps}
23+
sample_type: all_time_steps
24+
25+
static_features: [] # solids have no thickness; override per experiment
26+
dynamic_features: []
27+
dynamic_targets: []
28+
global_features: null
29+
stats_dir: stats
30+
log_transform_targets: false
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
_target_: datapipe.DropTestPointCloudDataset
18+
_convert_: all
19+
data_dir: ${training.raw_data_dir}
20+
global_features_filepath: ${training.global_features_filepath}
21+
num_samples: ${training.num_training_samples}
22+
num_steps: ${training.num_time_steps}
23+
sample_type: all_time_steps
24+
25+
static_features: []
26+
dynamic_features: []
27+
dynamic_targets: []
28+
global_features: null
29+
stats_dir: stats
30+
log_transform_targets: false
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Drop test (solid element) experiment using GeoTransolver (one-shot).
18+
# Usage: from crash dir: python train.py --config-path=../drop_test/conf --config-name=drop_test_geotransolver_oneshot
19+
# Or copy train.py to drop_test and run from there.
20+
21+
hydra:
22+
job:
23+
chdir: True
24+
run:
25+
dir: ./outputs/
26+
27+
experiment_name: "DropTest-GeoTransolver"
28+
29+
defaults:
30+
- reader: vtu
31+
- datapipe: point_cloud
32+
- model: geotransolver_one_shot
33+
- training: default
34+
- inference: default
35+
- _self_
36+
37+
training:
38+
raw_data_dir: ??? # set in config or via CLI
39+
raw_data_dir_validation: ??? # set in config or via CLI
40+
global_features_filepath: ??? # or null if not using global features
41+
optimizer: adam
42+
grad_clip_norm: 10.0
43+
44+
num_time_steps: 100
45+
num_training_samples: 20
46+
num_validation_samples: 4
47+
48+
inference:
49+
raw_data_dir_test: ??? # set in config or via CLI
50+
51+
datapipe:
52+
static_features: [] # solids have no thickness
53+
dynamic_targets: [Von_Mises]
54+
log_transform_targets: true
55+
global_features:
56+
- e_scale_mat1
57+
- e_scale_mat4
58+
- e_scale_mat5
59+
- e_scale_mat8
60+
- e_scale_mat9
61+
- rwall_orientation_rx
62+
- rwall_orientation_ry
63+
- rwall_orientation_rz
64+
sample_type: all_time_steps
65+
66+
model:
67+
functional_dim: 3 # coords only (no thickness)
68+
out_dim: 396
69+
global_dim: 8
70+
n_layers: 5
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# @package inference
18+
output_dir_pred: "./predicted_vtus"
19+
output_dir_exact: "./exact_vtus"
20+
output_dir_single_vtu: "./single_vtu_output"
21+
raw_data_dir_test: ???
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
_target_: rollout.FIGConvUNetOneShot
18+
_convert_: all
19+
20+
# Input/output channels
21+
in_channels: 4 # coords (3) + features; override in experiment if using global_features
22+
out_channels: 75 # (num_time_steps - 1) * 3; override in experiment
23+
24+
# Architecture
25+
kernel_size: 3
26+
hidden_channels: [16, 16, 16]
27+
num_levels: 2
28+
num_down_blocks: 1
29+
num_up_blocks: 1
30+
mlp_channels: [256, 256]
31+
32+
# Spatial domain
33+
aabb_max: [2.0, 2.0, 2.0]
34+
aabb_min: [-2.0, -2.0, -2.0]
35+
voxel_size: null
36+
37+
resolution_memory_format_pairs:
38+
- [b_xc_y_z, [2, 64, 64]]
39+
- [b_yc_x_z, [64, 2, 64]]
40+
- [b_zc_x_y, [64, 64, 2]]
41+
42+
use_rel_pos: true
43+
use_rel_pos_embed: true
44+
pos_encode_dim: 16
45+
46+
communication_types: ["sum"]
47+
to_point_sample_method: "graphconv"
48+
neighbor_search_type: "knn"
49+
knn_k: 16
50+
reductions: ["mean"]
51+
52+
use_scalar_output: false
53+
has_input_features: true
54+
55+
pooling_type: "max"
56+
pooling_layers: [2]
57+
58+
### Rollout parameters ###
59+
num_time_steps: ${training.num_time_steps}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
_target_: rollout.GeoTransolverAutoregressiveRolloutTraining
18+
_convert_: all
19+
20+
functional_dim: 4 # vel_norm (3) + features; override in experiment if using global_features
21+
out_dim: 3 # acceleration per step
22+
geometry_dim: 3
23+
global_dim: 3 # override in experiment if no global features (e.g. global_dim: null)
24+
slice_num: 128
25+
n_layers: 6
26+
use_te: false
27+
time_input: false
28+
include_local_features: true
29+
30+
### Rollout parameters ###
31+
num_time_steps: ${training.num_time_steps}
32+
dt: 5e-3
33+
initial_vel: 9.22 # override in experiment for dataset-specific impact velocity
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 - 2026 NVIDIA CORPORATION & AFFILIATES.
2+
# SPDX-FileCopyrightText: All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
_target_: rollout.GeoTransolverOneShot
18+
_convert_: all
19+
20+
functional_dim: 3
21+
out_dim: 250
22+
geometry_dim: 3
23+
global_dim: null
24+
slice_num: 128
25+
n_layers: 6
26+
use_te: false
27+
time_input: false
28+
include_local_features: true
29+
30+
num_time_steps: ${training.num_time_steps}

0 commit comments

Comments
 (0)