File Updateforcing.h
FileList > src > Updateforcing.h
Go to the source code of this file
#include "General.h"#include "Param.h"#include "Arrays.h"#include "Forcing.h"#include "InitialConditions.h"#include "MemManagement.h"#include "ReadForcing.h"#include "GridManip.h"#include "Util_CPU.h"
Public Functions
| Type | Name |
|---|---|
| __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. |
| __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. |
| __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. |
| __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. |
| __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. |
| __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. |
| __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. |
| __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. |
| __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. |
| __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. |
| __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. |
| void | Forcingthisstep (Param XParam, double totaltime, DynForcingP< float > & XDynForcing) Update dynamic forcing for the current simulation step. |
| __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. |
| 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. |
| __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. |
| 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. |
Public Functions Documentation
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:
XParamModel parametersXLoopLoop structure containing time informationdeformVector of deformation mapsXModelModel 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:
XParamModel parametersXBlockBlock data structurePAtmAtmospheric pressure dynamic forcing structureXModelModel data structure
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:
XParamModel parametersXBlockBlock data structurePAtmAtmospheric pressure dynamic forcing structureXModelModel data structure
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:
XParamModel parametersXLoopLoop structure containing time informationXRiversVector of river data structuresXModelModel data structure
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:
XParamModel parametersXLoopLoop structure containing time informationXBlockBlock data structureilInitial infiltration rates arrayclContinuous infiltration rates arrayXEvEvolving data structurehgwGroundwater height array
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:
XParamModel parametersXLoopLoop structure containing time informationXBlockBlock data structureilInitial infiltration rates arrayclContinuous infiltration rates arrayXEvEvolving data structurehgwGroundwater height array
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:
XParamModel parametersXBlockBlock data structureRainRainfall dynamic forcing structureXAdvAdvance data structure
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:
XParamModel parametersXBlockBlock data structureRainRainfall dynamic forcing structureXAdvAdvance data structure
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:
XParamModel parametersXLoopLoop structure containing time informationXBlockBlock data structureRainRainfall dynamic forcing structureXEvEvolving data structure
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:
XParamModel parametersXLoopLoop structure containing time informationXBlockBlock data structureRainRainfall dynamic forcing structureXEvEvolving data structure
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:
XParamModel parametersXBlockBlock data structureUwindU-component of wind dynamic forcing structureVwindV-component of wind dynamic forcing structureXAdvAdvance data structure
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:
XParamModel parametersXBlockBlock data structureUwindU-component of wind dynamic forcing structureVwindV-component of wind dynamic forcing structureXAdvAdvance data structure
function Forcingthisstep
Update dynamic forcing for the current simulation step.
Updates the dynamic forcing data for the current simulation time step, handling uniform and non-uniform cases.
Parameters:
XParamModel parameterstotaltimeCurrent simulation timeXDynForcingDynamic forcing structure to update
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:
XParamModel parametersXRiverRiver data structureqnowCurrent river discharge rateRiverblksArray of blocks affected by the riverXBlockBlock data structureXAdvAdvance data structure
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:
XParamModel parametersXLoopLoop structure containing time informationdeformVector of deformation mapsXModelModel data structureXModel_gModel data structure for GPU
function interpDyn2BUQ
Interpolate dynamic forcing data at given coordinates on the GPU. Interpolates dynamic forcing data at specified coordinates using bilinear interpolation.
Parameters:
xX-coordinateyY-coordinate- Forcing Dynamic forcing data structure
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:
XParamModel parametersXLoopLoop structure containing time informationXForcingForcing data structure to update
The documentation for this class was generated from the following file src/Updateforcing.h