Skip to content

Commit 9a2ca6d

Browse files
committed
cleanup tests
1 parent 42c8268 commit 9a2ca6d

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

test/metrics/test_metrics_von_mises.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
from physicsnemo.metrics.cae.von_mises import von_mises_from_stress_tensor
2424

25-
# --- von_mises_from_stress_tensor tests ---
26-
2725

2826
def test_von_mises_uniaxial_tension_torch():
2927
"""Uniaxial tension: σxx = 100, von Mises = 100."""
@@ -109,7 +107,7 @@ def test_von_mises_invalid_ndim():
109107

110108

111109
def test_von_mises_autograd():
112-
"""Gradients flow through for torch tensors (no numpy conversion)."""
110+
"""Gradients flow through for torch tensors."""
113111
stress = torch.tensor(
114112
[[100.0, 10.0, 0.0], [10.0, 20.0, 0.0], [0.0, 0.0, 0.0]],
115113
requires_grad=True,
@@ -135,17 +133,3 @@ def test_von_mises_asymmetric_symmetrized():
135133
)
136134
vm_asym = von_mises_from_stress_tensor(stress_asym)
137135
assert torch.allclose(vm_sym, vm_asym)
138-
139-
140-
# --- Doctest verification ---
141-
142-
143-
def test_doctest_von_mises_from_stress_tensor():
144-
"""Verify doctest examples for von_mises_from_stress_tensor."""
145-
stress = torch.tensor([[100.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]])
146-
vm = von_mises_from_stress_tensor(stress)
147-
assert torch.allclose(vm, torch.tensor(100.0))
148-
149-
stress = torch.eye(3) * 50
150-
vm = von_mises_from_stress_tensor(stress)
151-
assert torch.allclose(vm, torch.tensor(0.0))

0 commit comments

Comments
 (0)