Skip to content

Tpetra: Add BlockVector ctor that takes a Vector argument

James Willenbring requested to merge wfspotz:tpetra_block into develop

Created by: wfspotz



Added a BlockVector constructor with the following prototype:

BlockVector (const vec_type& X_vec,
             const map_type& meshMap,
             const LO blockSize);

and a corresponding test. Note that the test does not yet work: pointers that I expected to be equivalent are not.

Motivation and Context

In SPARC, for the NonlinearSolverNox class to support the LINSYS_TPETRA_BLOCK_CRS linear system type, I need a Thyra::createVector() factory function that works for a Tpetra::BlockVector. This is a stepping stone to that end.

Related Issues

How Has This Been Tested?

The BlockMultiVector ctor test in tpetra/core/test/Block/BlockMultiVector.cpp was extended to test the new BlockVector constructor. Note that it currently fails and this issue should be worked out before the pull request is accepted.


  • My commit messages mention the appropriate GitHub issue numbers.
  • My code follows the code style of the affected package(s).
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the code contribution guidelines for this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • No new compiler warnings were introduced.
  • These changes break backwards compatibility.

Merge request reports