Skip to content

File Updateforcing.cu

FileList > src > Updateforcing.cu

Go to the source code of this file

  • #include "Updateforcing.h"

Public Functions

Type Name
__host__ void AddDeformCPU (Param XParam, BlockP< T > XBlock, deformmap< float > defmap, EvolvingP< T > XEv, T scale, T * zb)
Perform a deformation step on the model on the CPU. Applies deformation maps to the model based on the current simulation time and deformation parameters. __
__global__ void AddDeformGPU (Param XParam, BlockP< T > XBlock, deformmap< float > defmap, EvolvingP< T > XEv, T scale, T * zb)
Perform a deformation step on the model on the GPU. Applies deformation maps to the model based on the current simulation time and deformation parameters.
__host__ void AddPatmforcingCPU (Param XParam, BlockP< T > XBlock, DynForcingP< float > PAtm, Model< T > XModel)
Add atmospheric pressure forcing to the model on the CPU. Adds atmospheric pressure forcing to the model based on pressure data and current simulation time.
template __host__ void AddPatmforcingCPU< double > (Param XParam, BlockP< double > XBlock, DynForcingP< float > PAtm, Model< double > XModel)
template __host__ void AddPatmforcingCPU< float > (Param XParam, BlockP< float > XBlock, DynForcingP< float > PAtm, Model< float > XModel)
__global__ void AddPatmforcingGPU (Param XParam, BlockP< T > XBlock, DynForcingP< float > PAtm, Model< T > XModel)
Add atmospheric pressure forcing to the model on the GPU. Adds atmospheric pressure forcing to the model based on pressure data and current simulation time.
template __global__ void AddPatmforcingGPU< double > (Param XParam, BlockP< double > XBlock, DynForcingP< float > PAtm, Model< double > XModel)
template __global__ void AddPatmforcingGPU< float > (Param XParam, BlockP< float > XBlock, DynForcingP< float > PAtm, Model< float > XModel)
__host__ void AddRiverForcing (Param XParam, Loop< T > XLoop, std::vector< River > XRivers, Model< T > XModel)
Add river forcing to the model. Adds river discharge forcing to the model based on river data and current simulation time.
template __host__ void AddRiverForcing< double > (Param XParam, Loop< double > XLoop, std::vector< River > XRivers, Model< double > XModel)
template __host__ void AddRiverForcing< float > (Param XParam, Loop< float > XLoop, std::vector< River > XRivers, Model< float > XModel)
__host__ void AddinfiltrationImplicitCPU (Param XParam, Loop< T > XLoop, BlockP< T > XBlock, T * il, T * cl, EvolvingP< T > XEv, T * hgw)
Add infiltration forcing to the model implicitly on the CPU. Adds infiltration forcing to the model based on infiltration data and current water depth, updating water depth and surface elevation.
template __host__ void AddinfiltrationImplicitCPU< double > (Param XParam, Loop< double > XLoop, BlockP< double > XBlock, double * il, double * cl, EvolvingP< double > XEv, double * hgw)
template __host__ void AddinfiltrationImplicitCPU< float > (Param XParam, Loop< float > XLoop, BlockP< float > XBlock, float * il, float * cl, EvolvingP< float > XEv, float * hgw)
__global__ void AddinfiltrationImplicitGPU (Param XParam, Loop< T > XLoop, BlockP< T > XBlock, T * il, T * cl, EvolvingP< T > XEv, T * hgw)
Add infiltration forcing to the model implicitly on the GPU. Adds infiltration forcing to the model based on infiltration data and current water depth, updating water depth and surface elevation.
template __global__ void AddinfiltrationImplicitGPU< double > (Param XParam, Loop< double > XLoop, BlockP< double > XBlock, double * il, double * cl, EvolvingP< double > XEv, double * hgw)
template __global__ void AddinfiltrationImplicitGPU< float > (Param XParam, Loop< float > XLoop, BlockP< float > XBlock, float * il, float * cl, EvolvingP< float > XEv, float * hgw)
__host__ void AddrainforcingCPU (Param XParam, BlockP< T > XBlock, DynForcingP< float > Rain, AdvanceP< T > XAdv)
Add rainfall forcing to the model on the CPU. Adds rainfall forcing to the model based on rainfall data and current simulation time.
template __host__ void AddrainforcingCPU< double > (Param XParam, BlockP< double > XBlock, DynForcingP< float > Rain, AdvanceP< double > XAdv)
template __host__ void AddrainforcingCPU< float > (Param XParam, BlockP< float > XBlock, DynForcingP< float > Rain, AdvanceP< float > XAdv)
__global__ void AddrainforcingGPU (Param XParam, BlockP< T > XBlock, DynForcingP< float > Rain, AdvanceP< T > XAdv)
Add rainfall forcing to the model on the GPU. Adds rainfall forcing to the model based on rainfall data and current simulation time.
template __global__ void AddrainforcingGPU< double > (Param XParam, BlockP< double > XBlock, DynForcingP< float > Rain, AdvanceP< double > XAdv)
template __global__ void AddrainforcingGPU< float > (Param XParam, BlockP< float > XBlock, DynForcingP< float > Rain, AdvanceP< float > XAdv)
__host__ void AddrainforcingImplicitCPU (Param XParam, Loop< T > XLoop, BlockP< T > XBlock, DynForcingP< float > Rain, EvolvingP< T > XEv)
Add rainfall forcing to the model implicitly on the CPU. Adds rainfall forcing to the model based on rainfall data and current simulation time, updating water depth and surface elevation.
template __host__ void AddrainforcingImplicitCPU< double > (Param XParam, Loop< double > XLoop, BlockP< double > XBlock, DynForcingP< float > Rain, EvolvingP< double > XEv)
template __host__ void AddrainforcingImplicitCPU< float > (Param XParam, Loop< float > XLoop, BlockP< float > XBlock, DynForcingP< float > Rain, EvolvingP< float > XEv)
__global__ void AddrainforcingImplicitGPU (Param XParam, Loop< T > XLoop, BlockP< T > XBlock, DynForcingP< float > Rain, EvolvingP< T > XEv)
Add rainfall forcing to the model implicitly on the GPU. Adds rainfall forcing to the model based on rainfall data and current simulation time, updating water depth and surface elevation.
template __global__ void AddrainforcingImplicitGPU< double > (Param XParam, Loop< double > XLoop, BlockP< double > XBlock, DynForcingP< float > Rain, EvolvingP< double > XEv)
template __global__ void AddrainforcingImplicitGPU< float > (Param XParam, Loop< float > XLoop, BlockP< float > XBlock, DynForcingP< float > Rain, EvolvingP< float > XEv)
__host__ void AddwindforcingCPU (Param XParam, BlockP< T > XBlock, DynForcingP< float > Uwind, DynForcingP< float > Vwind, AdvanceP< T > XAdv)
Add wind forcing to the model on the CPU. Adds wind forcing to the model based on wind data and current simulation time.
template __host__ void AddwindforcingCPU< double > (Param XParam, BlockP< double > XBlock, DynForcingP< float > Uwind, DynForcingP< float > Vwind, AdvanceP< double > XAdv)
template __host__ void AddwindforcingCPU< float > (Param XParam, BlockP< float > XBlock, DynForcingP< float > Uwind, DynForcingP< float > Vwind, AdvanceP< float > XAdv)
__global__ void AddwindforcingGPU (Param XParam, BlockP< T > XBlock, DynForcingP< float > Uwind, DynForcingP< float > Vwind, AdvanceP< T > XAdv)
Add wind forcing to the model on the GPU. Adds wind forcing to the model based on wind data and current simulation time.
template __global__ void AddwindforcingGPU< double > (Param XParam, BlockP< double > XBlock, DynForcingP< float > Uwind, DynForcingP< float > Vwind, AdvanceP< double > XAdv)
template __global__ void AddwindforcingGPU< float > (Param XParam, BlockP< float > XBlock, DynForcingP< float > Uwind, DynForcingP< float > Vwind, AdvanceP< float > XAdv)
void Forcingthisstep (Param XParam, double totaltime, DynForcingP< float > & XDynForcing)
Update dynamic forcing for the current simulation step.
__global__ void InjectManyRiversGPU (Param XParam, int irib, RiverInfo< T > XRin, BlockP< T > XBlock, AdvanceP< T > XAdv)
Inject multiple river discharges into the model grid on the GPU. Injects river discharges into the model grid based on river geometry and discharge rates. Optimisation by processing multiple rivers in a single kernel launch.
__host__ void InjectRiverCPU (Param XParam, River XRiver, T qnow, int nblkriver, int * Riverblks, BlockP< T > XBlock, AdvanceP< T > XAdv)
Inject river discharge into the model grid on the CPU. Injects river discharge into the model grid based on river geometry and discharge rate.
template __host__ void InjectRiverCPU< double > (Param XParam, River XRiver, double qnow, int nblkriver, int * Riverblks, BlockP< double > XBlock, AdvanceP< double > XAdv)
template __host__ void InjectRiverCPU< float > (Param XParam, River XRiver, float qnow, int nblkriver, int * Riverblks, BlockP< float > XBlock, AdvanceP< float > XAdv)
__global__ void InjectRiverGPU (Param XParam, River XRiver, T qnow, int * Riverblks, BlockP< T > XBlock, AdvanceP< T > XAdv)
Inject river discharge into the model grid on the GPU. Injects river discharge into the model grid based on river geometry and discharge rate.
template __global__ void InjectRiverGPU< double > (Param XParam, River XRiver, double qnow, int * Riverblks, BlockP< double > XBlock, AdvanceP< double > XAdv)
template __global__ void InjectRiverGPU< float > (Param XParam, River XRiver, float qnow, int * Riverblks, BlockP< float > XBlock, AdvanceP< float > XAdv)
void deformstep (Param XParam, Loop< T > XLoop, std::vector< deformmap< float > > deform, Model< T > XModel, Model< T > XModel_g)
Perform a deformation step on the model. Applies deformation maps to the model based on the current simulation time and deformation parameters. Overloaded function to handle both CPU and GPU models.
void deformstep (Param XParam, Loop< T > XLoop, std::vector< deformmap< float > > deform, Model< T > XModel)
Perform a deformation step on the model. Applies deformation maps to the model based on the current simulation time and deformation parameters.
template void deformstep< double > (Param XParam, Loop< double > XLoop, std::vector< deformmap< float > > deform, Model< double > XModel, Model< double > XModel_g)
template void deformstep< float > (Param XParam, Loop< float > XLoop, std::vector< deformmap< float > > deform, Model< float > XModel, Model< float > XModel_g)
__device__ T interp2BUQ (T x, T y, TexSetP Forcing)
Interpolate data at given coordinates on the GPU. Interpolates data at specified coordinates using bilinear interpolation.
template __device__ double interp2BUQ< double > (double x, double y, TexSetP Forcing)
template __device__ float interp2BUQ< float > (float x, float y, TexSetP Forcing)
__device__ T interpDyn2BUQ (T x, T y, TexSetP Forcing)
Interpolate dynamic forcing data at given coordinates on the GPU. Interpolates dynamic forcing data at specified coordinates using bilinear interpolation.
template __device__ double interpDyn2BUQ< double > (double x, double y, TexSetP Forcing)
template __device__ float interpDyn2BUQ< float > (float x, float y, TexSetP Forcing)
void updateforcing (Param XParam, Loop< T > XLoop, Forcing< float > & XForcing)
Update dynamic forcings for the current simulation step. Updates the dynamic forcing data for the current simulation time step.
template void updateforcing< double > (Param XParam, Loop< double > XLoop, Forcing< float > & XForcing)
template void updateforcing< float > (Param XParam, Loop< float > XLoop, Forcing< float > & XForcing)

