SWE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
solver::WavePropagation< T > Class Template Reference

#include <WavePropagation.hpp>

Inheritance diagram for solver::WavePropagation< T >:
solver::AugRie< T > solver::FWave< T >

List of all members.

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

dryTol
 numerical definition of "dry".
const T g
 gravity constant
const T zeroTol
 numerical definition of zero.
hLeft
 height on the left side of the edge (could change during execution).
hRight
 height on the right side of the edge (could change during execution).
huLeft
 momentum on the left side of the edge (could change during execution).
huRight
 momentum on the right side of the edge (could change during execution).
bLeft
 bathymetry on the left side of the edge (could change during execution).
bRight
 bathymetry on the right side of the edge (could change during execution).
uLeft
 velocity on the left side of the edge (computed by determineWetDryState).
uRight
 velocity on the right side of the edge (computed by determineWetDryState).
WetDryState wetDryState
 wet/dry state of our Riemann-problem (determined by determineWetDryState)

Detailed Description

template<typename T>
class solver::WavePropagation< T >

Abstract wave propagation solver for the Shallow Water Equations.

T should be double or float.


Member Enumeration Documentation

template<typename T>
enum solver::WavePropagation::WetDryState [protected]

The wet/dry state of the Riemann-problem.

Enumerator:
DryDry 

Both cells are dry.

WetWet 

Both cells are wet.

WetDryInundation 

1st cell: wet, 2nd cell: dry. 1st cell lies higher than the 2nd one.

WetDryWall 

1st cell: wet, 2nd cell: dry. 1st cell lies lower than the 2nd one. Momentum is not large enough to overcome the difference.

WetDryWallInundation 

1st cell: wet, 2nd cell: dry. 1st cell lies lower than the 2nd one. Momentum is large enough to overcome the difference.

DryWetInundation 

1st cell: dry, 2nd cell: wet. 1st cell lies lower than the 2nd one.

DryWetWall 

1st cell: dry, 2nd cell: wet. 1st cell lies higher than the 2nd one. Momentum is not large enough to overcome the difference.

DryWetWallInundation 

1st cell: dry, 2nd cell: wet. 1st cell lies higher than the 2nd one. Momentum is large enough to overcome the difference.


Constructor & Destructor Documentation

template<typename T>
solver::WavePropagation< T >::WavePropagation ( i_dryTolerance,
i_gravity,
i_zeroTolerance 
) [inline, protected]

Constructor of a wave propagation solver.

Parameters:
gravitygravity constant.
dryTolerancenumerical definition of "dry".
zeroTolerancenumerical definition of zero.

Member Function Documentation

template<typename T>
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.

Parameters:
i_hLeftheight on the left side of the edge.
i_hRightheight on the right side of the edge.
i_huLeftmomentum on the left side of the edge.
i_huRightmomentum on the right side of the edge.
i_bLeftbathymetry on the left side of the edge.
i_bRightbathymetry on the right side of the edge.
o_hUpdateLeftwill be set to: Net-update for the height of the cell on the left side of the edge.
o_hUpdateRightwill be set to: Net-update for the height of the cell on the right side of the edge.
o_huUpdateLeftwill be set to: Net-update for the momentum of the cell on the left side of the edge.
o_huUpdateRightwill be set to: Net-update for the momentum of the cell on the right side of the edge.
o_maxWaveSpeedwill 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 >.

template<typename T>
void solver::WavePropagation< T >::setDryTolerance ( const T  i_dryTolerance) [inline]

Sets the dry tolerance of the solver.

Parameters:
i_dryTolerancedry tolerance.
template<typename T>
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.

Parameters:
i_hLeftheight on the left side of the edge.
i_hRightheight on the right side of the edge.
i_huLeftmomentum on the left side of the edge.
i_huRightmomentum on the right side of the edge.
i_bLeftbathymetry on the left side of the edge.
i_bRightbathymetry on the right side of the edge.
template<typename T>
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.

Parameters:
i_hLeftheight on the left side of the edge.
i_hRightheight on the right side of the edge.
i_huLeftmomentum on the left side of the edge.
i_huRightmomentum on the right side of the edge.
i_bLeftbathymetry on the left side of the edge.
i_bRightbathymetry on the right side of the edge.
i_uLeftvelocity on the left side of the edge.
i_uRightvelocity on the right side of the edge.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends