Commit d4c3b1b3 authored by Alexander Breuer's avatar Alexander Breuer

Added an optional time step computation for teaching purposes.

parent df26b0be
......@@ -78,9 +78,9 @@ class SWE_WavePropagationBlockCuda: public SWE_BlockCUDA {
float simulate(float, float);
// TODO: not implemented, max time step reduction is done in each call of computeNumericalFluxes(...)
void computeMaxTimestep() {
assert(false);
};
//void computeMaxTimestep() {
// assert(false);
//};
// compute the numerical fluxes (net-update formulation here).
void computeNumericalFluxes();
......
......@@ -29,6 +29,7 @@
#include <cassert>
#include <cstdlib>
#include <string>
#include <iostream>
#include "../tools/help.hh"
#include "../SWE_Block.hh"
......@@ -218,6 +219,11 @@ int main( int argc, char** argv ) {
// set values in ghost cells:
l_wavePropgationBlock.setGhostLayer();
// approximate the maximum time step
// TODO: This calculation should be replaced by the usage of the wave speeds occuring during the flux computation
// Remark: The code is executed on the CPU, therefore a "valid result" depends on the CPU-GPU-synchronization.
// l_wavePropgationBlock.computeMaxTimestep();
// compute numerical flux on each edge
l_wavePropgationBlock.computeNumericalFluxes();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment