Skip to content

Commit

Permalink
Made sure cubed-sphere interpolation method always sets metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
odlomax committed Jun 7, 2024
1 parent 92d1a07 commit 0e1cdf6
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ void CubedSphereBilinear::do_setup(const FunctionSpace& source, const FunctionSp
ATLAS_ASSERT(ncSource);
ATLAS_ASSERT(target_);

// Add tile index metadata to target.
target_->metadata().set("tile index", std::vector<idx_t>{});

// Enable or disable halo exchange.
this->allow_halo_exchange_ = halo_exchange_;


// return early if no output points on this partition reserve is called on
// the triplets but also during the sparseMatrix constructor. This won't
// work for empty matrices
Expand All @@ -46,9 +53,6 @@ void CubedSphereBilinear::do_setup(const FunctionSpace& source, const FunctionSp
const auto N = CubedSphereGrid(ncSource.mesh().grid()).N();
const auto tolerance = 2. * std::numeric_limits<double>::epsilon() * N;

// Enable or disable halo exchange.
this->allow_halo_exchange_ = halo_exchange_;

// Loop over target at calculate interpolation weights.
auto weights = std::vector<Triplet>{};
const auto ghostView = array::make_view<int, 1>(target_.ghost());
Expand Down

0 comments on commit 0e1cdf6

Please sign in to comment.