2222
2323from physicsnemo .metrics .cae .von_mises import von_mises_from_stress_tensor
2424
25- # --- von_mises_from_stress_tensor tests ---
26-
2725
2826def 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
111109def 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