Skip to content

Commit

Permalink
ATLAS-353 MIR-467 much nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
pmaciel committed Nov 15, 2024
1 parent 5c8310f commit 9b87bda
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,10 @@ void StructuredInterpolation2D<Kernel>::setup( const FunctionSpace& source ) {
auto inp_npts_owned = src_fs.sizeOwned();

for (auto& t : triplets) {
ATLAS_ASSERT(t.col() < inp_npts && gidx_src(t.col()) >= 1);
t = {t.row(), eckit::linalg::Size(gidx_src(t.col()) - 1), t.value()};
ATLAS_ASSERT(t.col() < inp_npts_owned);
auto& col = t.col();
ATLAS_ASSERT(col < inp_npts && gidx_src(col) >= 1);
col = gidx_src(col) - 1;
ATLAS_ASSERT(col < inp_npts_owned);
}

inp_npts = inp_npts_owned;
Expand Down

0 comments on commit 9b87bda

Please sign in to comment.