Public Functions Documentation

function AddDeformCPU

Perform a deformation step on the model on the CPU. Applies deformation maps to the model based on the current simulation time and deformation parameters. __

template<class T>
__host__ void AddDeformCPU (
    Param XParam,
    BlockP < T > XBlock,
    deformmap < float > defmap,
    EvolvingP < T > XEv,
    T scale,
    T * zb
) 

Parameters:

  • XParam Model parameters
  • XBlock Block data structure
  • defmap Deformation map
  • XEv Evolving data structure
  • scale Scaling factor for deformation
  • zb Bed elevation array

function AddDeformGPU

Perform a deformation step on the model on the GPU. Applies deformation maps to the model based on the current simulation time and deformation parameters.

template<class T>
__global__ void AddDeformGPU (
    Param XParam,
    BlockP < T > XBlock,
    deformmap < float > defmap,
    EvolvingP < T > XEv,
    T scale,
    T * zb
) 

Parameters:

  • XParam Model parameters
  • XLoop Loop structure containing time information
  • deform Vector of deformation maps
  • XModel Model data structure for GPU

function AddPatmforcingCPU

Add atmospheric pressure forcing to the model on the CPU. Adds atmospheric pressure forcing to the model based on pressure data and current simulation time.

template<class T>
__host__ void AddPatmforcingCPU (
    Param XParam,
    BlockP < T > XBlock,
    DynForcingP < float > PAtm,
    Model < T > XModel
) 

