From 16a222fcc4f4d8c489bd5bdeef6c1bfd562beb14 Mon Sep 17 00:00:00 2001 From: Lynn Dang <52342620+dangglxxx@users.noreply.github.com> Date: Sat, 2 Mar 2024 10:16:34 +0800 Subject: [PATCH] Update YEqn.H --- applications/solvers/dfLowMachFoam/YEqn.H | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/applications/solvers/dfLowMachFoam/YEqn.H b/applications/solvers/dfLowMachFoam/YEqn.H index 01dd085b..7e16f4ec 100644 --- a/applications/solvers/dfLowMachFoam/YEqn.H +++ b/applications/solvers/dfLowMachFoam/YEqn.H @@ -287,9 +287,6 @@ if(flag_mpi_init) MPI_Barrier(PstreamGlobals::MPI_COMM_FOAM); #ifdef ODE_GPU_SOLVER scalar dt = runTime.deltaTValue(); - memcpy(h_T, &T[0], num_cells * sizeof(double)); - memcpy(h_p, &p[0], num_cells * sizeof(double)); - forAll(Y, speciesI) { volScalarField& Yi = Y[speciesI]; memcpy(h_y + speciesI * num_cells, &Yi[0], num_cells * sizeof(double)); @@ -301,7 +298,7 @@ if(flag_mpi_init) MPI_Barrier(PstreamGlobals::MPI_COMM_FOAM); } } - opencc_ode_all(h_T, h_p, h_y_t, 1e-10, dt, CPU); + opencc_ode_all(&T[0], &p[0], h_y_t, 1e-10, dt, CPU); for (int i = 0; i < num_cells; i++) { for (int j = 0; j < sp_num; j++) {