From 2eacb9824656b3ff8888b294caf347b77576c00d Mon Sep 17 00:00:00 2001 From: jpekkila Date: Wed, 19 Jun 2019 14:29:07 +0300 Subject: [PATCH] Now acBoundcondStep is applied after acIntegrate to ensure that the whole grid visible to the host, including boundaries, are always up to date --- src/core/astaroth.cu | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/astaroth.cu b/src/core/astaroth.cu index 4692df3..53b1f73 100644 --- a/src/core/astaroth.cu +++ b/src/core/astaroth.cu @@ -238,6 +238,7 @@ acStoreWithOffset(const int3& src, const int num_vertices, AcMesh* host_mesh) } printf("\n"); } + acBoundcondStep(); // TODO note: this is not the most efficient way to do things return AC_SUCCESS; } @@ -412,9 +413,9 @@ AcResult acIntegrate(const AcReal& dt) { for (int isubstep = 0; isubstep < 3; ++isubstep) { - acBoundcondStep(); - acIntegrateStep(isubstep, dt); + acIntegrateStep(isubstep, dt); // Note: boundaries must be initialized. acSwapBuffers(); + acBoundcondStep(); } return AC_SUCCESS; }