#include <WavePropagation.hpp>
Public Member Functions | |
virtual void | computeNetUpdates (const T &i_hLeft, const T &i_hRight, const T &i_huLeft, const T &i_huRight, const T &i_bLeft, const T &i_bRight, T &o_hUpdateLeft, T &o_hUpdateRight, T &o_huUpdateLeft, T &o_huUpdateRight, T &o_maxWaveSpeed)=0 |
void | setDryTolerance (const T i_dryTolerance) |
Protected Types | |
enum | WetDryState { DryDry, WetWet, WetDryInundation, WetDryWall, WetDryWallInundation, DryWetInundation, DryWetWall, DryWetWallInundation } |
Protected Member Functions | |
virtual void | determineWetDryState ()=0 |
Determine the wet/dry-state and set local values if we have to. | |
WavePropagation (T i_dryTolerance, T i_gravity, T i_zeroTolerance) | |
void | storeParameters (const T &i_hLeft, const T &i_hRight, const T &i_huLeft, const T &i_huRight, const T &i_bLeft, const T &i_bRight) |
void | storeParameters (const T &i_hLeft, const T &i_hRight, const T &i_huLeft, const T &i_huRight, const T &i_bLeft, const T &i_bRight, const T &i_uLeft, const T &i_uRight) |
Protected Attributes | |
T | dryTol |
numerical definition of "dry". | |
const T | g |
gravity constant | |
const T | zeroTol |
numerical definition of zero. | |
T | hLeft |
height on the left side of the edge (could change during execution). | |
T | hRight |
height on the right side of the edge (could change during execution). | |
T | huLeft |
momentum on the left side of the edge (could change during execution). | |
T | huRight |
momentum on the right side of the edge (could change during execution). | |
T | bLeft |
bathymetry on the left side of the edge (could change during execution). | |
T | bRight |
bathymetry on the right side of the edge (could change during execution). | |
T | uLeft |
velocity on the left side of the edge (computed by determineWetDryState). | |
T | uRight |
velocity on the right side of the edge (computed by determineWetDryState). | |
WetDryState | wetDryState |
wet/dry state of our Riemann-problem (determined by determineWetDryState) |
Abstract wave propagation solver for the Shallow Water Equations.
T should be double or float.
enum solver::WavePropagation::WetDryState [protected] |
The wet/dry state of the Riemann-problem.
solver::WavePropagation< T >::WavePropagation | ( | T | i_dryTolerance, |
T | i_gravity, | ||
T | i_zeroTolerance | ||
) | [inline, protected] |
Constructor of a wave propagation solver.
gravity | gravity constant. |
dryTolerance | numerical definition of "dry". |
zeroTolerance | numerical definition of zero. |
virtual void solver::WavePropagation< T >::computeNetUpdates | ( | const T & | i_hLeft, |
const T & | i_hRight, | ||
const T & | i_huLeft, | ||
const T & | i_huRight, | ||
const T & | i_bLeft, | ||
const T & | i_bRight, | ||
T & | o_hUpdateLeft, | ||
T & | o_hUpdateRight, | ||
T & | o_huUpdateLeft, | ||
T & | o_huUpdateRight, | ||
T & | o_maxWaveSpeed | ||
) | [pure virtual] |
Compute net updates for the cell on the left/right side of the edge. This is the default method every standalone wave propagation solver should provide.
i_hLeft | height on the left side of the edge. |
i_hRight | height on the right side of the edge. |
i_huLeft | momentum on the left side of the edge. |
i_huRight | momentum on the right side of the edge. |
i_bLeft | bathymetry on the left side of the edge. |
i_bRight | bathymetry on the right side of the edge. |
o_hUpdateLeft | will be set to: Net-update for the height of the cell on the left side of the edge. |
o_hUpdateRight | will be set to: Net-update for the height of the cell on the right side of the edge. |
o_huUpdateLeft | will be set to: Net-update for the momentum of the cell on the left side of the edge. |
o_huUpdateRight | will be set to: Net-update for the momentum of the cell on the right side of the edge. |
o_maxWaveSpeed | will be set to: Maximum (linearized) wave speed -> Should be used in the CFL-condition. |
Implemented in solver::AugRie< T >, solver::AugRie< float >, solver::FWave< T >, and solver::FWave< float >.
void solver::WavePropagation< T >::setDryTolerance | ( | const T | i_dryTolerance | ) | [inline] |
Sets the dry tolerance of the solver.
i_dryTolerance | dry tolerance. |
void solver::WavePropagation< T >::storeParameters | ( | const T & | i_hLeft, |
const T & | i_hRight, | ||
const T & | i_huLeft, | ||
const T & | i_huRight, | ||
const T & | i_bLeft, | ||
const T & | i_bRight | ||
) | [inline, protected] |
Store parameters to member variables.
i_hLeft | height on the left side of the edge. |
i_hRight | height on the right side of the edge. |
i_huLeft | momentum on the left side of the edge. |
i_huRight | momentum on the right side of the edge. |
i_bLeft | bathymetry on the left side of the edge. |
i_bRight | bathymetry on the right side of the edge. |
void solver::WavePropagation< T >::storeParameters | ( | const T & | i_hLeft, |
const T & | i_hRight, | ||
const T & | i_huLeft, | ||
const T & | i_huRight, | ||
const T & | i_bLeft, | ||
const T & | i_bRight, | ||
const T & | i_uLeft, | ||
const T & | i_uRight | ||
) | [inline, protected] |
Store parameters to member variables.
i_hLeft | height on the left side of the edge. |
i_hRight | height on the right side of the edge. |
i_huLeft | momentum on the left side of the edge. |
i_huRight | momentum on the right side of the edge. |
i_bLeft | bathymetry on the left side of the edge. |
i_bRight | bathymetry on the right side of the edge. |
i_uLeft | velocity on the left side of the edge. |
i_uRight | velocity on the right side of the edge. |