Skip to content

Commit

Permalink
Update YEqn.H
Browse files Browse the repository at this point in the history
  • Loading branch information
dangglxxx authored Mar 2, 2024
1 parent bec8fe4 commit 16a222f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions applications/solvers/dfLowMachFoam/YEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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++) {
Expand Down

0 comments on commit 16a222f

Please sign in to comment.