mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Added sanity check.
This commit is contained in:
parent
a8dd329307
commit
ed2747db1c
@ -75,6 +75,9 @@ CuSparseMatrix<T>::CuSparseMatrix(const T* nonZeroElements,
|
||||
, m_matrixDescription(detail::createMatrixDescription())
|
||||
, m_cusparseHandle(detail::CuSparseHandle::getInstance())
|
||||
{
|
||||
if (detail::to_size_t(rowIndices[numberOfRows]) != numberOfNonzeroBlocks) {
|
||||
OPM_THROW(std::invalid_argument, "Wrong sparsity format. Needs to be CSR compliant. ");
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
Loading…
Reference in New Issue
Block a user