Skip to content

[Core] Hotfix for geometries_tensor_adaptor#14182

Open
RiccardoRossi wants to merge 1 commit intomasterfrom
RiccardoRossi-patch-2
Open

[Core] Hotfix for geometries_tensor_adaptor#14182
RiccardoRossi wants to merge 1 commit intomasterfrom
RiccardoRossi-patch-2

Conversation

@RiccardoRossi
Copy link
Member

@RiccardoRossi RiccardoRossi commented Feb 5, 2026

📝 Description

The manual calculation of Cartesian shape function derivatives (computing local gradients, calculating the Jacobian, inverting it, and performing matrix multiplication) has been replaced by a direct call to the geometry's gradient method. This removes significant boilerplate and leverages the internal optimizations of the Geometry class.

Key Changes

  • Removed Manual Jacobian Inversion: Eliminated the manual loop that calculated , , and the subsequent product .
  • Direct Gradient Retrieval: Updated CollectShapeFunctionsDerivatives to fetch the required gradients (presumably Cartesian, depending on the Method passed) directly into the DN_Dx container.
  • Code Cleanup: Reduced the nesting level and complexity of the Gauss-point loop, making the data mapping to pData more direct and readable.

Impact

  • Readability: Significant reduction in lines of code within the core integration loop.
  • Performance: Potential minor speedup by avoiding redundant manual matrix operations and utilizing optimized geometry methods.
  • Maintainability: Reduces the surface area for bugs related to manual linear algebra implementations.

🆕 Changelog

@RiccardoRossi RiccardoRossi requested a review from a team as a code owner February 5, 2026 15:52
Copy link
Member

@loumalouomega loumalouomega left a comment

Choose a reason for hiding this comment

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

LGTM

@loumalouomega
Copy link
Member

📝 Description fixes an error

It could be more specific...

@loumalouomega loumalouomega changed the title hotfix for geometries_tensor_adaptor [Core] Hotfix for geometries_tensor_adaptor Feb 5, 2026
@loumalouomega loumalouomega added Kratos Core FastPR This Pr is simple and / or has been already tested and the revision should be fast Bugfix Hotfix labels Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix FastPR This Pr is simple and / or has been already tested and the revision should be fast Hotfix Kratos Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants