diff --git a/include/astaroth.h b/include/astaroth.h index 1322fd5..e6114c7 100644 --- a/include/astaroth.h +++ b/include/astaroth.h @@ -341,6 +341,12 @@ AcResult acIntegrate(const AcReal& dt); /** Performs a single RK3 step without computing boundary conditions. */ AcResult acIntegrateStep(const int& isubstep, const AcReal& dt); +/** Performs a single RK3 step without computing boundary conditions. + Operates on a three-dimensional cuboid, where start and end are the + opposite corners. */ +AcResult acIntegrateStepWithOffset(const int& isubstep, const AcReal& dt, const int3& start, + const int3& end); + /** Applies boundary conditions on the GPU meshs and communicates the ghost zones among GPUs if necessary */ AcResult acBoundcondStep(void); diff --git a/src/core/astaroth.cu b/src/core/astaroth.cu index 53b1f73..956a24f 100644 --- a/src/core/astaroth.cu +++ b/src/core/astaroth.cu @@ -269,6 +269,20 @@ acIntegrateStep(const int& isubstep, const AcReal& dt) return AC_SUCCESS; } +AcResult +acIntegrateStepWithOffset(const int& isubstep, const AcReal& dt, const int3& start, const int3& end) +{ + /* + // A skeleton function for computing integrations with arbitrary subblocks + // Uncommenting the following should work with a single GPU. + const int3 start = (int3){STENCIL_ORDER / 2, STENCIL_ORDER / 2, STENCIL_ORDER / 2}; + const int3 end = (int3){STENCIL_ORDER / 2 + subgrid.n.x, STENCIL_ORDER / 2 + subgrid.n.y, + STENCIL_ORDER / 2 + subgrid.n.z}; + rkStep(devices[0], STREAM_PRIMARY, isubstep, start, end, dt); + */ + return AC_FAILURE; +} + AcResult acBoundcondStep(void) {