Implemented variable timestep

This commit is contained in:
André R. Brodtkorb
2018-11-15 16:48:47 +01:00
parent 7592ad5b9f
commit ddac53271c
15 changed files with 224 additions and 29 deletions

View File

@@ -151,8 +151,10 @@ __global__ void KP07Kernel(
//Output h^{n+1}
float* h1_ptr_, int h1_pitch_,
float* hu1_ptr_, int hu1_pitch_,
float* hv1_ptr_, int hv1_pitch_) {
float* hv1_ptr_, int hv1_pitch_,
//Output CFL
float* cfl_) {
const unsigned int w = BLOCK_WIDTH;
const unsigned int h = BLOCK_HEIGHT;
const unsigned int gc_x = 2;
@@ -222,5 +224,10 @@ __global__ void KP07Kernel(
hv_row[ti] = hv1;
}
}
//Compute the CFL for this block
if (cfl_ != NULL) {
writeCfl<w, h, gc_x, gc_y, vars>(Q, Q[0], nx_, ny_, dx_, dy_, g_, cfl_);
}
}
} //extern "C"