Parameters:

  • XParam Model parameters
  • XBlock Block data structure
  • PAtm Atmospheric pressure dynamic forcing structure
  • XModel Model data structure

function AddPatmforcingCPU< double >

template __host__ void AddPatmforcingCPU< double > (
    Param XParam,
    BlockP < double > XBlock,
    DynForcingP < float > PAtm,
    Model < double > XModel
) 

function AddPatmforcingCPU< float >

template __host__ void AddPatmforcingCPU< float > (
    Param XParam,
    BlockP < float > XBlock,
    DynForcingP < float > PAtm,
    Model < float > XModel
) 

function AddPatmforcingGPU

Add atmospheric pressure forcing to the model on the GPU. Adds atmospheric pressure forcing to the model based on pressure data and current simulation time.

template<class T>
__global__ void AddPatmforcingGPU (
    Param XParam,
    BlockP < T > XBlock,
    DynForcingP < float > PAtm,
    Model < T > XModel
) 

Parameters:

  • XParam Model parameters
  • XBlock Block data structure
  • PAtm Atmospheric pressure dynamic forcing structure
  • XModel Model data structure

function AddPatmforcingGPU< double >

template __global__ void AddPatmforcingGPU< double > (
    Param XParam,
    BlockP < double > XBlock,
    DynForcingP < float > PAtm,
    Model < double > XModel
) 

