SWE
Public Member Functions
SWE_WavePropagationBlock Class Reference

#include <SWE_WavePropagationBlock.hh>

Inheritance diagram for SWE_WavePropagationBlock:
SWE_Block

List of all members.

Public Member Functions

 SWE_WavePropagationBlock (int l_nx, int l_ny, float l_dx, float l_dy)
virtual void simulateTimestep (float dt)
void computeNumericalFluxes ()
void updateUnknowns (float dt)
float simulate (float i_tStart, float i_tEnd)
virtual ~SWE_WavePropagationBlock ()

Detailed Description

SWE_WavePropagationBlock is an implementation of the SWE_Block abstract class. It uses a wave propagation solver which is defined with the pre-compiler flag WAVE_PROPAGATION_SOLVER (see above).

Possible wave propagation solvers are: F-Wave, Apprximate Augmented Riemann, Hybrid (f-wave + augmented). (details can be found in the corresponding source files)


Constructor & Destructor Documentation

SWE_WavePropagationBlock::SWE_WavePropagationBlock ( int  l_nx,
int  l_ny,
float  l_dx,
float  l_dy 
)

Constructor of a SWE_WavePropagationBlock.

Allocates the variables for the simulation: unknowns h,hu,hv,b are defined on grid indices [0,..,nx+1]*[0,..,ny+1] (-> Abstract class SWE_Block) -> computational domain is [1,..,nx]*[1,..,ny] -> plus ghost cell layer

net-updates are defined for edges with indices [0,..,nx]*[0,..,ny-1] or [0,..,nx-1]*[0,..,ny] (for horizontal/vertical edges)

A left/right net update with index (i-1,j-1) is located on the edge between cells with index (i-1,j) and (i,j):

   *********************
   *         *         *
   * (i-1,j) *  (i,j)  *
   *         *         *
   *********************
             *
            ***
           *****
             *
             *
   NetUpdatesLeft(i-1,j-1)
             or
   NetUpdatesRight(i-1,j-1)
 

A below/above net update with index (i-1, j-1) is located on the edge between cells with index (i, j-1) and (i,j):

   ***********
   *         *
   * (i, j)  *   *
   *         *  **  NetUpdatesBelow(i-1,j-1)
   *********** *****         or
   *         *  **  NetUpdatesAbove(i-1,j-1)
   * (i,j-1) *   *
   *         *
   ***********
 

Destructor of a SWE_WavePropagationBlock.

In the case of a hybrid solver (NDEBUG not defined) information about the used solvers will be printed.


Member Function Documentation

Compute net updates for the block. The member variable maxTimestep will be updated with the maximum allowed time step size

Implements SWE_Block.

float SWE_WavePropagationBlock::simulate ( float  i_tStart,
float  i_tEnd 
) [virtual]

Runs the simulation until i_tEnd is reached.

Parameters:
i_tStarttime when the simulation starts
i_tEndtime when the simulation should end
Returns:
time we reached after the last update step, in general a bit later than i_tEnd

Implements SWE_Block.

void SWE_WavePropagationBlock::simulateTimestep ( float  dt) [virtual]

Update the bathymetry values with the displacement corresponding to the current time step.

Parameters:
i_asagiScenariothe corresponding ASAGI-scenario Executes a single timestep. * compute net updates for every edge * update cell values with the net updates
dttime step width of the update

Implements SWE_Block.

void SWE_WavePropagationBlock::updateUnknowns ( float  dt) [virtual]

Updates the unknowns with the already computed net-updates.

Parameters:
dttime step width used in the update.

Implements SWE_Block.


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