Skip to content

Implement symmetric positive definite tensor interpolation with weights#1588

Open
amgebauer wants to merge 2 commits into4C-multiphysics:mainfrom
amgebauer:implement-symmetric-positive-definite-interpolation
Open

Implement symmetric positive definite tensor interpolation with weights#1588
amgebauer wants to merge 2 commits into4C-multiphysics:mainfrom
amgebauer:implement-symmetric-positive-definite-interpolation

Conversation

@amgebauer
Copy link
Member

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Tensor instead of Matrix
  • Introduces SymmetricPositiveDefiniteInterpolation template 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.

@amgebauer amgebauer force-pushed the implement-symmetric-positive-definite-interpolation branch 3 times, most recently from fbf3ac6 to 5768fac Compare December 10, 2025 10:27
tuchpaul
tuchpaul previously approved these changes Dec 10, 2025
dragos-ana
dragos-ana previously approved these changes Dec 10, 2025
Copy link
Contributor

@dragos-ana dragos-ana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@amgebauer amgebauer dismissed stale reviews from dragos-ana and tuchpaul via a4287d7 December 10, 2025 14:53
@amgebauer amgebauer force-pushed the implement-symmetric-positive-definite-interpolation branch from 5768fac to a4287d7 Compare December 10, 2025 14:53
@amgebauer amgebauer force-pushed the implement-symmetric-positive-definite-interpolation branch from a4287d7 to d390d72 Compare December 10, 2025 14:56
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.

3 participants