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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user