Now acBoundcondStep is applied after acIntegrate to ensure that the whole grid visible to the host, including boundaries, are always up to date

This commit is contained in:
jpekkila
2019-06-19 14:29:07 +03:00
parent b5753f0bec
commit 2eacb98246

View File

@@ -238,6 +238,7 @@ acStoreWithOffset(const int3& src, const int num_vertices, AcMesh* host_mesh)
} }
printf("\n"); printf("\n");
} }
acBoundcondStep(); // TODO note: this is not the most efficient way to do things
return AC_SUCCESS; return AC_SUCCESS;
} }
@@ -412,9 +413,9 @@ AcResult
acIntegrate(const AcReal& dt) acIntegrate(const AcReal& dt)
{ {
for (int isubstep = 0; isubstep < 3; ++isubstep) { for (int isubstep = 0; isubstep < 3; ++isubstep) {
acBoundcondStep(); acIntegrateStep(isubstep, dt); // Note: boundaries must be initialized.
acIntegrateStep(isubstep, dt);
acSwapBuffers(); acSwapBuffers();
acBoundcondStep();
} }
return AC_SUCCESS; return AC_SUCCESS;
} }