Refactor tensor derivatives and solver infrastructure; update python/pyzag bindings, tests, and docs#316
Refactor tensor derivatives and solver infrastructure; update python/pyzag bindings, tests, and docs#316hugary1995 merged 36 commits intomainfrom
Conversation
b09c1a1 to
338b9d2
Compare
There was a problem hiding this comment.
Pull request overview
This pull request performs a major refactor of tensor derivative handling and equation-system infrastructure, introducing new abstractions for linear solvers and updating the solver framework. The refactor replaces model-level assembler/derivative plumbing with new tensor derivative and equation-system types (ESData/Matrix/Vector), and introduces a linear solver abstraction with a DenseLU implementation.
Changes:
- Replaced assembly-based derivative handling with new tensor derivative infrastructure using intrinsic intermediate dimensions
- Introduced
es::Vectorandes::Matrixclasses for equation system data structures - Added
LinearSolverbase class andDenseLUimplementation for solving linear systems - Updated all test configuration files to specify the new
linear_solverparameter - Removed trust-region solver and related infrastructure
Reviewed changes
Copilot reviewed 211 out of 212 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Multiple .i test files |
Added linear_solver = 'lu' configuration and DenseLU solver blocks |
tests/unit/solvers/test_NonlinearSolvers.cxx |
Refactored to use new es::Vector API and factory-based solver loading |
tests/src/SampleNonlinearSystems.cxx |
Updated to use es::Vector and es::Matrix instead of flat tensors |
tests/src/ModelUnitTest.cxx |
Updated derivative collection to use new assembly format |
src/neml2/tensors/Derivative.cxx |
New derivative class with intrinsic intermediate dimension support |
src/neml2/tensors/equation_system/*.cxx |
New equation system data structures (ESData, Vector, Matrix) |
src/neml2/solvers/*.cxx |
Updated solvers to use new linear solver abstraction and es::Vector |
src/neml2/models/*.cxx |
Updated models to use new derivative and assembly infrastructure |
Comments suppressed due to low confidence (3)
tests/regression/solid_mechanics/crystal_plasticity/taylor/model.i:1
- The entire taylor/model.i file has been deleted (194 lines removed) along with its gold reference file. This appears to be an unintentional deletion of a regression test. Either the file should be restored or there should be documentation explaining why this test is no longer needed.
tests/unit/models/test_Assembler.cxx:1 - The entire test_Assembler.cxx file (191 lines) has been deleted. Since the Assembler infrastructure is being replaced, these tests should be replaced with equivalent tests for the new es::Vector and es::Matrix classes rather than completely removed.
src/neml2/solvers/TrustRegionSubProblem.cxx:1 - The TrustRegionSubProblem class (82 lines) has been completely removed. If this solver capability is no longer supported, there should be migration documentation or the functionality should be preserved in the new infrastructure.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Documentation preview removed. |
ba801aa to
b067f03
Compare
- update pyzag bindings, tests, and docs - keep information on intrinsic intermediate dimension within derivative - remove from_assembly, to_assembly - factor out nonlinear system
f33a481 to
796b25e
Compare
reverendbedford
left a comment
There was a problem hiding this comment.
Main complaint:
The linear system stuff is a confusing. More docs will help somewhat (need to mention the names g = "givens", b = "RHS", "u" = unknowns. I guess the last one is obvious.
Now that I read the source files I get what's happening, but isn't including givens in the linear system a bit of a mixed metaphor? I guess we can discuss tomorrow because right now I can't think of a better way to structure things.
Random other questions:
- Why did the trust region solver have to go? We don't need it, just curious.
- Why are reductions on intermediate dimension now always -1?
* Merged runner preset into release; remove python bindings from the release preset * Extended listing.py to account for unmerged sections * Addressed some comments on LinearSystem NonlinearSystem abstraction * Moved away from HVector HMatrix * Added SparseTensorList * Fix matrix assembly; add link anchor * Take care of intmd dimensions in assembly
… in builds other than Debug
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 298 out of 303 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary: Major refactor of tensor derivative handling and equation‑system infrastructure, with solver/linear‑solver cleanups and broad updates across models, Python bindings, docs, and tests.
Changes:
close #116 #117