function AddPatmforcingGPU< float >

template __global__ void AddPatmforcingGPU< float > (
    Param XParam,
    BlockP < float > XBlock,
    DynForcingP < float > PAtm,
    Model < float > XModel
) 

function AddRiverForcing

Add river forcing to the model. Adds river discharge forcing to the model based on river data and current simulation time.

template<class T>
__host__ void AddRiverForcing (
    Param XParam,
    Loop < T > XLoop,
    std::vector< River > XRivers,
    Model < T > XModel
) 

Parameters:

  • XParam Model parameters
  • XLoop Loop structure containing time information
  • XRivers Vector of river data structures
  • XModel Model data structure

function AddRiverForcing< double >

template __host__ void AddRiverForcing< double > (
    Param XParam,
    Loop < double > XLoop,
    std::vector< River > XRivers,
    Model < double > XModel
) 

function AddRiverForcing< float >

template __host__ void AddRiverForcing< float > (
    Param XParam,
    Loop < float > XLoop,
    std::vector< River > XRivers,
    Model < float > XModel
) 

function AddinfiltrationImplicitCPU

Add infiltration forcing to the model implicitly on the CPU. Adds infiltration forcing to the model based on infiltration data and current water depth, updating water depth and surface elevation.

template<class T>
__host__ void AddinfiltrationImplicitCPU (
    Param XParam,
    Loop < T > XLoop,
    BlockP < T > XBlock,
    T * il,
    T * cl,
    EvolvingP < T > XEv,
    T * hgw
) 

