SWE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions
solver::Hybrid< T > Class Template Reference

#include <Hybrid.hpp>

List of all members.

Public Member Functions

 Hybrid (T i_dryTolerance=(T) 0.01, T i_gravity=(T) 9.81, T i_newtonTolerance=(T) 0.000001, int i_maxNumberOfNewtonIterations=10, T zeroTolerance=(T) 0.000000001)
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)
bool useAugmentedRiemannSolver (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)
void printStats ()
void getStats (long &o_counterFWave, long &o_counterAugRie)

Detailed Description

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

Hybrid Wave Propagation Solver. Combines the "simple" f-Wave approach with the more complex Augmented Riemann Solver.

T should be double or float.


Constructor & Destructor Documentation

template<typename T>
solver::Hybrid< T >::Hybrid ( i_dryTolerance = (T) 0.01,
i_gravity = (T) 9.81,
i_newtonTolerance = (T) 0.000001,
int  i_maxNumberOfNewtonIterations = 10,
zeroTolerance = (T) 0.000000001 
) [inline]

Constructor of the hybrid solver with optional parameters.

Parameters:
i_dryTolerancenumerical definition of "dry".
i_gravitygravity constant.
i_newtonTolerancenumerical definition of "convergence" (used in the AugRie solver only).
i_maxNumberOfNewtonIterationsmaximum steps for the Newton-Raphson method (used in the AugRie solver only).
i_zeroTolerancenumerical definition of zero.

Member Function Documentation

template<typename T>
void solver::Hybrid< 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 
) [inline]

Compute net updates for the cell on the left/right side of the edge. The "correct" solver is used automatically.

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.
template<typename T>
void solver::Hybrid< T >::getStats ( long &  o_counterFWave,
long &  o_counterAugRie 
) [inline]

Get the current statistics of the hybrid solver.

Parameters:
o_counterFWavewill be set to: times the f-Wave solver was used.
o_counterAugRiewill be set to: times the Augmented Riemann solver was used.
template<typename T>
void solver::Hybrid< T >::printStats ( ) [inline]

Prints the current statistics of the hybrid solver.

template<typename T>
bool solver::Hybrid< T >::useAugmentedRiemannSolver ( 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 
) [inline]

Should the Augmented Riemann Solver be used? Side effect: If its sufficient to use the f-Wave solver the net-updates will be computed already (hybrid f-Wave version).

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.
Returns:
A boolean whether the Augmented Riemann Solver should be used or not.

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