Skip to content

Commit

Permalink
EAMxx: fix the previous fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bartgol committed Jun 10, 2024
1 parent da58272 commit 8a01595
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ get_my_triplets (const std::string& map_file) const
scorpio::read_var(map_file,"row",rows.data());
scorpio::read_var(map_file,"S" ,S.data());

// Previously, we added 1 to their length, to avoid nullptr in scorpio::read.
// However, we later do range loops on these vectors, so resize them back to nlweights
cols.resize(nlweights);
rows.resize(nlweights);
S.resize(nlweights);

scorpio::release_file(map_file);

// 1.2 Dofs in grid are likely 0-based, while row/col ids in map file
Expand Down

0 comments on commit 8a01595

Please sign in to comment.