Skip to content

Initial and reference state#543

Merged
mvanzulli merged 1 commit intomainfrom
mvanzulli/526-initial-state
Apr 18, 2026
Merged

Initial and reference state#543
mvanzulli merged 1 commit intomainfrom
mvanzulli/526-initial-state

Conversation

@mvanzulli
Copy link
Copy Markdown
Owner

Closes: #526

… in the `ONSAS.StructuralSolvers` package. The tests cover various aspects of the solution, including:

1. Initialization: Tests that the solution is initialized correctly with the given analysis and solver.
2. State accessors: Tests that the state accessors (e.g., `displacements`, `internal_forces`, etc.) return the correct values for each load step.
3. DOF-level accessors: Tests that the DOF-level accessors (e.g., `displacements(dof)`, `internal_forces(dof)`, etc.) return the correct values for each load step.
4. Iteration residual calculation: Tests that the iteration residual is calculated correctly.

The tests are written in a test-driven development style, where each test is designed to fail until it is fixed. The tests cover various edge cases and scenarios to ensure that the solution class behaves as expected.

Some potential improvements to the code could include:

1. Adding more tests: While the current set of tests covers many aspects of the solution, there may be additional tests that can be added to further ensure the correctness of the solution.
2. Improving test organization: The tests are currently organized in a somewhat linear fashion, with each test building on the previous one. Consider reorganizing the tests into separate sections or modules to improve readability and maintainability.
3. Using more descriptive variable names: Some of the variable names used in the tests (e.g., `dof`, `vdof`, `n₁`) could be more descriptive to improve clarity and understanding of the code.

Overall, the code appears to be well-organized and easy to follow, with a clear structure and concise test cases.
@mvanzulli mvanzulli self-assigned this Apr 17, 2026
@mvanzulli mvanzulli marked this pull request as ready for review April 17, 2026 02:13
@mvanzulli mvanzulli merged commit 0adcc12 into main Apr 18, 2026
4 checks passed
@mvanzulli mvanzulli deleted the mvanzulli/526-initial-state branch April 18, 2026 16:26
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.

Add initial state to Solution

1 participant