Skip to content

File FlowGPU.cu

FileList > src > FlowGPU.cu

Go to the source code of this file

  • #include "FlowGPU.h"

Public Functions

Type Name
void FlowGPU (Param XParam, Loop< T > & XLoop, Forcing< float > XForcing, Model< T > XModel)
Main GPU flow solver for the flood model.
template void FlowGPU< double > (Param XParam, Loop< double > & XLoop, Forcing< float > XForcing, Model< double > XModel)
template void FlowGPU< float > (Param XParam, Loop< float > & XLoop, Forcing< float > XForcing, Model< float > XModel)
void HalfStepGPU (Param XParam, Loop< T > & XLoop, Forcing< float > XForcing, Model< T > XModel)
Debugging GPU flow step for the flood model.
template void HalfStepGPU< double > (Param XParam, Loop< double > & XLoop, Forcing< float > XForcing, Model< double > XModel)
template void HalfStepGPU< float > (Param XParam, Loop< float > & XLoop, Forcing< float > XForcing, Model< float > XModel)
__global__ void reset_var (int halowidth, int * active, T resetval, T * Var)
CUDA kernel to reset a variable array for all active blocks.
template __global__ void reset_var< double > (int halowidth, int * active, double resetval, double * Var)
template __global__ void reset_var< float > (int halowidth, int * active, float resetval, float * Var)

Public Functions Documentation

function FlowGPU

Main GPU flow solver for the flood model.

template<class T>
void FlowGPU (
    Param XParam,
    Loop < T > & XLoop,
    Forcing < float > XForcing,
    Model < T > XModel
) 

Executes predictor and corrector steps, applies atmospheric, wind, and river forcing, updates advection and friction terms, and manages halo and gradient reconstruction for all blocks using CUDA kernels and streams.

Template parameters:

  • T Data type (float or double)

Parameters:

  • XParam Simulation parameters
  • XLoop Loop control and time stepping
  • XForcing Forcing data (atmospheric, wind, river, rain)
  • XModel Model data structure

function FlowGPU< double >

template void FlowGPU< double > (
    Param XParam,
    Loop < double > & XLoop,
    Forcing < float > XForcing,
    Model < double > XModel
) 

function FlowGPU< float >

template void FlowGPU< float > (
    Param XParam,
    Loop < float > & XLoop,
    Forcing < float > XForcing,
    Model < float > XModel
) 

function HalfStepGPU

Debugging GPU flow step for the flood model.

template<class T>
void HalfStepGPU (
    Param XParam,
    Loop < T > & XLoop,
    Forcing < float > XForcing,
    Model < T > XModel
) 

Runs a simplified flow step for debugging the main engine, including forcing, advection, friction, and halo/gradient reconstruction using CUDA kernels and streams.

Template parameters:

  • T Data type (float or double)

Parameters:

  • XParam Simulation parameters
  • XLoop Loop control and time stepping
  • XForcing Forcing data (atmospheric, wind, river, rain)
  • XModel Model data structure

function HalfStepGPU< double >

template void HalfStepGPU< double > (
    Param XParam,
    Loop < double > & XLoop,
    Forcing < float > XForcing,
    Model < double > XModel
) 

function HalfStepGPU< float >

template void HalfStepGPU< float > (
    Param XParam,
    Loop < float > & XLoop,
    Forcing < float > XForcing,
    Model < float > XModel
) 

function reset_var

CUDA kernel to reset a variable array for all active blocks.

template<class T>
__global__ void reset_var (
    int halowidth,
    int * active,
    T resetval,
    T * Var
) 

Sets all values in the variable array to the specified reset value for each block and cell.

Template parameters:

  • T Data type (float or double)

Parameters:

  • halowidth Halo width
  • active Array of active block indices
  • resetval Value to set
  • Var Variable array to reset

function reset_var< double >

template __global__ void reset_var< double > (
    int halowidth,
    int * active,
    double resetval,
    double * Var
) 

function reset_var< float >

template __global__ void reset_var< float > (
    int halowidth,
    int * active,
    float resetval,
    float * Var
) 


The documentation for this class was generated from the following file src/FlowGPU.cu