Skip to content

Commit 85f9289

Browse files
committed
Restore UseDevice for submesh vectors to fix GPU operator-vector mismatch
1 parent 91960a3 commit 85f9289

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

palace/models/surfacecurlsolver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,12 @@ void SolveSurfaceCurlProblem(const SurfaceFluxData &flux_data, const IoData &iod
308308
}
309309

310310
// Compute boundary-interior coupling before applying boundary conditions.
311-
// Keep vectors on host: the submesh solver uses host-side operations (direct indexing,
312-
// GroupCommunicator reductions) that are incompatible with device memory.
313311
Vector RHS(submesh_nd_fespaces.GetFinestFESpace().GetTrueVSize());
314312
Vector X(submesh_nd_fespaces.GetFinestFESpace().GetTrueVSize());
315313
Vector boundary_vals(submesh_nd_fespaces.GetFinestFESpace().GetTrueVSize());
314+
RHS.UseDevice(true);
315+
X.UseDevice(true);
316+
boundary_vals.UseDevice(true);
316317

317318
// Get boundary values directly from MFEM GridFunction
318319
A.GetTrueDofs(boundary_vals);

0 commit comments

Comments
 (0)