mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 20:24:48 -06:00
[bugfix] Prevent indexing an array of zero size for matrices with zero rows.
This commit is contained in:
parent
ffda4f96d5
commit
28e566ba02
@ -85,6 +85,13 @@ namespace Opm
|
||||
template<class M, class CRS, class InvVector>
|
||||
void convertToCRS(const M& A, CRS& lower, CRS& upper, InvVector& inv )
|
||||
{
|
||||
// No need to do anything for 0 rows. Return to prevent indexing a
|
||||
// a zero sized array.
|
||||
if ( A.N() == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
typedef typename M :: size_type size_type;
|
||||
|
||||
lower.resize( A.N() );
|
||||
|
Loading…
Reference in New Issue
Block a user