Parameters:

  • XParam Model parameters
  • XLoop Loop structure containing time information
  • XBlock Block data structure
  • il Initial infiltration rates array
  • cl Continuous infiltration rates array
  • XEv Evolving data structure
  • hgw Groundwater height array

function AddinfiltrationImplicitCPU< double >

template __host__ void AddinfiltrationImplicitCPU< double > (
    Param XParam,
    Loop < double > XLoop,
    BlockP < double > XBlock,
    double * il,
    double * cl,
    EvolvingP < double > XEv,
    double * hgw
) 

function AddinfiltrationImplicitCPU< float >

template __host__ void AddinfiltrationImplicitCPU< float > (
    Param XParam,
    Loop < float > XLoop,
    BlockP < float > XBlock,
    float * il,
    float * cl,
    EvolvingP < float > XEv,
    float * hgw
) 

function AddinfiltrationImplicitGPU

Add infiltration forcing to the model implicitly on the GPU. Adds infiltration forcing to the model based on infiltration data and current water depth, updating water depth and surface elevation.

template<class T>
__global__ void AddinfiltrationImplicitGPU (
    Param XParam,
    Loop < T > XLoop,
    BlockP < T > XBlock,
    T * il,
    T * cl,
    EvolvingP < T > XEv,
    T * hgw
) 

Parameters:

  • XParam Model parameters
  • XLoop Loop structure containing time information
  • XBlock Block data structure
  • il Initial infiltration rates array
  • cl Continuous infiltration rates array
  • XEv Evolving data structure
  • hgw Groundwater height array

function AddinfiltrationImplicitGPU< double >

template __global__ void AddinfiltrationImplicitGPU< double > (
    Param XParam,
    Loop < double > XLoop,
    BlockP < double > XBlock,
    double * il,
    double * cl,
    EvolvingP < double > XEv,
    double * hgw
) 

function AddinfiltrationImplicitGPU< float >

template __global__ void AddinfiltrationImplicitGPU< float > (
    Param XParam,
    Loop < float > XLoop,
    BlockP < float > XBlock,
    float * il,
    float * cl,
    EvolvingP < float > XEv,
    float * hgw
) 

function AddrainforcingCPU

Add rainfall forcing to the model on the CPU. Adds rainfall forcing to the model based on rainfall data and current simulation time.

template<class T>
__host__ void AddrainforcingCPU (
    Param XParam,
    BlockP < T > XBlock,
    DynForcingP < float > Rain,
    AdvanceP < T > XAdv
) 

Parameters:

  • XParam Model parameters
  • XBlock Block data structure
  • Rain Rainfall dynamic forcing structure
  • XAdv Advance data structure

function AddrainforcingCPU< double >

template __host__ void AddrainforcingCPU< double > (
    Param XParam,
    BlockP < double > XBlock,
    DynForcingP < float > Rain,
    AdvanceP < double > XAdv
) 

function AddrainforcingCPU< float >

template __host__ void AddrainforcingCPU< float > (
    Param XParam,
    BlockP < float > XBlock,
    DynForcingP < float > Rain,
    AdvanceP < float > XAdv
) 

function AddrainforcingGPU

Add rainfall forcing to the model on the GPU. Adds rainfall forcing to the model based on rainfall data and current simulation time.

