Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sumToLine for multiple components #4266

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Src/Base/AMReX_MultiFabUtil.H
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ namespace amrex
* Return a HostVector that contains the sum of the given MultiFab data in the plane
* with the given normal direction. The size of the vector is
* domain.length(direction) x ncomp. The vector is actually a 2D array, where the
* element for component icomp at spatial index k is at [icomp*ncomp+k].
* element for component icomp at spatial index k is at [icomp+ncomp*k].
*
* \param mf MultiFab data for summing
* \param icomp starting component
Expand Down
2 changes: 1 addition & 1 deletion Src/Base/AMReX_MultiFabUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ namespace amrex
#ifdef AMREX_USE_GPU
if (Gpu::inLaunchRegion())
{
Gpu::DeviceVector<Real> dv(domain.length(direction), Real(0.0));
Gpu::DeviceVector<Real> dv(hv.size(), Real(0.0));
Real* p = dv.data();

for (MFIter mfi(mf); mfi.isValid(); ++mfi) {
Expand Down
Loading