Implement symmetric positive definite tensor interpolation with weights#1588
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements symmetric positive definite (SPD) tensor interpolation using normalized weights for interpolating pure stretch tensor input fields. The implementation uses the R-LOG method (rotation-logarithmic eigenvalue interpolation) and refactors existing tensor interpolation algorithms to use the new Tensor classes instead of Matrix classes.
Key Changes:
- Adds
interpolate_spd()function for SPD tensor interpolation using R-LOG method - Refactors rotation vector/matrix conversion functions to use
Tensorinstead ofMatrix - Introduces
SymmetricPositiveDefiniteInterpolationtemplate for use with interpolated input fields - Adds comprehensive unit tests for the new interpolation functionality
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
tests/list_of_tests.cmake |
Adds new test case for constant prestretch field |
tests/input_files/mixture_prestress_constant_field.4C.yaml |
New test configuration for prestretch field interpolation |
src/mixture/src/4C_mixture_prestress_strategy_prescribed.hpp |
Updates template parameters to use SPD interpolation |
src/mixture/src/4C_mixture_prestress_strategy_prescribed.cpp |
Updates template instantiation for SPD interpolation |
src/global_legacy_module/4C_global_legacy_module_validmaterials.cpp |
Updates material input specification for SPD interpolation |
src/core/linalg/tests/4C_linalg_utils_tensor_interpolation_test.cpp |
Adds unit tests for diagonal and rotated SPD tensor interpolation |
src/core/linalg/src/dense/4C_linalg_utils_tensor_interpolation.hpp |
Declares new SPD interpolation functions and helper utilities |
src/core/linalg/src/dense/4C_linalg_utils_tensor_interpolation.cpp |
Refactors rotation vector/matrix conversion to use Tensor types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/core/linalg/src/dense/4C_linalg_utils_tensor_interpolation.hpp
Outdated
Show resolved
Hide resolved
src/core/linalg/src/dense/4C_linalg_utils_tensor_interpolation.hpp
Outdated
Show resolved
Hide resolved
src/core/linalg/src/dense/4C_linalg_utils_tensor_interpolation.hpp
Outdated
Show resolved
Hide resolved
src/core/linalg/tests/4C_linalg_utils_tensor_interpolation_test.cpp
Outdated
Show resolved
Hide resolved
fbf3ac6 to
5768fac
Compare
There was a problem hiding this comment.
Looks good, thanks for adding this!
I added some comments --- the main one addresses eigenvector alignment for multiple eigenvalues. I would wait for the rework from @abhi-satheesh before properly addressing it, but we should be aware that the underlying problem exists (at least it existed at the time when I first implemented the interpolation framework).
src/core/linalg/src/dense/4C_linalg_utils_tensor_interpolation.hpp
Outdated
Show resolved
Hide resolved
src/core/linalg/src/dense/4C_linalg_utils_tensor_interpolation.hpp
Outdated
Show resolved
Hide resolved
src/core/linalg/src/dense/4C_linalg_utils_tensor_interpolation.hpp
Outdated
Show resolved
Hide resolved
5768fac to
a4287d7
Compare
a4287d7 to
d390d72
Compare
This PR implements a tensor interpolation of symmetric positive definite tensors. The interpolation is (in contrast to existing one from @dragos-ana) purely based on normalized weights.
I also rewrote some parts of the tensor interpolation algorithms based on Tensors (instead of Matrix).
I use it to interpolate a pure stretch tensor input field.