BG_Flood
0.8
Documentation (Work-in-progress)
|
#include "General.h"
#include "Param.h"
#include "Write_txtlog.h"
#include "Util_CPU.h"
#include "Arrays.h"
#include "Mesh.h"
#include "MemManagement.h"
#include "Boundary.h"
#include "ConserveElevation.h"
Go to the source code of this file.
Functions | |
template<class T > | |
void | fillHaloC (Param XParam, BlockP< T > XBlock, T *z) |
Wrapping function for calculating halos for each block of a single variable on CPU. More... | |
template<class T > | |
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. More... | |
template<class T > | |
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. More... | |
template<class T > | |
void | fillHaloGPUnew (Param XParam, BlockP< T > XBlock, cudaStream_t stream, T *z) |
template<class T > | |
void | fillHalo (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev, T *zb) |
template<class T > | |
void | fillHalo (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev) |
template<class T > | |
void | fillHaloGPU (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev) |
template<class T > | |
void | fillHaloGPU (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev, T *zb) |
template<class T > | |
void | fillHalo (Param XParam, BlockP< T > XBlock, GradientsP< T > Grad) |
template<class T > | |
void | fillHaloGPU (Param XParam, BlockP< T > XBlock, GradientsP< T > Grad) |
template<class T > | |
void | fillHalo (Param XParam, BlockP< T > XBlock, FluxP< T > Flux) |
template<class T > | |
void | fillHaloGPU (Param XParam, BlockP< T > XBlock, FluxP< T > Flux) |
template<class T > | |
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. More... | |
template<class T > | |
void | fillHaloTopRightGPU (Param XParam, bool doprolong, BlockP< T > XBlock, cudaStream_t stream, T *z) |
template<class T > | |
void | fillLeft (Param XParam, int ib, BlockP< T > XBlock, T *&z) |
template<class T > | |
void | fillRight (Param XParam, int ib, BlockP< T > XBlock, T *&z) |
template<class T > | |
void | fillBot (Param XParam, int ib, BlockP< T > XBlock, T *&z) |
template<class T > | |
void | fillTop (Param XParam, int ib, BlockP< T > XBlock, T *&z) |
template<class T > | |
void | fillTopFlux (Param XParam, bool doProlongation, int ib, BlockP< T > XBlock, T *&z) |
template<class T > | |
void | fillRightFlux (Param XParam, bool doProlongation, int ib, BlockP< T > XBlock, T *&z) |
template<class T > | |
void | fillCorners (Param XParam, int ib, BlockP< T > XBlock, T *&z) |
template<class T > | |
void | fillCorners (Param XParam, BlockP< T > XBlock, T *&z) |
template<class T > | |
void | fillCorners (Param XParam, BlockP< T > XBlock, EvolvingP< T > &Xev) |
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 CPU. More... | |
template<class T > | |
__global__ void | RecalculateZsGPU (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev, T *zb) |
template<class T > | |
void | Recalculatehh (Param XParam, BlockP< T > XBlock, EvolvingP< T > Xev, T *zb) |
template<class T > | |
void | refine_linear (Param XParam, BlockP< T > XBlock, T *z, T *dzdx, T *dzdy) |
template<class T > | |
void | refine_linearGPU (Param XParam, BlockP< T > XBlock, T *z, T *dzdx, T *dzdy) |
template<class T > | |
void | refine_linear_Left (Param XParam, int ib, BlockP< T > XBlock, T *z, T *dzdx, T *dzdy) |
template<class T > | |
void | refine_linear_Top (Param XParam, int ib, BlockP< T > XBlock, T *z, T *dzdy) |
template<class T > | |
void | refine_linear_Bot (Param XParam, int ib, BlockP< T > XBlock, T *z, T *dzdy) |
template<class T > | |
void | refine_linear_Right (Param XParam, int ib, BlockP< T > XBlock, T *z, T *dzdx) |
template<class T > | |
__global__ void | fillLeft (int halowidth, int *active, int *level, int *leftbot, int *lefttop, int *rightbot, int *botright, int *topright, T *a) |
template<class T > | |
__global__ void | fillRight (int halowidth, int *active, int *level, int *rightbot, int *righttop, int *leftbot, int *botleft, int *topleft, T *a) |
template<class T > | |
__global__ void | fillBot (int halowidth, int *active, int *level, int *botleft, int *botright, int *topleft, int *lefttop, int *righttop, T *a) |
template<class T > | |
__global__ void | fillTop (int halowidth, int *active, int *level, int *topleft, int *topright, int *botleft, int *leftbot, int *rightbot, T *a) |
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) |
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) |
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) |
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) |
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) |
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) |
template<class T > | |
__global__ void | HaloFluxGPULR (Param XParam, BlockP< T > XBlock, T *z) |
template<class T > | |
__global__ void | HaloFluxGPUBT (Param XParam, BlockP< T > XBlock, T *z) |
__global__ void fillBot | ( | int | halowidth, |
int * | active, | ||
int * | level, | ||
int * | botleft, | ||
int * | botright, | ||
int * | topleft, | ||
int * | lefttop, | ||
int * | righttop, | ||
T * | a | ||
) |
__global__ void fillBotnew | ( | int | halowidth, |
int | nblk, | ||
int * | active, | ||
int * | level, | ||
int * | botleft, | ||
int * | botright, | ||
int * | topleft, | ||
int * | lefttop, | ||
int * | righttop, | ||
T * | a | ||
) |
void fillHalo | ( | Param | XParam, |
BlockP< T > | XBlock, | ||
GradientsP< T > | Grad | ||
) |
Wrapping function for calculating flux in the halos for a block and a single variable on CPU.
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
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.
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
void fillHaloGPU | ( | Param | XParam, |
BlockP< T > | XBlock, | ||
EvolvingP< T > | Xev, | ||
T * | zb | ||
) |
void fillHaloGPU | ( | Param | XParam, |
BlockP< T > | XBlock, | ||
GradientsP< T > | Grad | ||
) |
void fillHaloGPUnew | ( | 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.
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
void fillHaloTopRightGPU | ( | Param | XParam, |
bool | doprolong, | ||
BlockP< T > | XBlock, | ||
cudaStream_t | stream, | ||
T * | z | ||
) |
__global__ void fillLeft | ( | int | halowidth, |
int * | active, | ||
int * | level, | ||
int * | leftbot, | ||
int * | lefttop, | ||
int * | rightbot, | ||
int * | botright, | ||
int * | topright, | ||
T * | a | ||
) |
__global__ void fillLeftnew | ( | int | halowidth, |
int | nblk, | ||
int * | active, | ||
int * | level, | ||
int * | leftbot, | ||
int * | lefttop, | ||
int * | rightbot, | ||
int * | botright, | ||
int * | topright, | ||
T * | a | ||
) |
__global__ void fillRight | ( | int | halowidth, |
int * | active, | ||
int * | level, | ||
int * | rightbot, | ||
int * | righttop, | ||
int * | leftbot, | ||
int * | botleft, | ||
int * | topleft, | ||
T * | a | ||
) |
__global__ void fillRightFlux | ( | int | halowidth, |
bool | doProlongation, | ||
int * | active, | ||
int * | level, | ||
int * | rightbot, | ||
int * | righttop, | ||
int * | leftbot, | ||
int * | botleft, | ||
int * | topleft, | ||
T * | a | ||
) |
void fillRightFlux | ( | Param | XParam, |
bool | doProlongation, | ||
int | ib, | ||
BlockP< T > | XBlock, | ||
T *& | z | ||
) |
__global__ void fillRightnew | ( | int | halowidth, |
int | nblk, | ||
int * | active, | ||
int * | level, | ||
int * | rightbot, | ||
int * | righttop, | ||
int * | leftbot, | ||
int * | botleft, | ||
int * | topleft, | ||
T * | a | ||
) |
__global__ void fillTop | ( | int | halowidth, |
int * | active, | ||
int * | level, | ||
int * | topleft, | ||
int * | topright, | ||
int * | botleft, | ||
int * | leftbot, | ||
int * | rightbot, | ||
T * | a | ||
) |
__global__ void fillTopFlux | ( | int | halowidth, |
bool | doProlongation, | ||
int * | active, | ||
int * | level, | ||
int * | topleft, | ||
int * | topright, | ||
int * | botleft, | ||
int * | leftbot, | ||
int * | rightbot, | ||
T * | a | ||
) |
void fillTopFlux | ( | Param | XParam, |
bool | doProlongation, | ||
int | ib, | ||
BlockP< T > | XBlock, | ||
T *& | z | ||
) |
__global__ void fillTopnew | ( | int | halowidth, |
int | nblk, | ||
int * | active, | ||
int * | level, | ||
int * | topleft, | ||
int * | topright, | ||
int * | botleft, | ||
int * | leftbot, | ||
int * | rightbot, | ||
T * | a | ||
) |
void Recalculatehh | ( | Param | XParam, |
BlockP< T > | XBlock, | ||
EvolvingP< T > | Xev, | ||
T * | zb | ||
) |
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.
Recalculate water surface after recalculating the values on the halo on the GPU.
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)
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
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)
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
__global__ void RecalculateZsGPU | ( | Param | XParam, |
BlockP< T > | XBlock, | ||
EvolvingP< T > | Xev, | ||
T * | zb | ||
) |
void refine_linear | ( | Param | XParam, |
BlockP< T > | XBlock, | ||
T * | z, | ||
T * | dzdx, | ||
T * | dzdy | ||
) |
void refine_linear_Bot | ( | Param | XParam, |
int | ib, | ||
BlockP< T > | XBlock, | ||
T * | z, | ||
T * | dzdy | ||
) |
void refine_linear_Left | ( | Param | XParam, |
int | ib, | ||
BlockP< T > | XBlock, | ||
T * | z, | ||
T * | dzdx, | ||
T * | dzdy | ||
) |
void refine_linear_Right | ( | Param | XParam, |
int | ib, | ||
BlockP< T > | XBlock, | ||
T * | z, | ||
T * | dzdx | ||
) |
void refine_linear_Top | ( | Param | XParam, |
int | ib, | ||
BlockP< T > | XBlock, | ||
T * | z, | ||
T * | dzdy | ||
) |