35#ifndef _GEOMETRYUTILS_H
36#define _GEOMETRYUTILS_H
41#include <cuda_runtime.h>
50 const uint* neighborZ)
52 k_PMM = neighborX[k_MMM];
53 k_MPM = neighborY[k_MMM];
54 k_MMP = neighborZ[k_MMM];
88 return ub_math::lerp3(
quantity[kMMM],
quantity[kPMM],
quantity[kMPM],
quantity[kPPM],
quantity[kMMP],
quantity[kPMP],
quantity[kMPP],
quantity[kPPP],
dXM,
dYM,
dZM);
std::shared_ptr< T > SPtr
constexpr T lerp3(const T &a, const T &b, const T &c, const T &d, const T &e, const T &f, const T &g, const T &h, const U &t, const U &u, const U &v)
constexpr void getNeighborIndicesOfBSW(uint k_MMM, uint &k_PMM, uint &k_MPM, uint &k_MMP, uint &k_PPM, uint &k_PMP, uint &k_MPP, uint &k_PPP, const uint *neighborX, const uint *neighborY, const uint *neighborZ)
__inline__ __host__ __device__ void rotate2D(real angle, real posX, real posY, real &newPosX, real &newPosY)
constexpr void invTranslate2D(real posX, real posY, real &newPosX, real &newPosY, real translationX, real translationY)
constexpr uint findNearestCellBSW(const uint index, const real *coordsX, const real *coordsY, const real *coordsZ, const real posX, const real posY, const real posZ, const uint *neighborsX, const uint *neighborsY, const uint *neighborsZ, const uint *neighborsWSB)
constexpr real trilinearInterpolation(real dXM, real dYM, real dZM, uint kMMM, uint kPMM, uint kMPM, uint kMMP, uint kPPM, uint kPMP, uint kMPP, uint kPPP, const real *quantity)
__inline__ __host__ __device__ void invRotateAboutX3D(real angle, real posX, real posY, real posZ, real &newPosX, real &newPosY, real &newPosZ)
constexpr void translate3D(real posX, real posY, real posZ, real &newPosX, real &newPosY, real &newPosZ, real translationX, real translationY, real translationZ)
__inline__ __host__ __device__ void rotateAboutX3D(real angle, real posX, real posY, real posZ, real &newPosX, real &newPosY, real &newPosZ)
constexpr void invTranslate3D(real posX, real posY, real posZ, real &newPosX, real &newPosY, real &newPosZ, real translationX, real translationY, real translationZ)
constexpr void translate2D(real posX, real posY, real &newPosX, real &newPosY, real translationX, real translationY)
__inline__ __host__ __device__ void invRotateAboutZ3D(real angle, real posX, real posY, real posZ, real &newPosX, real &newPosY, real &newPosZ)
__inline__ __host__ __device__ void rotateAboutY3D(real angle, real posX, real posY, real posZ, real &newPosX, real &newPosY, real &newPosZ)
__inline__ __host__ __device__ void invRotate2D(real angle, real posX, real posY, real &newPosX, real &newPosY)
__inline__ __host__ __device__ void rotateAboutZ3D(real angle, real posX, real posY, real posZ, real &newPosX, real &newPosY, real &newPosZ)
__inline__ __host__ __device__ void invRotateAboutY3D(real angle, real posX, real posY, real posZ, real &newPosX, real &newPosY, real &newPosZ)