template<class T>
__global__ void AddrainforcingGPU (
    Param XParam,
    BlockP < T > XBlock,
    DynForcingP < float > Rain,
    AdvanceP < T > XAdv
) 

Parameters:

  • XParam Model parameters
  • XBlock Block data structure
  • Rain Rainfall dynamic forcing structure
  • XAdv Advance data structure

function AddrainforcingGPU< double >

template __global__ void AddrainforcingGPU< double > (
    Param XParam,
    BlockP < double > XBlock,
    DynForcingP < float > Rain,
    AdvanceP < double > XAdv
) 

function AddrainforcingGPU< float >

template __global__ void AddrainforcingGPU< float > (
    Param XParam,
    BlockP < float > XBlock,
    DynForcingP < float > Rain,
    AdvanceP < float > XAdv
) 

function AddrainforcingImplicitCPU

Add rainfall forcing to the model implicitly on the CPU. Adds rainfall forcing to the model based on rainfall data and current simulation time, updating water depth and surface elevation.

template<class T>
__host__ void AddrainforcingImplicitCPU (
    Param XParam,
    Loop < T > XLoop,
    BlockP < T > XBlock,
    DynForcingP < float > Rain,
    EvolvingP < T > XEv
) 

Parameters:

  • XParam Model parameters
  • XLoop Loop structure containing time information
  • XBlock Block data structure
  • Rain Rainfall dynamic forcing structure
  • XEv Evolving data structure

function AddrainforcingImplicitCPU< double >

template __host__ void AddrainforcingImplicitCPU< double > (
    Param XParam,
    Loop < double > XLoop,
    BlockP < double > XBlock,
    DynForcingP < float > Rain,
    EvolvingP < double > XEv
) 

function AddrainforcingImplicitCPU< float >

template __host__ void AddrainforcingImplicitCPU< float > (
    Param XParam,
    Loop < float > XLoop,
    BlockP < float > XBlock,
    DynForcingP < float > Rain,
    EvolvingP < float > XEv
) 

function AddrainforcingImplicitGPU

Add rainfall forcing to the model implicitly on the GPU. Adds rainfall forcing to the model based on rainfall data and current simulation time, updating water depth and surface elevation.

template<class T>
__global__ void AddrainforcingImplicitGPU (
    Param XParam,
    Loop < T > XLoop,
    BlockP < T > XBlock,
    DynForcingP < float > Rain,
    EvolvingP < T > XEv
) 

Parameters:

  • XParam Model parameters
  • XLoop Loop structure containing time information
  • XBlock Block data structure
  • Rain Rainfall dynamic forcing structure
  • XEv Evolving data structure

function AddrainforcingImplicitGPU< double >

template __global__ void AddrainforcingImplicitGPU< double > (
    Param XParam,
    Loop < double > XLoop,
    BlockP < double > XBlock,
    DynForcingP < float > Rain,
    EvolvingP < double > XEv
) 

function AddrainforcingImplicitGPU< float >

template __global__ void AddrainforcingImplicitGPU< float > (
    Param XParam,
    Loop < float > XLoop,
    BlockP < float > XBlock,
    DynForcingP < float > Rain,
    EvolvingP < float > XEv
) 

function AddwindforcingCPU

Add wind forcing to the model on the CPU. Adds wind forcing to the model based on wind data and current simulation time.

template<class T>
__host__ void AddwindforcingCPU (
    Param XParam,
    BlockP < T > XBlock,
    DynForcingP < float > Uwind,
    DynForcingP < float > Vwind,
    AdvanceP < T > XAdv
) 

Parameters:

  • XParam Model parameters
  • XBlock Block data structure
  • Uwind U-component of wind dynamic forcing structure
  • Vwind V-component of wind dynamic forcing structure
  • XAdv Advance data structure

function AddwindforcingCPU< double >

template __host__ void AddwindforcingCPU< double > (
    Param XParam,
    BlockP < double > XBlock,
    DynForcingP < float > Uwind,
    DynForcingP < float > Vwind,
    AdvanceP < double > XAdv
) 

