Skip to content

[TrilinosApplication] Initial refactoring TrilinosBlockBuilderAndSolver using Trilinos Space instead of Epetra hardcode#14373

Open
loumalouomega wants to merge 34 commits intoKratosMultiphysics:masterfrom
loumalouomega:trilinos/use-space-refactoring
Open

[TrilinosApplication] Initial refactoring TrilinosBlockBuilderAndSolver using Trilinos Space instead of Epetra hardcode#14373
loumalouomega wants to merge 34 commits intoKratosMultiphysics:masterfrom
loumalouomega:trilinos/use-space-refactoring

Conversation

@loumalouomega
Copy link
Copy Markdown
Member


name: ✨ Feature
about: Initial refactoring using Trilinos Space instead of Epetra hardcode


📝 Description

This PR contains the follow-up refactor on top of trilinos/improvement-trilinos-space to further decouple the Trilinos builder/solver utilities from direct Epetra assumptions and move more of the matrix/vector structure handling into TSparseSpace.

Depends on #14371

Key changes

  • Refactored TrilinosBlockBuilderAndSolver to rely on TSparseSpace helpers when building the system and constraint structures.
  • Extended TrilinosSpace::BuildSystemStructure() with a row/column block connectivity overload so rectangular sparsity patterns can be constructed explicitly.
  • Updated the system matrix structure construction in TrilinosBlockBuilderAndSolver to preserve the original master/slave sparsity pattern while still delegating graph creation to TSparseSpace.
  • Kept the constraint structure creation refactor based on TSparseSpace::BuildConstraintsStructure().
  • Continued the templated-space cleanup in trilinos_assembling_utilities.h and aligned the affected tests.
  • Added/updated MPI C++ tests to cover both the square and row/column variants of BuildSystemStructure().

Validation

  • Ran the full MPI Trilinos C++ suite:
    • KratosTrilinosCoreTest
  • Result: all executed tests passed (89/89 in the full MPI Trilinos suite).

🆕 Changelog

  • Changes from [TrilinosApplication] Improve TrilinosSpace, its python bindings and MPI test coverage #14371
  • Refactored TrilinosBlockBuilderAndSolver to build system and constraint structures through TSparseSpace utilities.
  • Added a row/column block overload to TrilinosSpace::BuildSystemStructure to preserve rectangular sparsity patterns.
  • Fixed the Trilinos block builder/solver constraint structure regression introduced during the space refactor.
  • Updated Trilinos MPI C++ tests to cover the new BuildSystemStructure overload and preserve regression coverage.

… space types and update related tests for consistency
…AndSolver for improved consistency and clarity
…eateVectorCopy for safety with FEMultiVector
…dling and ensure proper matrix initialization
… use LinearAlgebraLibrary check for improved compatibility
…ver to handle unsupported linear algebra libraries with an error message
@loumalouomega loumalouomega requested a review from roigcarlo April 14, 2026 22:27
@loumalouomega loumalouomega requested review from a team as code owners April 14, 2026 22:27
@loumalouomega loumalouomega added Cleanup Applications External library Parallel-MPI Distributed memory parallelism for HPC / clusters Transition Refactor When code is moved or rewrote keeping the same behavior labels Apr 14, 2026
@loumalouomega loumalouomega enabled auto-merge April 14, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Applications Cleanup External library Parallel-MPI Distributed memory parallelism for HPC / clusters Refactor When code is moved or rewrote keeping the same behavior Transition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant