File Halo.cu
Go to the source code of this file
#include "Halo.h"
Public Functions
Type | Name |
---|---|
void | HaloFluxCPUBT (Param XParam, int ib, BlockP< T > XBlock, T * z) Wrapping function for applying halo flux correction on the left and right boundaries of all active blocks on GPU. |
void | HaloFluxCPULR (Param XParam, int ib, BlockP< T > XBlock, T * z) CPU function for applying halo flux correction on the left and right boundaries. |
__global__ void | HaloFluxGPUBT (Param XParam, BlockP< T > XBlock, T * z) GPU kernel for applying halo flux correction on the top and bottom boundaries of all active blocks. |
__global__ void | HaloFluxGPUBTnew (Param XParam, BlockP< T > XBlock, T * z) GPU kernel for applying halo flux correction on the top and bottom boundaries of all active blocks. |
__global__ void | HaloFluxGPULR (Param XParam, BlockP< T > XBlock, T * z) Wrapping function for applying halo flux correction on the left and right boundaries of all active blocks. |
__global__ void | HaloFluxGPULRnew (Param XParam, BlockP< T > XBlock, T * z) GPU kernel for applying halo flux correction on the left and right boundaries of all active blocks. |
void | RecalculateZs (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev, T * zb) Recalculate water surface after recalculating the values on the halo on the CPU. |
template void | RecalculateZs< double > (Param XParam, BlockP< double > XBlock, EvolvingP< double > Xev, double * zb) |
template void | RecalculateZs< float > (Param XParam, BlockP< float > XBlock, EvolvingP< float > Xev, float * zb) |
__global__ void | RecalculateZsGPU (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev, T * zb) |
template __global__ void | RecalculateZsGPU< double > (Param XParam, BlockP< double > XBlock, EvolvingP< double > Xev, double * zb) |
template __global__ void | RecalculateZsGPU< float > (Param XParam, BlockP< float > XBlock, EvolvingP< float > Xev, float * zb) |
void | Recalculatehh (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev, T * zb) Recalculate water depth after recalculating the values on the halo on the CPU. |
template void | Recalculatehh< double > (Param XParam, BlockP< double > XBlock, EvolvingP< double > Xev, double * zb) |
template void | Recalculatehh< float > (Param XParam, BlockP< float > XBlock, EvolvingP< float > Xev, float * zb) |
void | bndmaskGPU (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev, FluxP< T > Flux) Wrapping function for applying boundary masks to flux variables on GPU. |
template void | bndmaskGPU< double > (Param XParam, BlockP< double > XBlock, EvolvingP< double > Xev, FluxP< double > Flux) |
template void | bndmaskGPU< float > (Param XParam, BlockP< float > XBlock, EvolvingP< float > Xev, FluxP< float > Flux) |
void | fillBot (Param XParam, int ib, BlockP< T > XBlock, T *& z) Function to fill the bottom halo region of a block, handling various neighbor configurations. |
__global__ void | fillBot (int halowidth, int * active, int * level, int * botleft, int * botright, int * topleft, int * lefttop, int * righttop, T * a) CUDA kernel to fill the bottom halo region of blocks in parallel, handling various neighbor configurations. |
template __global__ void | fillBot< double > (int halowidth, int * active, int * level, int * botleft, int * botright, int * topleft, int * lefttop, int * righttop, double * a) |
template __global__ void | fillBot< float > (int halowidth, int * active, int * level, int * botleft, int * botright, int * topleft, int * lefttop, int * righttop, float * a) |
void | fillBotFlux (Param XParam, bool doProlongation, int ib, BlockP< T > XBlock, T *& z) Fills the bottom halo region of a block, handling various neighbor configurations. |
__global__ void | fillBotnew (int halowidth, int nblk, int * active, int * level, int * botleft, int * botright, int * topleft, int * lefttop, int * righttop, T * a) CUDA kernel to fill the bottom halo region of blocks in parallel for new refinement, handling various neighbor configurations, new version. |
template __global__ void | fillBotnew< double > (int halowidth, int nblk, int * active, int * level, int * botleft, int * botright, int * topleft, int * lefttop, int * righttop, double * a) |
template __global__ void | fillBotnew< float > (int halowidth, int nblk, int * active, int * level, int * botleft, int * botright, int * topleft, int * lefttop, int * righttop, float * a) |
void | fillCorners (Param XParam, BlockP< T > XBlock, T *& z) Function to fill the corner halo regions for all active blocks. |
void | fillCorners (Param XParam, BlockP< T > XBlock, EvolvingP< T > & Xev) Function to fill the corner halo regions for all active blocks and all evolving variables. |
void | fillCorners (Param XParam, int ib, BlockP< T > XBlock, T *& z) Function to fill the corner halo regions for a specific block, handling various neighbor configurations. |
template void | fillCorners< double > (Param XParam, BlockP< double > XBlock, double *& z) |
template void | fillCorners< double > (Param XParam, BlockP< double > XBlock, EvolvingP< double > & Xev) |
template void | fillCorners< double > (Param XParam, int ib, BlockP< double > XBlock, double *& z) |
template void | fillCorners< float > (Param XParam, BlockP< float > XBlock, float *& z) |
template void | fillCorners< float > (Param XParam, BlockP< float > XBlock, EvolvingP< float > & Xev) |
template void | fillCorners< float > (Param XParam, int ib, BlockP< float > XBlock, float *& z) |
__global__ void | fillCornersGPU (Param XParam, BlockP< T > XBlock, T * z) CUDA kernel to fill the corner halo regions for all active blocks in parallel, handling various neighbor configurations. |
template __global__ void | fillCornersGPU< double > (Param XParam, BlockP< double > XBlock, double * z) |
template __global__ void | fillCornersGPU< float > (Param XParam, BlockP< float > XBlock, float * z) |
void | fillHalo (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev, T * zb) Wrapping function for calculating halos for each block and each variable on CPU. |
void | fillHalo (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev) Wrapping function for calculating halos for each block and each variable on CPU. |
void | fillHalo (Param XParam, BlockP< T > XBlock, GradientsP< T > Grad) Wrapping function for calculating halos for each block and each variable on CPU. |
void | fillHalo (Param XParam, BlockP< T > XBlock, FluxP< T > Flux) Wrapping function for calculating flux halos for each block and each variable on CPU. |
template void | fillHalo< double > (Param XParam, BlockP< double > XBlock, EvolvingP< double > Xev, double * zb) |
template void | fillHalo< double > (Param XParam, BlockP< double > XBlock, EvolvingP< double > Xev) |
template void | fillHalo< double > (Param XParam, BlockP< double > XBlock, GradientsP< double > Grad) |
template void | fillHalo< double > (Param XParam, BlockP< double > XBlock, FluxP< double > Flux) |
template void | fillHalo< float > (Param XParam, BlockP< float > XBlock, EvolvingP< float > Xev, float * zb) |
template void | fillHalo< float > (Param XParam, BlockP< float > XBlock, EvolvingP< float > Xev) |
template void | fillHalo< float > (Param XParam, BlockP< float > XBlock, GradientsP< float > Grad) |
template void | fillHalo< float > (Param XParam, BlockP< float > XBlock, FluxP< float > Flux) |
void | fillHaloBTFluxC (Param XParam, BlockP< T > XBlock, T * z) Wrapping function for calculating flux for halos for each block of a single variable on GPU. |
template void | fillHaloBTFluxC< double > (Param XParam, BlockP< double > XBlock, double * z) |
template void | fillHaloBTFluxC< float > (Param XParam, BlockP< float > XBlock, float * z) |
void | fillHaloBotTopGPU (Param XParam, BlockP< T > XBlock, cudaStream_t stream, T * z) Wrapping function for calculating flux for halos for each block of a single variable on GPU. |
template void | fillHaloBotTopGPU< double > (Param XParam, BlockP< double > XBlock, cudaStream_t stream, double * z) |
template void | fillHaloBotTopGPU< float > (Param XParam, BlockP< float > XBlock, cudaStream_t stream, float * z) |
void | fillHaloBotTopGPUnew (Param XParam, BlockP< T > XBlock, cudaStream_t stream, T * z) Wrapping function for calculating flux for halos for each block of a single variable on GPU. New version. |
template void | fillHaloBotTopGPUnew< double > (Param XParam, BlockP< double > XBlock, cudaStream_t stream, double * z) |
template void | fillHaloBotTopGPUnew< float > (Param XParam, BlockP< float > XBlock, cudaStream_t stream, float * z) |
void | fillHaloC (Param XParam, BlockP< T > XBlock, T * z) Wrapping function for calculating halos for each block of a single variable on CPU. |
template void | fillHaloC< double > (Param XParam, BlockP< double > XBlock, double * z) |
template void | fillHaloC< float > (Param XParam, BlockP< float > XBlock, float * z) |
void | fillHaloD (Param XParam, int ib, BlockP< T > XBlock, T * z) Wrapping function for calculating halos on CPU on every side of a block of a single variable. |
template void | fillHaloD< double > (Param XParam, int ib, BlockP< double > XBlock, double * z) |
template void | fillHaloD< float > (Param XParam, int ib, BlockP< float > XBlock, float * z) |
void | fillHaloF (Param XParam, bool doProlongation, BlockP< T > XBlock, T * z) Wrapping function for calculating flux in the halos for a block and a single variable on CPU. |
template void | fillHaloF< double > (Param XParam, bool doProlongation, BlockP< double > XBlock, double * z) |
template void | fillHaloF< float > (Param XParam, bool doProlongation, BlockP< float > XBlock, float * z) |
void | fillHaloGPU (Param XParam, BlockP< T > XBlock, cudaStream_t stream, T * z) Wrapping function for calculating halos for each block of a single variable on GPU. |
void | fillHaloGPU (Param XParam, BlockP< T > XBlock, T * z) Wrapping function for calculating halos for each block of a single variable on GPU. |
void | fillHaloGPU (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev) Wrapping function for calculating halos for each block and each variable on GPU. |
void | fillHaloGPU (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev, T * zb) Wrapping function for calculating halos for each block and each variable on GPU. |
void | fillHaloGPU (Param XParam, BlockP< T > XBlock, GradientsP< T > Grad) Wrapping function for calculating halos for each block and each variable on GPU. |
void | fillHaloGPU (Param XParam, BlockP< T > XBlock, FluxP< T > Flux) Wrapping function for calculating flux halos for each block and each variable on GPU. |
template void | fillHaloGPU< double > (Param XParam, BlockP< double > XBlock, cudaStream_t stream, double * z) |
template void | fillHaloGPU< double > (Param XParam, BlockP< double > XBlock, double * z) |
template void | fillHaloGPU< double > (Param XParam, BlockP< double > XBlock, EvolvingP< double > Xev) |
template void | fillHaloGPU< double > (Param XParam, BlockP< double > XBlock, EvolvingP< double > Xev, double * zb) |
template void | fillHaloGPU< double > (Param XParam, BlockP< double > XBlock, GradientsP< double > Grad) |
template void | fillHaloGPU< double > (Param XParam, BlockP< double > XBlock, FluxP< double > Flux) |
template void | fillHaloGPU< float > (Param XParam, BlockP< float > XBlock, cudaStream_t stream, float * z) |
template void | fillHaloGPU< float > (Param XParam, BlockP< float > XBlock, float * z) |
template void | fillHaloGPU< float > (Param XParam, BlockP< float > XBlock, EvolvingP< float > Xev) |
template void | fillHaloGPU< float > (Param XParam, BlockP< float > XBlock, EvolvingP< float > Xev, float * zb) |
template void | fillHaloGPU< float > (Param XParam, BlockP< float > XBlock, GradientsP< float > Grad) |
template void | fillHaloGPU< float > (Param XParam, BlockP< float > XBlock, FluxP< float > Flux) |
void | fillHaloGPUnew (Param XParam, BlockP< T > XBlock, cudaStream_t stream, T * z) Wrapping function for calculating halos for each block of a single variable on GPU. New version. |
template void | fillHaloGPUnew< double > (Param XParam, BlockP< double > XBlock, cudaStream_t stream, double * z) |
template void | fillHaloGPUnew< float > (Param XParam, BlockP< float > XBlock, cudaStream_t stream, float * z) |
void | fillHaloLRFluxC (Param XParam, BlockP< T > XBlock, T * z) Wrapping function for calculating flux for halos for each block of a single variable on GPU. |
template void | fillHaloLRFluxC< double > (Param XParam, BlockP< double > XBlock, double * z) |
template void | fillHaloLRFluxC< float > (Param XParam, BlockP< float > XBlock, float * z) |
void | fillHaloLeftRightGPU (Param XParam, BlockP< T > XBlock, cudaStream_t stream, T * z) Wrapping function for calculating for halos for each block of a single variable on GPU. |
template void | fillHaloLeftRightGPU< double > (Param XParam, BlockP< double > XBlock, cudaStream_t stream, double * z) |
template void | fillHaloLeftRightGPU< float > (Param XParam, BlockP< float > XBlock, cudaStream_t stream, float * z) |
void | fillHaloLeftRightGPUnew (Param XParam, BlockP< T > XBlock, cudaStream_t stream, T * z) Wrapping function for calculating for halos for each block of a single variable on GPU. New version. |
template void | fillHaloLeftRightGPUnew< double > (Param XParam, BlockP< double > XBlock, cudaStream_t stream, double * z) |
template void | fillHaloLeftRightGPUnew< float > (Param XParam, BlockP< float > XBlock, cudaStream_t stream, float * z) |
void | fillHaloTopRightC (Param XParam, BlockP< T > XBlock, T * z) Wrapping function for calculating flux for halos for each block of a single variable on GPU. |
template void | fillHaloTopRightC< double > (Param XParam, BlockP< double > XBlock, double * z) |
template void | fillHaloTopRightC< float > (Param XParam, BlockP< float > XBlock, float * z) |
void | fillHaloTopRightGPU (Param XParam, BlockP< T > XBlock, cudaStream_t stream, T * z) Wrapping function for calculating flux for halos for each block of a single variable on GPU. |
template void | fillHaloTopRightGPU< double > (Param XParam, BlockP< double > XBlock, cudaStream_t stream, double * z) |
template void | fillHaloTopRightGPU< float > (Param XParam, BlockP< float > XBlock, cudaStream_t stream, float * z) |
void | fillLeft (Param XParam, int ib, BlockP< T > XBlock, T *& z) Applying halo flux correction on the left boundaries of all active blocks on GPU. |
__global__ void | fillLeft (int halowidth, int * active, int * level, int * leftbot, int * lefttop, int * rightbot, int * botright, int * topright, T * a) GPU kernel for applying halo flux correction on the left boundaries of all active blocks. |
template __global__ void | fillLeft< double > (int halowidth, int * active, int * level, int * leftbot, int * lefttop, int * rightbot, int * botright, int * topright, double * a) |
template __global__ void | fillLeft< float > (int halowidth, int * active, int * level, int * leftbot, int * lefttop, int * rightbot, int * botright, int * topright, float * a) |
void | fillLeftFlux (Param XParam, bool doProlongation, int ib, BlockP< T > XBlock, T *& z) CPU function for applying halo flux correction on the left boundaries of a specific block. |
__global__ void | fillLeftnew (int halowidth, int nblk, int * active, int * level, int * leftbot, int * lefttop, int * rightbot, int * botright, int * topright, T * a) New way of filling the left halo 2 blocks at a time to maximize GPU occupancy. |
template __global__ void | fillLeftnew< double > (int halowidth, int nblk, int * active, int * level, int * leftbot, int * lefttop, int * rightbot, int * botright, int * topright, double * a) |
template __global__ void | fillLeftnew< float > (int halowidth, int nblk, int * active, int * level, int * leftbot, int * lefttop, int * rightbot, int * botright, int * topright, float * a) |
void | fillRight (Param XParam, int ib, BlockP< T > XBlock, T *& z) Fills the right halo region of a block. |
__global__ void | fillRight (int halowidth, int * active, int * level, int * rightbot, int * righttop, int * leftbot, int * botleft, int * topleft, T * a) CUDA kernel to fill the right halo region of blocks in parallel. |
template __global__ void | fillRight< double > (int halowidth, int * active, int * level, int * rightbot, int * righttop, int * leftbot, int * botleft, int * topleft, double * a) |
template __global__ void | fillRight< float > (int halowidth, int * active, int * level, int * rightbot, int * righttop, int * leftbot, int * botleft, int * topleft, float * a) |
void | fillRightFlux (Param XParam, bool doProlongation, int ib, BlockP< T > XBlock, T *& z) Function to fill the right halo region of a block, handling various neighbor configurations. |
__global__ void | fillRightFlux (int halowidth, bool doProlongation, int * active, int * level, int * rightbot, int * righttop, int * leftbot, int * botleft, int * topleft, T * a) CUDA kernel to fill the right halo region of blocks in parallel for flux variables, handling various neighbor configurations. |
template void | fillRightFlux< double > (Param XParam, bool doProlongation, int ib, BlockP< double > XBlock, double *& z) |
template __global__ void | fillRightFlux< double > (int halowidth, bool doProlongation, int * active, int * level, int * rightbot, int * righttop, int * leftbot, int * botleft, int * topleft, double * a) |
template void | fillRightFlux< float > (Param XParam, bool doProlongation, int ib, BlockP< float > XBlock, float *& z) |
template __global__ void | fillRightFlux< float > (int halowidth, bool doProlongation, int * active, int * level, int * rightbot, int * righttop, int * leftbot, int * botleft, int * topleft, float * a) |
__global__ void | fillRightnew (int halowidth, int nblk, int * active, int * level, int * rightbot, int * righttop, int * leftbot, int * botleft, int * topleft, T * a) CUDA kernel to fill the right halo region of blocks in parallel (new version). |
template __global__ void | fillRightnew< double > (int halowidth, int nblk, int * active, int * level, int * rightbot, int * righttop, int * leftbot, int * botleft, int * topleft, double * a) |
template __global__ void | fillRightnew< float > (int halowidth, int nblk, int * active, int * level, int * rightbot, int * righttop, int * leftbot, int * botleft, int * topleft, float * a) |
void | fillTop (Param XParam, int ib, BlockP< T > XBlock, T *& z) Fills the top halo region of a block, handling various neighbor configurations. |
__global__ void | fillTop (int halowidth, int * active, int * level, int * topleft, int * topright, int * botleft, int * leftbot, int * rightbot, T * a) CUDA kernel to fill the top halo region of blocks in parallel for new refinement, handling various neighbor configurations, new version. |
template __global__ void | fillTop< double > (int halowidth, int * active, int * level, int * topleft, int * topright, int * botleft, int * leftbot, int * rightbot, double * a) |
template __global__ void | fillTop< float > (int halowidth, int * active, int * level, int * topleft, int * topright, int * botleft, int * leftbot, int * rightbot, float * a) |
void | fillTopFlux (Param XParam, bool doProlongation, int ib, BlockP< T > XBlock, T *& z) Function to fill the top halo region of a block for new refinement, handling various neighbor configurations. |
__global__ void | fillTopFlux (int halowidth, bool doProlongation, int * active, int * level, int * topleft, int * topright, int * botleft, int * leftbot, int * rightbot, T * a) CUDA kernel to fill the top halo region of blocks in parallel for new refinement, handling various neighbor configurations, new version. |
template void | fillTopFlux< double > (Param XParam, bool doProlongation, int ib, BlockP< double > XBlock, double *& z) |
template __global__ void | fillTopFlux< double > (int halowidth, bool doProlongation, int * active, int * level, int * topleft, int * topright, int * botleft, int * leftbot, int * rightbot, double * a) |
template void | fillTopFlux< float > (Param XParam, bool doProlongation, int ib, BlockP< float > XBlock, float *& z) |
template __global__ void | fillTopFlux< float > (int halowidth, bool doProlongation, int * active, int * level, int * topleft, int * topright, int * botleft, int * leftbot, int * rightbot, float * a) |
__global__ void | fillTopnew (int halowidth, int nblk, int * active, int * level, int * topleft, int * topright, int * botleft, int * leftbot, int * rightbot, T * a) |
template __global__ void | fillTopnew< double > (int halowidth, int nblk, int * active, int * level, int * topleft, int * topright, int * botleft, int * leftbot, int * rightbot, double * a) |
template __global__ void | fillTopnew< float > (int halowidth, int nblk, int * active, int * level, int * topleft, int * topright, int * botleft, int * leftbot, int * rightbot, float * a) |
void | refine_linear (Param XParam, BlockP< T > XBlock, T * z, T * dzdx, T * dzdy) Wrapping function for refining all sides of active blocks using linear reconstruction. |
template void | refine_linear< double > (Param XParam, BlockP< double > XBlock, double * z, double * dzdx, double * dzdy) |
template void | refine_linear< float > (Param XParam, BlockP< float > XBlock, float * z, float * dzdx, float * dzdy) |
void | refine_linearGPU (Param XParam, BlockP< T > XBlock, T * z, T * dzdx, T * dzdy) Wrapping function for refining all sides of active blocks using linear reconstruction on GPU. |
template void | refine_linearGPU< double > (Param XParam, BlockP< double > XBlock, double * z, double * dzdx, double * dzdy) |
template void | refine_linearGPU< float > (Param XParam, BlockP< float > XBlock, float * z, float * dzdx, float * dzdy) |
void | refine_linear_Bot (Param XParam, int ib, BlockP< T > XBlock, T * z, T * dzdx, T * dzdy) Refine a block on the bottom side using linear reconstruction. |
template void | refine_linear_Bot< double > (Param XParam, int ib, BlockP< double > XBlock, double * z, double * dzdx, double * dzdy) |
template void | refine_linear_Bot< float > (Param XParam, int ib, BlockP< float > XBlock, float * z, float * dzdx, float * dzdy) |
__global__ void | refine_linear_BotGPU (Param XParam, BlockP< T > XBlock, T * z, T * dzdx, T * dzdy) GPU kernel to refine a block on the bottom side using linear reconstruction. |
template __global__ void | refine_linear_BotGPU< double > (Param XParam, BlockP< double > XBlock, double * z, double * dzdx, double * dzdy) |
template __global__ void | refine_linear_BotGPU< float > (Param XParam, BlockP< float > XBlock, float * z, float * dzdx, float * dzdy) |
void | refine_linear_Left (Param XParam, int ib, BlockP< T > XBlock, T * z, T * dzdx, T * dzdy) Refine a block on the left side using linear reconstruction. |
template void | refine_linear_Left< double > (Param XParam, int ib, BlockP< double > XBlock, double * z, double * dzdx, double * dzdy) |
template void | refine_linear_Left< float > (Param XParam, int ib, BlockP< float > XBlock, float * z, float * dzdx, float * dzdy) |
__global__ void | refine_linear_LeftGPU (Param XParam, BlockP< T > XBlock, T * z, T * dzdx, T * dzdy) GPU kernel to refine a block on the left side using linear reconstruction. |
template __global__ void | refine_linear_LeftGPU< double > (Param XParam, BlockP< double > XBlock, double * z, double * dzdx, double * dzdy) |
template __global__ void | refine_linear_LeftGPU< float > (Param XParam, BlockP< float > XBlock, float * z, float * dzdx, float * dzdy) |
void | refine_linear_Right (Param XParam, int ib, BlockP< T > XBlock, T * z, T * dzdx, T * dzdy) Refine a block on the right side using linear reconstruction. |
template void | refine_linear_Right< double > (Param XParam, int ib, BlockP< double > XBlock, double * z, double * dzdx, double * dzdy) |
template void | refine_linear_Right< float > (Param XParam, int ib, BlockP< float > XBlock, float * z, float * dzdx, float * dzdy) |
__global__ void | refine_linear_RightGPU (Param XParam, BlockP< T > XBlock, T * z, T * dzdx, T * dzdy) GPU kernel to refine a block on the right side using linear reconstruction. |
template __global__ void | refine_linear_RightGPU< double > (Param XParam, BlockP< double > XBlock, double * z, double * dzdx, double * dzdy) |
template __global__ void | refine_linear_RightGPU< float > (Param XParam, BlockP< float > XBlock, float * z, float * dzdx, float * dzdy) |
void | refine_linear_Top (Param XParam, int ib, BlockP< T > XBlock, T * z, T * dzdx, T * dzdy) Refine a block on the top side using linear reconstruction. |
template void | refine_linear_Top< double > (Param XParam, int ib, BlockP< double > XBlock, double * z, double * dzdx, double * dzdy) |
template void | refine_linear_Top< float > (Param XParam, int ib, BlockP< float > XBlock, float * z, float * dzdx, float * dzdy) |
__global__ void | refine_linear_TopGPU (Param XParam, BlockP< T > XBlock, T * z, T * dzdx, T * dzdy) GPU kernel to refine a block on the top side using linear reconstruction. |
template __global__ void | refine_linear_TopGPU< double > (Param XParam, BlockP< double > XBlock, double * z, double * dzdx, double * dzdy) |
template __global__ void | refine_linear_TopGPU< float > (Param XParam, BlockP< float > XBlock, float * z, float * dzdx, float * dzdy) |
Public Functions Documentation
function HaloFluxCPUBT
Wrapping function for applying halo flux correction on the left and right boundaries of all active blocks on GPU.
Parameters:
-
XParam
The model parameters -
XBlock
The block structure containing the block information z
The variable to be refined
Template parameters:
T
The data type (float or double)
function HaloFluxCPULR
CPU function for applying halo flux correction on the left and right boundaries.
Parameters:
XParam
The model parametersib
The index of the blockXBlock
The block structure containing the block informationz
The variable to be refined
function HaloFluxGPUBT
GPU kernel for applying halo flux correction on the top and bottom boundaries of all active blocks.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to be refined
Template parameters:
T
The data type (float or double)
function HaloFluxGPUBTnew
GPU kernel for applying halo flux correction on the top and bottom boundaries of all active blocks.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to be refined
Template parameters:
T
The data type (float or double)
function HaloFluxGPULR
Wrapping function for applying halo flux correction on the left and right boundaries of all active blocks.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to be refined
Template parameters:
T
The data type (float or double)
function HaloFluxGPULRnew
GPU kernel for applying halo flux correction on the left and right boundaries of all active blocks.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to be refined
Template parameters:
T
The data type (float or double)
function RecalculateZs
Recalculate water surface after recalculating the values on the halo on the CPU.
template<class T>
void RecalculateZs (
Param XParam,
BlockP < T > XBlock,
EvolvingP < T > Xev,
T * zb
)
Recalculate water surface after recalculating the values on the halo on the GPU.
!
Description
Recalculate water surface after recalculating the values on the halo on the CPU. zb (bottom elevation) on each halo is calculated at the start of the loop or as part of the initial condition. When conserve-elevation is not required, only h is recalculated on the halo at ever 1/2 steps. zs then needs to be recalculated to obtain a mass-conservative solution (if zs is conserved then mass conservation is not garanteed)
Warning:
This function calculate zs everywhere in the block... this is a bit unecessary. Instead it should recalculate only where there is a prolongation or a restiction
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationXev
The evolving structure containing the evolving variableszb
The bottom elevation variable
Template parameters:
T
The data type (float or double)
!
Description
Recalculate water surface after recalculating the values on the halo on the CPU. zb (bottom elevation) on each halo is calculated at the start of the loop or as part of the initial condition. When conserve-elevation is not required, only h is recalculated on the halo at ever 1/2 steps. zs then needs to be recalculated to obtain a mass-conservative solution (if zs is conserved then mass conservation is not garanteed)
Warning:
This function calculate zs everywhere in the block... this is a bit unecessary. Instead it should recalculate only where there is a prolongation or a restiction
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationXev
The evolving structure containing the evolving variableszb
The bottom elevation variable
Template parameters:
T
The data type (float or double)
function RecalculateZs< double >
template void RecalculateZs< double > (
Param XParam,
BlockP < double > XBlock,
EvolvingP < double > Xev,
double * zb
)
function RecalculateZs< float >
template void RecalculateZs< float > (
Param XParam,
BlockP < float > XBlock,
EvolvingP < float > Xev,
float * zb
)
function RecalculateZsGPU
template<class T>
__global__ void RecalculateZsGPU (
Param XParam,
BlockP < T > XBlock,
EvolvingP < T > Xev,
T * zb
)
function RecalculateZsGPU< double >
template __global__ void RecalculateZsGPU< double > (
Param XParam,
BlockP < double > XBlock,
EvolvingP < double > Xev,
double * zb
)
function RecalculateZsGPU< float >
template __global__ void RecalculateZsGPU< float > (
Param XParam,
BlockP < float > XBlock,
EvolvingP < float > Xev,
float * zb
)
function Recalculatehh
Recalculate water depth after recalculating the values on the halo on the CPU.
template<class T>
void Recalculatehh (
Param XParam,
BlockP < T > XBlock,
EvolvingP < T > Xev,
T * zb
)
Description
Recalculate water depth after recalculating the values on the halo on the CPU. zb (bottom elevation) on each halo is calculated at the start of the loop or as part of the initial condition. When conserve-elevation is not required, only h is recalculated on the halo at ever 1/2 steps. zs then needs to be recalculated to obtain a mass-conservative solution (if zs is conserved then mass conservation is not garanteed)
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationXev
The evolving structure containing the evolving variableszb
The bottom elevation variable
Template parameters:
T
The data type (float or double)
function Recalculatehh< double >
template void Recalculatehh< double > (
Param XParam,
BlockP < double > XBlock,
EvolvingP < double > Xev,
double * zb
)
function Recalculatehh< float >
template void Recalculatehh< float > (
Param XParam,
BlockP < float > XBlock,
EvolvingP < float > Xev,
float * zb
)
function bndmaskGPU
Wrapping function for applying boundary masks to flux variables on GPU.
template<class T>
void bndmaskGPU (
Param XParam,
BlockP < T > XBlock,
EvolvingP < T > Xev,
FluxP < T > Flux
)
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationXev
The evolving structure containing the evolving variablesFlux
The flux structure containing the flux variables
Template parameters:
T
The data type (float or double)
function bndmaskGPU< double >
template void bndmaskGPU< double > (
Param XParam,
BlockP < double > XBlock,
EvolvingP < double > Xev,
FluxP < double > Flux
)
function bndmaskGPU< float >
template void bndmaskGPU< float > (
Param XParam,
BlockP < float > XBlock,
EvolvingP < float > Xev,
FluxP < float > Flux
)
function fillBot
Function to fill the bottom halo region of a block, handling various neighbor configurations.
Parameters:
XParam
The parameters of the grid and blocksib
The index of the current blockXBlock
The block structure containing neighbor informationz
The variable to be refinedT
The data type of the variable (e.g., float, double)
function fillBot
CUDA kernel to fill the bottom halo region of blocks in parallel, handling various neighbor configurations.
template<class T>
__global__ void fillBot (
int halowidth,
int * active,
int * level,
int * botleft,
int * botright,
int * topleft,
int * lefttop,
int * righttop,
T * a
)
Parameters:
halowidth
The width of the halo regionactive
The array of active block indiceslevel
The array of block levelsbotleft
The array of bottom left neighbor block indicesbotright
The array of bottom right neighbor block indicestopleft
The array of top left neighbor block indiceslefttop
The array of left top neighbor block indicesrighttop
The array of right top neighbor block indicesa
The variable to be refinedT
The data type of the variable (e.g., float, double)
function fillBot< double >
template __global__ void fillBot< double > (
int halowidth,
int * active,
int * level,
int * botleft,
int * botright,
int * topleft,
int * lefttop,
int * righttop,
double * a
)
function fillBot< float >
template __global__ void fillBot< float > (
int halowidth,
int * active,
int * level,
int * botleft,
int * botright,
int * topleft,
int * lefttop,
int * righttop,
float * a
)
function fillBotFlux
Fills the bottom halo region of a block, handling various neighbor configurations.
template<class T>
void fillBotFlux (
Param XParam,
bool doProlongation,
int ib,
BlockP < T > XBlock,
T *& z
)
Parameters:
XParam
The parameters of the grid/block structuredoProlongation
Flag indicating whether to perform prolongationib
The index of the current blockXBlock
The block structure containing neighbor informationz
The variable to be refinedT
The data type of the variable (e.g., float, double)
function fillBotnew
CUDA kernel to fill the bottom halo region of blocks in parallel for new refinement, handling various neighbor configurations, new version.
template<class T>
__global__ void fillBotnew (
int halowidth,
int nblk,
int * active,
int * level,
int * botleft,
int * botright,
int * topleft,
int * lefttop,
int * righttop,
T * a
)
Parameters:
halowidth
The width of the halo regionnblk
The number of active blocksactive
The array of active block indiceslevel
The array of block levelsbotleft
The array of bottom left neighbor block indicesbotright
The array of bottom right neighbor block indicestopleft
The array of top left neighbor block indiceslefttop
The array of left top neighbor block indicesrighttop
The array of right top neighbor block indicesa
The variable to be refinedT
The data type of the variable (e.g., float, double)
function fillBotnew< double >
template __global__ void fillBotnew< double > (
int halowidth,
int nblk,
int * active,
int * level,
int * botleft,
int * botright,
int * topleft,
int * lefttop,
int * righttop,
double * a
)
function fillBotnew< float >
template __global__ void fillBotnew< float > (
int halowidth,
int nblk,
int * active,
int * level,
int * botleft,
int * botright,
int * topleft,
int * lefttop,
int * righttop,
float * a
)
function fillCorners
Function to fill the corner halo regions for all active blocks.
Parameters:
XParam
The parameters of the grid and blocksXBlock
The structure containing block neighbor informationz
The variable to be processed
Template parameters:
T
The data type of the variable (e.g., float, double)
function fillCorners
Function to fill the corner halo regions for all active blocks and all evolving variables.
Parameters:
XParam
The parameters of the grid and blocksXBlock
The structure containing block neighbor informationXev
The structure containing evolving variables
Template parameters:
T
The data type of the variables (e.g., float, double)
function fillCorners
Function to fill the corner halo regions for a specific block, handling various neighbor configurations.
Parameters:
XParam
The parameters of the grid and blocksib
The index of the block to be processedXBlock
The structure containing block neighbor informationz
The variable to be processedT
The data type of the variable (e.g., float, double)
function fillCorners< double >
function fillCorners< double >
template void fillCorners< double > (
Param XParam,
BlockP < double > XBlock,
EvolvingP < double > & Xev
)
function fillCorners< double >
function fillCorners< float >
function fillCorners< float >
template void fillCorners< float > (
Param XParam,
BlockP < float > XBlock,
EvolvingP < float > & Xev
)
function fillCorners< float >
function fillCornersGPU
CUDA kernel to fill the corner halo regions for all active blocks in parallel, handling various neighbor configurations.
Parameters:
XParam
The parameters of the grid and blocksXBlock
The structure containing block neighbor informationz
The variable to be processedT
The data type of the variable (e.g., float, double)
function fillCornersGPU< double >
template __global__ void fillCornersGPU< double > (
Param XParam,
BlockP < double > XBlock,
double * z
)
function fillCornersGPU< float >
template __global__ void fillCornersGPU< float > (
Param XParam,
BlockP < float > XBlock,
float * z
)
function fillHalo
Wrapping function for calculating halos for each block and each variable on CPU.
Description
This function is a wraping fuction of the halo functions on CPU. It is called from the main Halo function. It uses multithreading to calculate the halos of the 4 variables in parallel.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationXev
The evolving structure containing the evolving variableszb
The bottom elevation variable
Template parameters:
T
The data type (float or double)
function fillHalo
Wrapping function for calculating halos for each block and each variable on CPU.
Description
This function is a wraping fuction of the halo functions on CPU. It is called from the main Halo function. It uses multithreading to calculate the halos of the 4 variables in parallel.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationXev
The evolving structure containing the evolving variables
Template parameters:
T
The data type (float or double)
function fillHalo
Wrapping function for calculating halos for each block and each variable on CPU.
Description
This function is a wrapping function of the halo functions on CPU. It is called from the main Halo function. It uses multithreading to calculate the halos of the 4 variables in parallel.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationGrad
The gradients structure containing the gradients
Template parameters:
T
The data type (float or double)
function fillHalo
Wrapping function for calculating flux halos for each block and each variable on CPU.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationFlux
The flux structure containing the flux variables
Template parameters:
T
The data type (float or double)
function fillHalo< double >
template void fillHalo< double > (
Param XParam,
BlockP < double > XBlock,
EvolvingP < double > Xev,
double * zb
)
function fillHalo< double >
template void fillHalo< double > (
Param XParam,
BlockP < double > XBlock,
EvolvingP < double > Xev
)
function fillHalo< double >
template void fillHalo< double > (
Param XParam,
BlockP < double > XBlock,
GradientsP < double > Grad
)
function fillHalo< double >
function fillHalo< float >
template void fillHalo< float > (
Param XParam,
BlockP < float > XBlock,
EvolvingP < float > Xev,
float * zb
)
function fillHalo< float >
function fillHalo< float >
template void fillHalo< float > (
Param XParam,
BlockP < float > XBlock,
GradientsP < float > Grad
)
function fillHalo< float >
function fillHaloBTFluxC
Wrapping function for calculating flux for halos for each block of a single variable on GPU.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to work on
Note:
For flux term and actually most terms, only top and right neighbours are needed!
function fillHaloBTFluxC< double >
function fillHaloBTFluxC< float >
function fillHaloBotTopGPU
Wrapping function for calculating flux for halos for each block of a single variable on GPU.
template<class T>
void fillHaloBotTopGPU (
Param XParam,
BlockP < T > XBlock,
cudaStream_t stream,
T * z
)
Description
This function is a wraping function of the halo flux functions on GPU. It is called from the main Halo GPU function. The present imnplementation is naive and slow one that calls the rather complex fillLeft type functions
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationstream
The cuda stream to usez
The variable to work on
function fillHaloBotTopGPU< double >
template void fillHaloBotTopGPU< double > (
Param XParam,
BlockP < double > XBlock,
cudaStream_t stream,
double * z
)
function fillHaloBotTopGPU< float >
template void fillHaloBotTopGPU< float > (
Param XParam,
BlockP < float > XBlock,
cudaStream_t stream,
float * z
)
function fillHaloBotTopGPUnew
Wrapping function for calculating flux for halos for each block of a single variable on GPU. New version.
template<class T>
void fillHaloBotTopGPUnew (
Param XParam,
BlockP < T > XBlock,
cudaStream_t stream,
T * z
)
Description
This function is a wraping function of the halo flux functions on GPU. It is called from the main Halo GPU function. The present imnplementation is naive and slow one that calls the rather complex fillLeft type functions
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationstream
The cuda stream to usez
The variable to work on
function fillHaloBotTopGPUnew< double >
template void fillHaloBotTopGPUnew< double > (
Param XParam,
BlockP < double > XBlock,
cudaStream_t stream,
double * z
)
function fillHaloBotTopGPUnew< float >
template void fillHaloBotTopGPUnew< float > (
Param XParam,
BlockP < float > XBlock,
cudaStream_t stream,
float * z
)
function fillHaloC
Wrapping function for calculating halos for each block of a single variable on CPU.
!
Description
This function is a wraping fuction of the halo functions on CPU. It is called from the main Halo CPU function. This is layer 2 of 3 wrap so the candy doesn't stick too much.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to work on
function fillHaloC< double >
function fillHaloC< float >
function fillHaloD
Wrapping function for calculating halos on CPU on every side of a block of a single variable.
!
Description
This fuction is a wraping fuction of the halo functions for CPU. It is called from another wraping function to keep things clean. In a sense this is the third (and last) layer of wrapping
Parameters:
XParam
The model parametersib
The block index to work onXBlock
The block structure containing the block informationz
The variable to work on
function fillHaloD< double >
function fillHaloD< float >
function fillHaloF
Wrapping function for calculating flux in the halos for a block and a single variable on CPU.
!
Deprecated
This function is was never sucessful and will never be used. It is fundamentally flawed because is doesn't preserve the balance of fluxes on the restiction interface. It should be deleted soon.
function fillHaloF< double >
template void fillHaloF< double > (
Param XParam,
bool doProlongation,
BlockP < double > XBlock,
double * z
)
function fillHaloF< float >
template void fillHaloF< float > (
Param XParam,
bool doProlongation,
BlockP < float > XBlock,
float * z
)
function fillHaloGPU
Wrapping function for calculating halos for each block of a single variable on GPU.
template<class T>
void fillHaloGPU (
Param XParam,
BlockP < T > XBlock,
cudaStream_t stream,
T * z
)
!
Description
This function is a wraping fuction of the halo functions on GPU. It is called from the main Halo GPU function. The present imnplementation is naive and slow one that calls the rather complex fillLeft type functions
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationstream
The cuda stream to usez
The variable to work on
function fillHaloGPU
Wrapping function for calculating halos for each block of a single variable on GPU.
Deprecated
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationstream
The cuda stream to usez
The variable to work on
function fillHaloGPU
Wrapping function for calculating halos for each block and each variable on GPU.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationXev
The evolving structure containing the evolving variables
Template parameters:
T
The data type (float or double)
function fillHaloGPU
Wrapping function for calculating halos for each block and each variable on GPU.
template<class T>
void fillHaloGPU (
Param XParam,
BlockP < T > XBlock,
EvolvingP < T > Xev,
T * zb
)
Description
This function is a wraping fuction of the halo functions on GPU. It is called from the main Halo GPU function. It uses multiple cuda streams to calculate the halos of the 4 variables in parallel. After filling the halos, it applies either the elevation conservation or wet-dry fix if enabled in parameters. Finally, it recalculates the surface elevation zs based on the updated water depth h and bottom elevation zb.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationXev
The evolving structure containing the evolving variableszb
The bottom elevation variable
Template parameters:
T
The data type (float or double)
function fillHaloGPU
Wrapping function for calculating halos for each block and each variable on GPU.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationGrad
The gradients structure containing the gradients
Template parameters:
T
The data type (float or double)
function fillHaloGPU
Wrapping function for calculating flux halos for each block and each variable on GPU.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationFlux
The flux structure containing the flux variables
Template parameters:
T
The data type (float or double)
function fillHaloGPU< double >
template void fillHaloGPU< double > (
Param XParam,
BlockP < double > XBlock,
cudaStream_t stream,
double * z
)
function fillHaloGPU< double >
function fillHaloGPU< double >
template void fillHaloGPU< double > (
Param XParam,
BlockP < double > XBlock,
EvolvingP < double > Xev
)
function fillHaloGPU< double >
template void fillHaloGPU< double > (
Param XParam,
BlockP < double > XBlock,
EvolvingP < double > Xev,
double * zb
)
function fillHaloGPU< double >
template void fillHaloGPU< double > (
Param XParam,
BlockP < double > XBlock,
GradientsP < double > Grad
)
function fillHaloGPU< double >
template void fillHaloGPU< double > (
Param XParam,
BlockP < double > XBlock,
FluxP < double > Flux
)
function fillHaloGPU< float >
template void fillHaloGPU< float > (
Param XParam,
BlockP < float > XBlock,
cudaStream_t stream,
float * z
)
function fillHaloGPU< float >
function fillHaloGPU< float >
template void fillHaloGPU< float > (
Param XParam,
BlockP < float > XBlock,
EvolvingP < float > Xev
)
function fillHaloGPU< float >
template void fillHaloGPU< float > (
Param XParam,
BlockP < float > XBlock,
EvolvingP < float > Xev,
float * zb
)
function fillHaloGPU< float >
template void fillHaloGPU< float > (
Param XParam,
BlockP < float > XBlock,
GradientsP < float > Grad
)
function fillHaloGPU< float >
function fillHaloGPUnew
Wrapping function for calculating halos for each block of a single variable on GPU. New version.
template<class T>
void fillHaloGPUnew (
Param XParam,
BlockP < T > XBlock,
cudaStream_t stream,
T * z
)
!
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationstream
The cuda stream to usez
The variable to work on
function fillHaloGPUnew< double >
template void fillHaloGPUnew< double > (
Param XParam,
BlockP < double > XBlock,
cudaStream_t stream,
double * z
)
function fillHaloGPUnew< float >
template void fillHaloGPUnew< float > (
Param XParam,
BlockP < float > XBlock,
cudaStream_t stream,
float * z
)
function fillHaloLRFluxC
Wrapping function for calculating flux for halos for each block of a single variable on GPU.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to work on
Note:
For flux term and actually most terms, only top and right neighbours are needed!
function fillHaloLRFluxC< double >
function fillHaloLRFluxC< float >
function fillHaloLeftRightGPU
Wrapping function for calculating for halos for each block of a single variable on GPU.
template<class T>
void fillHaloLeftRightGPU (
Param XParam,
BlockP < T > XBlock,
cudaStream_t stream,
T * z
)
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationstream
The cuda stream to usez
The variable to work on
Note:
For flux term and actually most terms, only top and right neighbours are needed!
function fillHaloLeftRightGPU< double >
template void fillHaloLeftRightGPU< double > (
Param XParam,
BlockP < double > XBlock,
cudaStream_t stream,
double * z
)
function fillHaloLeftRightGPU< float >
template void fillHaloLeftRightGPU< float > (
Param XParam,
BlockP < float > XBlock,
cudaStream_t stream,
float * z
)
function fillHaloLeftRightGPUnew
Wrapping function for calculating for halos for each block of a single variable on GPU. New version.
template<class T>
void fillHaloLeftRightGPUnew (
Param XParam,
BlockP < T > XBlock,
cudaStream_t stream,
T * z
)
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationstream
The cuda stream to usez
The variable to work on
function fillHaloLeftRightGPUnew< double >
template void fillHaloLeftRightGPUnew< double > (
Param XParam,
BlockP < double > XBlock,
cudaStream_t stream,
double * z
)
function fillHaloLeftRightGPUnew< float >
template void fillHaloLeftRightGPUnew< float > (
Param XParam,
BlockP < float > XBlock,
cudaStream_t stream,
float * z
)
function fillHaloTopRightC
Wrapping function for calculating flux for halos for each block of a single variable on GPU.
Description
This function is a wraping function of the halo flux functions on GPU. It is called from the main Halo GPU function. The present imnplementation is naive and slow one that calls the rather complex fillLeft type functions
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to work on
Note:
For flux term and actually most terms, only top and right neighbours are needed!
function fillHaloTopRightC< double >
function fillHaloTopRightC< float >
function fillHaloTopRightGPU
Wrapping function for calculating flux for halos for each block of a single variable on GPU.
template<class T>
void fillHaloTopRightGPU (
Param XParam,
BlockP < T > XBlock,
cudaStream_t stream,
T * z
)
Parameters:
XParam
The model parameters-
XBlock
The block structure containing the block information -
stream
The cuda stream to use z
The variable to work on
Note:
For flux term and actually most terms, only top and right neighbours are needed!
function fillHaloTopRightGPU< double >
template void fillHaloTopRightGPU< double > (
Param XParam,
BlockP < double > XBlock,
cudaStream_t stream,
double * z
)
function fillHaloTopRightGPU< float >
template void fillHaloTopRightGPU< float > (
Param XParam,
BlockP < float > XBlock,
cudaStream_t stream,
float * z
)
function fillLeft
Applying halo flux correction on the left boundaries of all active blocks on GPU.
Parameters:
XParam
The model parametersib
The block indexXBlock
The block structure containing the block informationz
The variable to be refined
Template parameters:
T
The data type (float or double)
function fillLeft
GPU kernel for applying halo flux correction on the left boundaries of all active blocks.
template<class T>
__global__ void fillLeft (
int halowidth,
int * active,
int * level,
int * leftbot,
int * lefttop,
int * rightbot,
int * botright,
int * topright,
T * a
)
Parameters:
halowidth
The width of the halo regionactive
The array of active block indiceslevel
The array of block levelsleftbot
The array of left bottom neighbor block indiceslefttop
The array of left top neighbor block indicesrightbot
The array of right bottom neighbor block indicesbotright
The array of bottom right neighbor block indicestopright
The array of top right neighbor block indicesa
The variable to be refinedT
The data type (float or double)
function fillLeft< double >
template __global__ void fillLeft< double > (
int halowidth,
int * active,
int * level,
int * leftbot,
int * lefttop,
int * rightbot,
int * botright,
int * topright,
double * a
)
function fillLeft< float >
template __global__ void fillLeft< float > (
int halowidth,
int * active,
int * level,
int * leftbot,
int * lefttop,
int * rightbot,
int * botright,
int * topright,
float * a
)
function fillLeftFlux
CPU function for applying halo flux correction on the left boundaries of a specific block.
template<class T>
void fillLeftFlux (
Param XParam,
bool doProlongation,
int ib,
BlockP < T > XBlock,
T *& z
)
Parameters:
XParam
The simulation parametersdoProlongation
Flag indicating whether to perform prolongationib
The index of the block to processXBlock
The block structure containing neighbor informationz
The variable to be refined
function fillLeftnew
New way of filling the left halo 2 blocks at a time to maximize GPU occupancy.
template<class T>
__global__ void fillLeftnew (
int halowidth,
int nblk,
int * active,
int * level,
int * leftbot,
int * lefttop,
int * rightbot,
int * botright,
int * topright,
T * a
)
Description
This fuction is a wraping fuction of the halo functions for CPU. It is called from another wraping function to keep things clean. In a sense this is the third (and last) layer of wrapping
Parameters:
halowidth
The width of the halo regionnblk
The number of active blocksactive
The array of active block indiceslevel
The array of block levelsleftbot
The array of left bottom neighbor block indiceslefttop
The array of left top neighbor block indicesrightbot
The array of right bottom neighbor block indicesbotright
The array of bottom right neighbor block indicestopright
The array of top right neighbor block indicesa
The variable to be refined
function fillLeftnew< double >
template __global__ void fillLeftnew< double > (
int halowidth,
int nblk,
int * active,
int * level,
int * leftbot,
int * lefttop,
int * rightbot,
int * botright,
int * topright,
double * a
)
function fillLeftnew< float >
template __global__ void fillLeftnew< float > (
int halowidth,
int nblk,
int * active,
int * level,
int * leftbot,
int * lefttop,
int * rightbot,
int * botright,
int * topright,
float * a
)
function fillRight
Fills the right halo region of a block.
Parameters:
XParam
The simulation parametersib
The index of the block to processXBlock
The block structure containing neighbor informationz
The variable to be refined
function fillRight
CUDA kernel to fill the right halo region of blocks in parallel.
template<class T>
__global__ void fillRight (
int halowidth,
int * active,
int * level,
int * rightbot,
int * righttop,
int * leftbot,
int * botleft,
int * topleft,
T * a
)
Parameters:
halowidth
The width of the halo regionactive
The array of active block indiceslevel
The array of block levelsrightbot
The array of right bottom neighbor block indicesrighttop
The array of right top neighbor block indicesleftbot
The array of left bottom neighbor block indicesbotleft
The array of bottom left neighbor block indicestopleft
The array of top left neighbor block indicesa
The variable to be refined
Template parameters:
T
The data type of the variable (e.g., float, double)
function fillRight< double >
template __global__ void fillRight< double > (
int halowidth,
int * active,
int * level,
int * rightbot,
int * righttop,
int * leftbot,
int * botleft,
int * topleft,
double * a
)
function fillRight< float >
template __global__ void fillRight< float > (
int halowidth,
int * active,
int * level,
int * rightbot,
int * righttop,
int * leftbot,
int * botleft,
int * topleft,
float * a
)
function fillRightFlux
Function to fill the right halo region of a block, handling various neighbor configurations.
template<class T>
void fillRightFlux (
Param XParam,
bool doProlongation,
int ib,
BlockP < T > XBlock,
T *& z
)
Parameters:
XParam
The parameters of the grid and blocksdoProlongation
Flag indicating whether to perform prolongationib
The index of the current blockXBlock
The block structure containing neighbor informationz
The variable to be refined
Template parameters:
T
The data type of the variable (e.g., float, double)
function fillRightFlux
CUDA kernel to fill the right halo region of blocks in parallel for flux variables, handling various neighbor configurations.
template<class T>
__global__ void fillRightFlux (
int halowidth,
bool doProlongation,
int * active,
int * level,
int * rightbot,
int * righttop,
int * leftbot,
int * botleft,
int * topleft,
T * a
)
Parameters:
halowidth
The width of the halo regiondoProlongation
Flag indicating whether to perform prolongationactive
The array of active block indiceslevel
The array of block levelsrightbot
The array of right bottom neighbor block indicesrighttop
The array of right top neighbor block indicesleftbot
The array of left bottom neighbor block indicesbotleft
The array of bottom left neighbor block indicestopleft
The array of top left neighbor block indicesa
The variable to be refinedT
The data type of the variable (e.g., float, double)
function fillRightFlux< double >
template void fillRightFlux< double > (
Param XParam,
bool doProlongation,
int ib,
BlockP < double > XBlock,
double *& z
)
function fillRightFlux< double >
template __global__ void fillRightFlux< double > (
int halowidth,
bool doProlongation,
int * active,
int * level,
int * rightbot,
int * righttop,
int * leftbot,
int * botleft,
int * topleft,
double * a
)
function fillRightFlux< float >
template void fillRightFlux< float > (
Param XParam,
bool doProlongation,
int ib,
BlockP < float > XBlock,
float *& z
)
function fillRightFlux< float >
template __global__ void fillRightFlux< float > (
int halowidth,
bool doProlongation,
int * active,
int * level,
int * rightbot,
int * righttop,
int * leftbot,
int * botleft,
int * topleft,
float * a
)
function fillRightnew
CUDA kernel to fill the right halo region of blocks in parallel (new version).
template<class T>
__global__ void fillRightnew (
int halowidth,
int nblk,
int * active,
int * level,
int * rightbot,
int * righttop,
int * leftbot,
int * botleft,
int * topleft,
T * a
)
Parameters:
halowidth
The width of the halo regionnblk
The number of active blocksactive
The array of active block indiceslevel
The array of block levelsrightbot
The array of right bottom neighbor block indicesrighttop
The array of right top neighbor block indicesleftbot
The array of left bottom neighbor block indicesbotleft
The array of bottom left neighbor block indicestopleft
The array of top left neighbor block indicesa
The variable to be refined
Template parameters:
T
The data type of the variable (e.g., float, double)
function fillRightnew< double >
template __global__ void fillRightnew< double > (
int halowidth,
int nblk,
int * active,
int * level,
int * rightbot,
int * righttop,
int * leftbot,
int * botleft,
int * topleft,
double * a
)
function fillRightnew< float >
template __global__ void fillRightnew< float > (
int halowidth,
int nblk,
int * active,
int * level,
int * rightbot,
int * righttop,
int * leftbot,
int * botleft,
int * topleft,
float * a
)
function fillTop
Fills the top halo region of a block, handling various neighbor configurations.
Parameters:
XParam
The parameters of the grid/block structureib
The index of the current blockXBlock
The block structure containing neighbor informationz
The variable to be refinedT
The data type of the variable (e.g., float, double)
function fillTop
CUDA kernel to fill the top halo region of blocks in parallel for new refinement, handling various neighbor configurations, new version.
template<class T>
__global__ void fillTop (
int halowidth,
int * active,
int * level,
int * topleft,
int * topright,
int * botleft,
int * leftbot,
int * rightbot,
T * a
)
Parameters:
halowidth
The width of the halo regionactive
The array of active block indiceslevel
The array of block levelstopleft
The array of top left neighbor block indicestopright
The array of top right neighbor block indicesbotleft
The array of bottom left neighbor block indicesleftbot
The array of left bottom neighbor block indicesrightbot
The array of right bottom neighbor block indicesa
The variable to be refinedT
The data type of the variable (e.g., float, double)
function fillTop< double >
template __global__ void fillTop< double > (
int halowidth,
int * active,
int * level,
int * topleft,
int * topright,
int * botleft,
int * leftbot,
int * rightbot,
double * a
)
function fillTop< float >
template __global__ void fillTop< float > (
int halowidth,
int * active,
int * level,
int * topleft,
int * topright,
int * botleft,
int * leftbot,
int * rightbot,
float * a
)
function fillTopFlux
Function to fill the top halo region of a block for new refinement, handling various neighbor configurations.
template<class T>
void fillTopFlux (
Param XParam,
bool doProlongation,
int ib,
BlockP < T > XBlock,
T *& z
)
Parameters:
XParam
The parameters of the grid and blocksdoProlongation
Flag indicating whether to perform prolongationib
The index of the block to be processedXBlock
The structure containing block neighbor informationz
The variable to be refined
Template parameters:
T
The data type of the variable (e.g., float, double)
function fillTopFlux
CUDA kernel to fill the top halo region of blocks in parallel for new refinement, handling various neighbor configurations, new version.
template<class T>
__global__ void fillTopFlux (
int halowidth,
bool doProlongation,
int * active,
int * level,
int * topleft,
int * topright,
int * botleft,
int * leftbot,
int * rightbot,
T * a
)
Parameters:
halowidth
The width of the halo regiondoProlongation
Flag indicating whether to perform prolongationactive
The array of active block indiceslevel
The array of block levelstopleft
The array of top left neighbor block indicestopright
The array of top right neighbor block indicesbotleft
The array of bottom left neighbor block indicesleftbot
The array of left bottom neighbor block indicesrightbot
The array of right bottom neighbor block indicesa
The variable to be refinedT
The data type of the variable (e.g., float, double)
function fillTopFlux< double >
template void fillTopFlux< double > (
Param XParam,
bool doProlongation,
int ib,
BlockP < double > XBlock,
double *& z
)
function fillTopFlux< double >
template __global__ void fillTopFlux< double > (
int halowidth,
bool doProlongation,
int * active,
int * level,
int * topleft,
int * topright,
int * botleft,
int * leftbot,
int * rightbot,
double * a
)
function fillTopFlux< float >
template void fillTopFlux< float > (
Param XParam,
bool doProlongation,
int ib,
BlockP < float > XBlock,
float *& z
)
function fillTopFlux< float >
template __global__ void fillTopFlux< float > (
int halowidth,
bool doProlongation,
int * active,
int * level,
int * topleft,
int * topright,
int * botleft,
int * leftbot,
int * rightbot,
float * a
)
function fillTopnew
template<class T>
__global__ void fillTopnew (
int halowidth,
int nblk,
int * active,
int * level,
int * topleft,
int * topright,
int * botleft,
int * leftbot,
int * rightbot,
T * a
)
function fillTopnew< double >
template __global__ void fillTopnew< double > (
int halowidth,
int nblk,
int * active,
int * level,
int * topleft,
int * topright,
int * botleft,
int * leftbot,
int * rightbot,
double * a
)
function fillTopnew< float >
template __global__ void fillTopnew< float > (
int halowidth,
int nblk,
int * active,
int * level,
int * topleft,
int * topright,
int * botleft,
int * leftbot,
int * rightbot,
float * a
)
function refine_linear
Wrapping function for refining all sides of active blocks using linear reconstruction.
template<class T>
void refine_linear (
Param XParam,
BlockP < T > XBlock,
T * z,
T * dzdx,
T * dzdy
)
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to be refineddzdx
The gradient of z in the x directiondzdy
The gradient of z in the y direction
Template parameters:
T
The data type (float or double)
function refine_linear< double >
template void refine_linear< double > (
Param XParam,
BlockP < double > XBlock,
double * z,
double * dzdx,
double * dzdy
)
function refine_linear< float >
template void refine_linear< float > (
Param XParam,
BlockP < float > XBlock,
float * z,
float * dzdx,
float * dzdy
)
function refine_linearGPU
Wrapping function for refining all sides of active blocks using linear reconstruction on GPU.
template<class T>
void refine_linearGPU (
Param XParam,
BlockP < T > XBlock,
T * z,
T * dzdx,
T * dzdy
)
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to be refineddzdx
The gradient of z in the x directiondzdy
The gradient of z in the y direction
Template parameters:
T
The data type (float or double)
function refine_linearGPU< double >
template void refine_linearGPU< double > (
Param XParam,
BlockP < double > XBlock,
double * z,
double * dzdx,
double * dzdy
)
function refine_linearGPU< float >
template void refine_linearGPU< float > (
Param XParam,
BlockP < float > XBlock,
float * z,
float * dzdx,
float * dzdy
)
function refine_linear_Bot
Refine a block on the bottom side using linear reconstruction.
template<class T>
void refine_linear_Bot (
Param XParam,
int ib,
BlockP < T > XBlock,
T * z,
T * dzdx,
T * dzdy
)
Description
This function refines a block on the bottom side using linear reconstruction. It checks if the neighboring block on the bottom is at a coarser level. If so, it calculates the new values for the bottom boundary of the current block using the gradients in the x and y directions. The new values are computed based on the distance to the neighboring block and the gradients, ensuring a smooth transition between different resolution levels.
Parameters:
XParam
The model parametersib
The index of the current blockXBlock
The block structure containing the block informationz
The variable to be refineddzdx
The gradient of z in the x directiondzdy
The gradient of z in the y direction
function refine_linear_Bot< double >
template void refine_linear_Bot< double > (
Param XParam,
int ib,
BlockP < double > XBlock,
double * z,
double * dzdx,
double * dzdy
)
function refine_linear_Bot< float >
template void refine_linear_Bot< float > (
Param XParam,
int ib,
BlockP < float > XBlock,
float * z,
float * dzdx,
float * dzdy
)
function refine_linear_BotGPU
GPU kernel to refine a block on the bottom side using linear reconstruction.
template<class T>
__global__ void refine_linear_BotGPU (
Param XParam,
BlockP < T > XBlock,
T * z,
T * dzdx,
T * dzdy
)
Description
This GPU kernel refines a block on the bottom side using linear reconstruction. It checks if the neighboring block on the bottom is at a coarser level. If so, it calculates the new values for the bottom boundary of the current block using the gradients in the x and y directions. The new values are computed based on the distance to the neighboring block and the gradients, ensuring a smooth transition between different resolution levels. Each thread processes a specific column of the block, allowing for parallel computation across multiple blocks.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to be refineddzdx
The gradient of z in the x directiondzdy
The gradient of z in the y direction
function refine_linear_BotGPU< double >
template __global__ void refine_linear_BotGPU< double > (
Param XParam,
BlockP < double > XBlock,
double * z,
double * dzdx,
double * dzdy
)
function refine_linear_BotGPU< float >
template __global__ void refine_linear_BotGPU< float > (
Param XParam,
BlockP < float > XBlock,
float * z,
float * dzdx,
float * dzdy
)
function refine_linear_Left
Refine a block on the left side using linear reconstruction.
template<class T>
void refine_linear_Left (
Param XParam,
int ib,
BlockP < T > XBlock,
T * z,
T * dzdx,
T * dzdy
)
Description
This function refines a block on the left side using linear reconstruction. It checks if the neighboring block on the left is at a coarser level. If so, it calculates the new values for the left boundary of the current block using the gradients in the x and y directions. The new values are computed based on the distance to the neighboring block and the gradients, ensuring a smooth transition between different resolution levels.
Parameters:
XParam
The model parametersib
The index of the current blockXBlock
The block structure containing the block informationz
The variable to be refineddzdx
The gradient of z in the x directiondzdy
The gradient of z in the y direction
Template parameters:
T
The data type (float or double)
function refine_linear_Left< double >
template void refine_linear_Left< double > (
Param XParam,
int ib,
BlockP < double > XBlock,
double * z,
double * dzdx,
double * dzdy
)
function refine_linear_Left< float >
template void refine_linear_Left< float > (
Param XParam,
int ib,
BlockP < float > XBlock,
float * z,
float * dzdx,
float * dzdy
)
function refine_linear_LeftGPU
GPU kernel to refine a block on the left side using linear reconstruction.
template<class T>
__global__ void refine_linear_LeftGPU (
Param XParam,
BlockP < T > XBlock,
T * z,
T * dzdx,
T * dzdy
)
Description
This GPU kernel refines a block on the left side using linear reconstruction. It checks if the neighboring block on the left is at a coarser level. If so, it calculates the new values for the left boundary of the current block using the gradients in the x and y directions. The new values are computed based on the distance to the neighboring block and the gradients, ensuring a smooth transition between different resolution levels. Each thread processes a specific row of the block, allowing for parallel computation across multiple blocks.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to be refineddzdx
The gradient of z in the x directiondzdy
The gradient of z in the y directionT
The data type (float or double)
function refine_linear_LeftGPU< double >
template __global__ void refine_linear_LeftGPU< double > (
Param XParam,
BlockP < double > XBlock,
double * z,
double * dzdx,
double * dzdy
)
function refine_linear_LeftGPU< float >
template __global__ void refine_linear_LeftGPU< float > (
Param XParam,
BlockP < float > XBlock,
float * z,
float * dzdx,
float * dzdy
)
function refine_linear_Right
Refine a block on the right side using linear reconstruction.
template<class T>
void refine_linear_Right (
Param XParam,
int ib,
BlockP < T > XBlock,
T * z,
T * dzdx,
T * dzdy
)
Description
This function refines a block on the right side using linear reconstruction. It checks if the neighboring block on the right is at a coarser level. If so, it calculates the new values for the right boundary of the current block using the gradients in the x and y directions. The new values are computed based on the distance to the neighboring block and the gradients, ensuring a smooth transition between different resolution levels.
Parameters:
XParam
The model parametersib
The index of the current blockXBlock
The block structure containing the block informationz
The variable to be refineddzdx
The gradient of z in the x directiondzdy
The gradient of z in the y direction
Template parameters:
T
The data type (float or double)
function refine_linear_Right< double >
template void refine_linear_Right< double > (
Param XParam,
int ib,
BlockP < double > XBlock,
double * z,
double * dzdx,
double * dzdy
)
function refine_linear_Right< float >
template void refine_linear_Right< float > (
Param XParam,
int ib,
BlockP < float > XBlock,
float * z,
float * dzdx,
float * dzdy
)
function refine_linear_RightGPU
GPU kernel to refine a block on the right side using linear reconstruction.
template<class T>
__global__ void refine_linear_RightGPU (
Param XParam,
BlockP < T > XBlock,
T * z,
T * dzdx,
T * dzdy
)
Description
This GPU kernel refines a block on the right side using linear reconstruction. It checks if the neighboring block on the right is at a coarser level. If so, it calculates the new values for the right boundary of the current block using the gradients in the x and y directions. The new values are computed based on the distance to the neighboring block and the gradients, ensuring a smooth transition between different resolution levels. Each thread processes a specific row of the block, allowing for parallel computation across multiple blocks.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to be refineddzdx
The gradient of z in the x directiondzdy
The gradient of z in the y directionT
The data type (float or double)
function refine_linear_RightGPU< double >
template __global__ void refine_linear_RightGPU< double > (
Param XParam,
BlockP < double > XBlock,
double * z,
double * dzdx,
double * dzdy
)
function refine_linear_RightGPU< float >
template __global__ void refine_linear_RightGPU< float > (
Param XParam,
BlockP < float > XBlock,
float * z,
float * dzdx,
float * dzdy
)
function refine_linear_Top
Refine a block on the top side using linear reconstruction.
template<class T>
void refine_linear_Top (
Param XParam,
int ib,
BlockP < T > XBlock,
T * z,
T * dzdx,
T * dzdy
)
Description
This function refines a block on the top side using linear reconstruction. It checks if the neighboring block on the top is at a coarser level. If so, it calculates the new values for the top boundary of the current block using the gradients in the x and y directions. The new values are computed based on the distance to the neighboring block and the gradients, ensuring a smooth transition between different resolution levels.
Parameters:
XParam
The model parametersib
The index of the current blockXBlock
The block structure containing the block informationz
The variable to be refineddzdx
The gradient of z in the x directiondzdy
The gradient of z in the y direction
function refine_linear_Top< double >
template void refine_linear_Top< double > (
Param XParam,
int ib,
BlockP < double > XBlock,
double * z,
double * dzdx,
double * dzdy
)
function refine_linear_Top< float >
template void refine_linear_Top< float > (
Param XParam,
int ib,
BlockP < float > XBlock,
float * z,
float * dzdx,
float * dzdy
)
function refine_linear_TopGPU
GPU kernel to refine a block on the top side using linear reconstruction.
template<class T>
__global__ void refine_linear_TopGPU (
Param XParam,
BlockP < T > XBlock,
T * z,
T * dzdx,
T * dzdy
)
Description
This GPU kernel refines a block on the top side using linear reconstruction. It checks if the neighboring block on the top is at a coarser level. If so, it calculates the new values for the top boundary of the current block using the gradients in the x and y directions. The new values are computed based on the distance to the neighboring block and the gradients, ensuring a smooth transition between different resolution levels. Each thread processes a specific column of the block, allowing for parallel computation across multiple blocks.
Parameters:
XParam
The model parametersXBlock
The block structure containing the block informationz
The variable to be refineddzdx
The gradient of z in the x directiondzdy
The gradient of z in the y directionT
The data type (float or double)
function refine_linear_TopGPU< double >
template __global__ void refine_linear_TopGPU< double > (
Param XParam,
BlockP < double > XBlock,
double * z,
double * dzdx,
double * dzdy
)
function refine_linear_TopGPU< float >
template __global__ void refine_linear_TopGPU< float > (
Param XParam,
BlockP < float > XBlock,
float * z,
float * dzdx,
float * dzdy
)
The documentation for this class was generated from the following file src/Halo.cu