function AddwindforcingCPU< float >

template __host__ void AddwindforcingCPU< float > (
    Param XParam,
    BlockP < float > XBlock,
    DynForcingP < float > Uwind,
    DynForcingP < float > Vwind,
    AdvanceP < float > XAdv
) 

function AddwindforcingGPU

Add wind forcing to the model on the GPU. Adds wind forcing to the model based on wind data and current simulation time.

template<class T>
__global__ void AddwindforcingGPU (
    Param XParam,
    BlockP < T > XBlock,
    DynForcingP < float > Uwind,
    DynForcingP < float > Vwind,
    AdvanceP < T > XAdv
) 

Parameters:

  • XParam Model parameters
  • XBlock Block data structure
  • Uwind U-component of wind dynamic forcing structure
  • Vwind V-component of wind dynamic forcing structure
  • XAdv Advance data structure

function AddwindforcingGPU< double >

template __global__ void AddwindforcingGPU< double > (
    Param XParam,
    BlockP < double > XBlock,
    DynForcingP < float > Uwind,
    DynForcingP < float > Vwind,
    AdvanceP < double > XAdv
) 

function AddwindforcingGPU< float >

template __global__ void AddwindforcingGPU< float > (
    Param XParam,
    BlockP < float > XBlock,
    DynForcingP < float > Uwind,
    DynForcingP < float > Vwind,
    AdvanceP < float > XAdv
) 

function Forcingthisstep

Update dynamic forcing for the current simulation step.

void Forcingthisstep (
    Param XParam,
    double totaltime,
    DynForcingP < float > & XDynForcing
) 

Updates the dynamic forcing data for the current simulation time step, handling uniform and non-uniform cases.

Parameters:

  • XParam Model parameters
  • totaltime Current simulation time
  • XDynForcing Dynamic forcing structure to update

function InjectManyRiversGPU

Inject multiple river discharges into the model grid on the GPU. Injects river discharges into the model grid based on river geometry and discharge rates. Optimisation by processing multiple rivers in a single kernel launch.

template<class T>
__global__ void InjectManyRiversGPU (
    Param XParam,
    int irib,
    RiverInfo < T > XRin,
    BlockP < T > XBlock,
    AdvanceP < T > XAdv
) 

Parameters:

  • XParam Model parameters
  • irib Index of the river being processed
  • XRin River information structure
  • XBlock Block data structure
  • XAdv Advance data structure

function InjectRiverCPU

Inject river discharge into the model grid on the CPU. Injects river discharge into the model grid based on river geometry and discharge rate.

template<class T>
__host__ void InjectRiverCPU (
    Param XParam,
    River XRiver,
    T qnow,
    int nblkriver,
    int * Riverblks,
    BlockP < T > XBlock,
    AdvanceP < T > XAdv
) 

Parameters:

  • XParam Model parameters
  • XRiver River data structure
  • qnow Current river discharge rate
  • Riverblks Array of blocks affected by the river
  • XBlock Block data structure
  • XAdv Advance data structure

function InjectRiverCPU< double >

template __host__ void InjectRiverCPU< double > (
    Param XParam,
    River XRiver,
    double qnow,
    int nblkriver,
    int * Riverblks,
    BlockP < double > XBlock,
    AdvanceP < double > XAdv
) 

function InjectRiverCPU< float >

template __host__ void InjectRiverCPU< float > (
    Param XParam,
    River XRiver,
    float qnow,
    int nblkriver,
    int * Riverblks,
    BlockP < float > XBlock,
    AdvanceP < float > XAdv
) 

function InjectRiverGPU

Inject river discharge into the model grid on the GPU. Injects river discharge into the model grid based on river geometry and discharge rate.

template<class T>
__global__ void InjectRiverGPU (
    Param XParam,
    River XRiver,
    T qnow,
    int * Riverblks,
    BlockP < T > XBlock,
    AdvanceP < T > XAdv
) 

