Research Article

Parallel Algorithms of Well-Balanced and Weighted Average Flux for Shallow Water Model Using CUDA

Algorithm 1

Serial: cell-based calculation.
1: Initialize data
2: for to time_limit increment by
3:  for to row
4:   for to column
5:    for in
6:     Calculation flux in direction using equations (6) and (7)
7:     Calculation flux in direction using equations (6) and (7)
8:    end for
9:   Update solution by equations (8)–(13)
10:  end for
11: end for
9: end for