Skip to content

Commit

Permalink
Fix RegionalLinear2D interpolation with ATLAS_BITS_LOCAL=64
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Feb 13, 2025
1 parent 19cc3f6 commit 6095dfc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/atlas/interpolation/method/structured/RegionalLinear2D.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ void RegionalLinear2D::do_setup(const FunctionSpace& source,
// Source grid indices
const Field sourceFieldIndexI = sourceFs.index_i();
const Field sourceFieldIndexJ = sourceFs.index_j();
const auto sourceIndexIView = array::make_view<int, 1>(sourceFieldIndexI);
const auto sourceIndexJView = array::make_view<int, 1>(sourceFieldIndexJ);
const auto sourceIndexIView = array::make_view<idx_t, 1>(sourceFieldIndexI);
const auto sourceIndexJView = array::make_view<idx_t, 1>(sourceFieldIndexJ);
sourceSize_ = sourceFs.size();

// Destination grid size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ CASE("test_interpolation_structured2D_regional_1d") {
auto targetField = targetFs.createField<double>(Config("name", "target"));

// Accuracy test
const auto sourceIView = array::make_view<int, 1>(sourceFs.index_i());
const auto sourceJView = array::make_view<int, 1>(sourceFs.index_j());
const auto sourceIView = array::make_view<idx_t, 1>(sourceFs.index_i());
const auto sourceJView = array::make_view<idx_t, 1>(sourceFs.index_j());
auto sourceView = array::make_view<double, 1>(sourceField);
const auto sourceGhostView = atlas::array::make_view<int, 1>(sourceFs.ghost());
sourceView.assign(0.0);
Expand All @@ -120,8 +120,8 @@ CASE("test_interpolation_structured2D_regional_1d") {

interpolation.execute(sourceField, targetField);

const auto targetIView = array::make_view<int, 1>(targetFs.index_i());
const auto targetJView = array::make_view<int, 1>(targetFs.index_j());
const auto targetIView = array::make_view<idx_t, 1>(targetFs.index_i());
const auto targetJView = array::make_view<idx_t, 1>(targetFs.index_j());
const auto targetView = array::make_view<double, 1>(targetField);
const auto targetGhostView = atlas::array::make_view<int, 1>(targetFs.ghost());
const double tolerance = 1.e-12;
Expand Down Expand Up @@ -163,8 +163,8 @@ CASE("test_interpolation_structured2D_regional_2d") {
auto targetField = targetFs.createField<double>(Config("name", "target"));

// Accuracy test
const auto sourceIView = array::make_view<int, 1>(sourceFs.index_i());
const auto sourceJView = array::make_view<int, 1>(sourceFs.index_j());
const auto sourceIView = array::make_view<idx_t, 1>(sourceFs.index_i());
const auto sourceJView = array::make_view<idx_t, 1>(sourceFs.index_j());
auto sourceView = array::make_view<double, 2>(sourceField);
const auto sourceGhostView = atlas::array::make_view<int, 1>(sourceFs.ghost());
sourceView.assign(0.0);
Expand All @@ -179,8 +179,8 @@ CASE("test_interpolation_structured2D_regional_2d") {

interpolation.execute(sourceField, targetField);

const auto targetIView = array::make_view<int, 1>(targetFs.index_i());
const auto targetJView = array::make_view<int, 1>(targetFs.index_j());
const auto targetIView = array::make_view<idx_t, 1>(targetFs.index_i());
const auto targetJView = array::make_view<idx_t, 1>(targetFs.index_j());
const auto targetView = array::make_view<double, 2>(targetField);
const auto targetGhostView = atlas::array::make_view<int, 1>(targetFs.ghost());
const double tolerance = 1.e-12;
Expand Down

0 comments on commit 6095dfc

Please sign in to comment.