Skip to content

Commit

Permalink
CarpetX: Slight performance improvement in interpolator
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Nov 4, 2024
1 parent cf16d7a commit 2708b3f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions CarpetX/src/interpolate.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -440,13 +440,14 @@ extern "C" void CarpetX_Interpolate(const CCTK_POINTER_TO_CONST cctkGH_,
patches.data(), localsx.data(), localsy.data(),
localsz.data());
} else {
// TODO: Don't copy
for (int n = 0; n < npoints; ++n) {
patches[n] = 0;
localsx[n] = globalsx[n];
localsy[n] = globalsy[n];
localsz[n] = globalsz[n];
}
for (int n = 0; n < npoints; ++n)
patches.at(n) = 0;
for (int n = 0; n < npoints; ++n)
localsx.at(n) = globalsx[n];
for (int n = 0; n < npoints; ++n)
localsy.at(n) = globalsy[n];
for (int n = 0; n < npoints; ++n)
localsz.at(n) = globalsz[n];
}

// Apply symmetries to coordinates
Expand Down

0 comments on commit 2708b3f

Please sign in to comment.