Parameters:

  • XParam Model parameters
  • XRiver River data structure
  • qnow Current river discharge rate
  • Riverblks Array of blocks affected by the river
  • XBlock Block data structure
  • XAdv Advance data structure

function InjectRiverGPU< double >

template __global__ void InjectRiverGPU< double > (
    Param XParam,
    River XRiver,
    double qnow,
    int * Riverblks,
    BlockP < double > XBlock,
    AdvanceP < double > XAdv
) 

function InjectRiverGPU< float >

template __global__ void InjectRiverGPU< float > (
    Param XParam,
    River XRiver,
    float qnow,
    int * Riverblks,
    BlockP < float > XBlock,
    AdvanceP < float > XAdv
) 

function deformstep

Perform a deformation step on the model. Applies deformation maps to the model based on the current simulation time and deformation parameters. Overloaded function to handle both CPU and GPU models.

template<class T>
void deformstep (
    Param XParam,
    Loop < T > XLoop,
    std::vector< deformmap < float > > deform,
    Model < T > XModel,
    Model < T > XModel_g
) 

Parameters:

  • XParam Model parameters
  • XLoop Loop structure containing time information
  • deform Vector of deformation maps
  • XModel Model data structure
  • XModel_g Model data structure for GPU

function deformstep

Perform a deformation step on the model. Applies deformation maps to the model based on the current simulation time and deformation parameters.

template<class T>
void deformstep (
    Param XParam,
    Loop < T > XLoop,
    std::vector< deformmap < float > > deform,
    Model < T > XModel
) 

Parameters:

  • XParam Model parameters
  • XLoop Loop structure containing time information
  • deform Vector of deformation maps
  • XModel Model data structure

function deformstep< double >

template void deformstep< double > (
    Param XParam,
    Loop < double > XLoop,
    std::vector< deformmap < float > > deform,
    Model < double > XModel,
    Model < double > XModel_g
) 

function deformstep< float >

template void deformstep< float > (
    Param XParam,
    Loop < float > XLoop,
    std::vector< deformmap < float > > deform,
    Model < float > XModel,
    Model < float > XModel_g
) 

function interp2BUQ

Interpolate data at given coordinates on the GPU. Interpolates data at specified coordinates using bilinear interpolation.

template<class T>
__device__ T interp2BUQ (
    T x,
    T y,
    TexSetP Forcing
) 

Parameters:

  • x X-coordinate
  • y Y-coordinate
  • Forcing Dynamic forcing data structure

function interp2BUQ< double >

template __device__ double interp2BUQ< double > (
    double x,
    double y,
    TexSetP Forcing
) 

function interp2BUQ< float >

template __device__ float interp2BUQ< float > (
    float x,
    float y,
    TexSetP Forcing
) 

function interpDyn2BUQ

Interpolate dynamic forcing data at given coordinates on the GPU. Interpolates dynamic forcing data at specified coordinates using bilinear interpolation.

template<class T>
__device__ T interpDyn2BUQ (
    T x,
    T y,
    TexSetP Forcing
) 

Parameters:

  • x X-coordinate
  • y Y-coordinate
  • Forcing Dynamic forcing data structure

function interpDyn2BUQ< double >

template __device__ double interpDyn2BUQ< double > (
    double x,
    double y,
    TexSetP Forcing
) 

function interpDyn2BUQ< float >

template __device__ float interpDyn2BUQ< float > (
    float x,
    float y,
    TexSetP Forcing
) 

function updateforcing

Update dynamic forcings for the current simulation step. Updates the dynamic forcing data for the current simulation time step.

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

Parameters:

  • XParam Model parameters
  • XLoop Loop structure containing time information
  • XForcing Forcing data structure to update

function updateforcing< double >

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

function updateforcing< float >

template void updateforcing< float > (
    Param XParam,
    Loop < float > XLoop,
    Forcing < float > & XForcing
) 


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