Skip to content

Commit 6dfd2aa

Browse files
committed
Fix StructuredInterpolation2D using matrix to partitions without points
1 parent 3da7289 commit 6dfd2aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/atlas/interpolation/method/structured/StructuredInterpolation2D.tcc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,10 @@ void StructuredInterpolation2D<Kernel>::setup( const FunctionSpace& source ) {
423423
// fill sparse matrix
424424
if( failed_points.empty() ) {
425425
idx_t inp_npts = source.size();
426-
Matrix A( out_npts_, inp_npts, triplets );
427-
setMatrix(A);
426+
if (out_npts_ > 0) {
427+
Matrix A( out_npts_, inp_npts, triplets );
428+
setMatrix(A);
429+
}
428430
}
429431
}
430432
}

0 commit comments

Comments
 (0)