SWE
/import/home/rettenbs/src/SWE/src/blocks/cuda/SWE_WavePropagationBlockCuda.hh
Go to the documentation of this file.
00001 
00029 #ifndef SWEWAVEPROPAGATIONBLOCKCUDA_HH_
00030 #define SWEWAVEPROPAGATIONBLOCKCUDA_HH_
00031 
00032 #include <cassert>
00033 #include "SWE_BlockCUDA.hh"
00034 
00043 class SWE_WavePropagationBlockCuda: public SWE_BlockCUDA {
00044   //private:
00046     float* hNetUpdatesLeftD;
00048     float* hNetUpdatesRightD;
00049 
00051     float* huNetUpdatesLeftD;
00053     float* huNetUpdatesRightD;
00054 
00055 
00057     float* hNetUpdatesBelowD;
00059     float* hNetUpdatesAboveD;
00060 
00062     float* hvNetUpdatesBelowD;
00064     float* hvNetUpdatesAboveD;
00065 
00066   public:
00067     // constructor of SWE_WavePropagationBlockCuda
00068     SWE_WavePropagationBlockCuda(
00069                 int l_nx, int l_ny,
00070                 float l_dx, float l_dy);
00071 
00072     // destructor of SWE_WavePropagationBlockCuda
00073     ~SWE_WavePropagationBlockCuda();
00074 
00075     // compute a single time step (net-updates + update of the cells).
00076     void simulateTimestep( float i_dT );
00077 
00078     // simulate multiple time steps (start and end time provided as parameters)
00079     float simulate(float, float);
00080 
00081     // TODO: not implemented, max time step reduction is done in each call of computeNumericalFluxes(...)
00082     //void computeMaxTimestep() {
00083     //  assert(false);
00084     //};
00085 
00086     // compute the numerical fluxes (net-update formulation here).
00087     void computeNumericalFluxes();
00088 
00089     // compute the new cell values.
00090     void updateUnknowns(const float i_deltaT);
00091 };
00092 
00093 #endif /* SWEWAVEPROPAGATIONBLOCKCUDA_HH_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends