Skip to content

Commit 6c1d5e5

Browse files
committed
Refactor reaction vector initialization in TrilinosBlockBuilderAndSolver to handle unsupported linear algebra libraries with an error message
1 parent 1d103cc commit 6c1d5e5

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

applications/TrilinosApplication/custom_strategies/builder_and_solvers/trilinos_block_builder_and_solver.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -767,12 +767,11 @@ class TrilinosBlockBuilderAndSolver
767767
TSystemVectorPointerType pNewReactionsVector = TSparseSpace::CreateEmptyVectorPointer();
768768
if constexpr (TSparseSpace::LinearAlgebraLibrary() == TrilinosLinearAlgebraLibrary::EPETRA) {
769769
pNewReactionsVector = TSystemVectorPointerType(new TSystemVectorType(rpDx->Map()));
770-
} else {
771-
pNewReactionsVector = TSparseSpace::CreateVector(rpDx->getMap());
770+
} else {
771+
KRATOS_ERROR << "ResizeAndInitializeVectors not implemented for this linear algebra library" << std::endl;
772772
}
773773
BaseType::mpReactionsVector.swap(pNewReactionsVector);
774-
}
775-
else {
774+
} else {
776775
if (TSparseSpace::Size1(*rpA) == 0 ||
777776
TSparseSpace::Size1(*rpA) != BaseType::mEquationSystemSize ||
778777
TSparseSpace::Size2(*rpA) != BaseType::mEquationSystemSize) {

0 commit comments

Comments
 (0)