Download tests/test_t2_structural_validation.py from HaomingLuo/AgentFEM-Material-Loading-Memory: direct link, hf CLI and curl.
- Browser
- Download file 800 Bytes
-
https://huggingface.co/datasets/HaomingLuo/AgentFEM-Material-Loading-Memory/resolve/main/tests/test_t2_structural_validation.py
- Command line
-
hf download hf://datasets/HaomingLuo/AgentFEM-Material-Loading-Memory/tests/test_t2_structural_validation.py
-
curl -L -o test_t2_structural_validation.py https://huggingface.co/datasets/HaomingLuo/AgentFEM-Material-Loading-Memory/resolve/main/tests/test_t2_structural_validation.py
800 Bytes
| from __future__ import annotations | |
| import numpy as np | |
| from src import structural_validate_t2_models as module | |
| def test_notched_bar_geometry_is_positive_and_symmetric() -> None: | |
| nodes, area = module.geometry(12) | |
| assert np.all(np.diff(nodes) > 0.0) | |
| assert np.all(area > 0.0) | |
| np.testing.assert_allclose(area, area[::-1]) | |
| def test_native_response_returns_positive_algorithmic_tangent() -> None: | |
| stress, tangent, state = module.native_response(module.material(), None, 0.003) | |
| assert np.isfinite(stress) | |
| assert tangent > 0.0 | |
| assert state.equivalent_plastic_strain > 0.0 | |
| def test_load_history_contains_reversals() -> None: | |
| history = module.load_history(81) | |
| increments = np.diff(history) | |
| assert np.any(increments > 0.0) | |
| assert np.any(increments < 0.0) | |