Skip to content

[LinAlg] Refactor sparse operator, matrix and block-matrix wrapper #863

@maxfirmbach

Description

@maxfirmbach

Description

Currently our LinAlg::SparseOperator inherits from Epetra_Operator, which brings a few difficulties with it. I would propose to remove this inheritance and provide just an abstract LinAlg::SparseOperator interface with necessary methods we need. The actual implementations, namely LinAlg::SparseMatrix and LinAlg::BlockSparseMatrix should internally hold the respective Epetra related object (similar to our other wrappers).

Possible Solution and Definition of Done

Refactor LinAlg::SparseMatrix wrapper

  • Think about how the wrapper could hold an Epetra_CrsMatrix as private member.
  • Remove as many Epetra_CrsMatrix occurences in the code and replace by Core::LinAlg::SparseMatrix
  • One more instance of get_epetra_export call remains: need our own Import implementation for Epetra_CrsMatrix. (see [Epetra] Cleanup some related calls #1107)
  • Add a conversion utility function, which returns a Thyra::LinearOp wrapping the Epetra_CrsMatrix
  • Turn on StaticProfile to true (see [LinAlg] Static sparsity layout for sparse matrices #1544)

Refactor LinAlg::BlockSparseMatrix implementation (see #1525)

  • Remove the method Core::LinAlg::block_matrix2x2(), which is only used once in xfluid
  • Remove the method Core::LinAlg::BlockSparseMatrixBase::get_partial_extractor(), which is not used
  • Add a conversion utility function, which fills a Thyra::PhysicallyBlockedLinearOp and returns a Thyra::LinearOp

Interested Parties

@sebproell @knarfnitram @dharinib98

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: in progressIssues that are currently being worked ontaskforce: tpetraIssues related to the migration from Epetra to Tpetratype: enhancementA new feature or enhancement to be implemented

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions