|
| | CE_Multigrid () |
| |
| | ~CE_Multigrid () override |
| |
| | CE_Multigrid (const CE_Multigrid &)=default |
| |
| CE_Multigrid & | operator= (const CE_Multigrid &)=default |
| |
| void | init (const UT_Vector3I &res, const UT_Vector3 &spacing, const UT_Vector3I &boundaries_neg, const UT_Vector3I &boundaries_pos, int level=0, UT_Vector3I odd_coarsenings=UT_Vector3I(0, 0, 0)) |
| | Initialize array to given size, spacing, and boundary conditions. More...
|
| |
| void | initFromVoxels (const UT_VoxelArrayF &f, const UT_Vector3 &spacing, const UT_Vector3I &boundaries_neg, const UT_Vector3I &boundaries_pos) |
| |
| void | updateBoundaryConditions (bool struts=false) const |
| |
| int | getMaxCoarse (int min_per_axis) const |
| |
| int | getLevel () const |
| | Returns a grid's level within the multigrid hierarchy. More...
|
| |
| UT_Vector3I | getParity () const |
| | Returns a vector containing the odd/even parity for each axis. More...
|
| |
| void | match (const CE_Multigrid &src) |
| |
| void | subtractApplyLaplacian (CE_Multigrid &x, CE_Multigrid &r) const |
| | Computes rhe residual r = b - A * x, where b == *this. More...
|
| |
| void | computeResidualNorms (const CE_Multigrid &x, fpreal64 &norminf, fpreal64 &norm2) const |
| |
| void | smoothLaplacianGaussSeidel (CE_Multigrid &x, int iterations=1, bool use_small=true) const |
| |
| bool | smoothLaplacianGaussSeidelSmall (CE_Multigrid &x, int iterations=1) const |
| |
| void | directSolve (CE_Multigrid &x) const |
| |
| void | coarsenAlongAxis (CE_Multigrid &uh, int axis) const |
| |
| UT_Vector3I | coarsen (int min_per_axis, CE_Multigrid &uh) const |
| | Coarsen this grid into a lower resolution version of the grid. More...
|
| |
| void | interpolateAlongAxis (CE_Multigrid &u, int axis) const |
| |
| void | interpolate (const UT_Vector3I &interpolate_axis, const UT_Vector3I &parity, CE_Multigrid &u) const |
| |
| void | vcycle (int min_per_axis, int n_smooth_down, int n_smooth_up, CE_Multigrid &x, bool smooth_top_level_down=true) const |
| |
| void | fullMultigrid (int min_per_axis, int n_smooth_down, int n_smooth_up, CE_Multigrid &x) const |
| |
| int | solvePoisson (fpreal64 abstol, fpreal64 reltol, int miniter, int maxiter, CE_Multigrid &x, UT_ValArray< fpreal64 > *resnorminf, UT_ValArray< fpreal64 > *resnorm2, bool finish_between_iters=false, bool start_fmg=true) const |
| |
| | CE_Grid () |
| |
| | CE_Grid (const CE_Grid &src) |
| |
| virtual | ~CE_Grid () |
| |
| const cl::Buffer & | buffer () const |
| |
| bool | hasBuffer () const |
| | If the current OpenCL buffer is valid. More...
|
| |
| bool | isValid () const |
| |
| exint | getDeviceMemoryUsage () const |
| |
| void | size (int xres, int yres, int zres, int xghost=1, int yghost=1, int zghost=1, int xpad=1, int ypad=1, int zpad=1) |
| |
| int | getXRes () const |
| |
| int | getYRes () const |
| |
| int | getZRes () const |
| |
| int | getRes (int dim) const |
| |
| UT_Vector3I | getRes () const |
| |
| UT_Vector3I | getGhostRes () const |
| |
| int | getGhostRes (int dim) const |
| |
| UT_Vector3I | getPadding () const |
| |
| int | getPadding (int dim) const |
| |
| int | getOffset () const |
| |
| int | getGhostOffset () const |
| |
| void | setBorder (UT_VoxelBorderType type, fpreal32 t) |
| |
| UT_VoxelBorderType | getBorder () const |
| |
| fpreal32 | getBorderValue () const |
| |
| void | setBorderScale (fpreal32 scalex, fpreal32 scaley, fpreal32 scalez) |
| |
| fpreal32 | getBorderScale (int axis) const |
| |
| bool | indexToPos (int x, int y, int z, UT_Vector3F &pos) const |
| |
| void | updateBorderCells () const |
| |
| int64 | numVoxels () const |
| | Returns the number of data voxels in the grid. More...
|
| |
| int64 | numTotalVoxels () const |
| |
| int64 | totalVoxelMemory () const |
| |
| void | initFromVoxels (const UT_VoxelArrayF &src, int xghost=1, int yghost=1, int zghost=1, int xpad=1, int ypad=1, int zpad=1) |
| |
| void | matchAndCopyToVoxels (UT_VoxelArrayF &dest, bool include_ghost_cells=false) const |
| |
| void | match (const CE_Grid &src) |
| | Match the src CE_Grid in terms of size and border conditions. More...
|
| |
| bool | isMatching (const CE_Grid &src) const |
| |
| bool | isCongruent (const CE_Grid &src) const |
| | Returns true if this CE_Grid matches src in terms of offset and strides. More...
|
| |
| int | getXStride () const |
| |
| int | getYStride () const |
| |
| int | getZStride () const |
| |
| int | getStride (int dim) const |
| |
| UT_Vector3I | getStrides () const |
| |
| int | getGhostStride (int axis) const |
| | Returns the stride along axis including ghost cells. More...
|
| |
| bool | isAxis2D (int axis) const |
| | Returns whether the specified axis is 2-dimensional. More...
|
| |
| int | getAxis2D () const |
| | Returns the 2-dimensional axis of this grid, or -1 if there is none. More...
|
| |
| int | getXStride2D (int axis2d) const |
| | 2D strides. More...
|
| |
| int | getYStride2D (int axis2d) const |
| |
| int | getXStride2D3D () const |
| |
| int | getYStride2D3D () const |
| |
| int | getZStride2D3D () const |
| | Returns the true Z-stride if the grid is 3D, or 0 if 2D. More...
|
| |
| int | getXRes2D3D () const |
| |
| int | getYRes2D3D () const |
| |
| int | getZRes2D3D () const |
| | Returns the true z resolution if the grid is 3D, or 1 if 2D. More...
|
| |
| void | constant (fpreal32 v) |
| |
| void | zero () |
| |
| bool | isConstant (fpreal32 *cval=0, bool check_borders=false) const |
| |
| void | copyData (const CE_Grid &src) |
| |
| CE_Grid & | operator= (const CE_Grid &src) |
| | Assign to this, equivalent to match(src), followed by copyData(src). More...
|
| |
| void | stealBuffer (CE_Grid &src) |
| | Steal the buffer from the other grid, leaving it unitialized. More...
|
| |
| CE_Grid & | operator+= (const CE_Grid &src) |
| |
| cl::NDRange | getGlobalRange () const |
| |
| cl::NDRange | getGlobalRange2D (int axis2d) const |
| |
| cl::NDRange | getGlobalRange2D3D () const |
| |
| cl::NDRange | getLocalRange2D3D () const |
| |
| cl::KernelFunctor | bind (cl::Kernel k, const cl::NDRange *lrange=nullptr, int n=1) const |
| |
| cl::KernelFunctor | bind (cl::Program prog, const char *kernelname) const |
| |
| cl::KernelFunctor | bind2D (int axis, cl::Kernel k) const |
| |
| cl::KernelFunctor | bind2D (int axis, cl::Program prog, const char *kernelname) const |
| |
| cl::KernelFunctor | bind2D3D (cl::Kernel k) const |
| |
| cl::KernelFunctor | bind2D3D (cl::Program prog, const char *kernelname) const |
| |
| void | scaledAddCornerFromCenter (fpreal32 c1, const CE_Grid &g1) |
| |
| void | linearCombination (fpreal32 c0, const CE_Grid &g0, fpreal32 d) |
| |
| void | linearCombination (fpreal32 c0, const CE_Grid &g0, fpreal32 c1, const CE_Grid &g1, fpreal32 d) |
| |
| void | linearCombination (fpreal32 c0, const CE_Grid &g0, fpreal32 c1, const CE_Grid &g1, fpreal32 c2, const CE_Grid &g2, fpreal32 d) |
| |
| void | divergence (const CE_Grid &x, const CE_Grid &y, const CE_Grid &z, fpreal32 scale, UT_Vector3 voxel_size) |
| |
| void | divergenceCenterToCorner (const CE_Grid &x, const CE_Grid &y, const CE_Grid &z, fpreal32 scale, UT_Vector3 voxel_size) |
| |
| void | applyGradient (const CE_Grid &p, fpreal32 scale, fpreal32 voxel_size, int axis) |
| |
| void | applyGradientCornerToCenter (const CE_Grid &p, fpreal32 scale, fpreal32 voxelsize, int axis) |
| |
| fpreal64 | sum () const |
| | Reductions of the grid to a single value. More...
|
| |
| fpreal64 | sumAbs () const |
| |
| fpreal64 | sumSqr () const |
| |
| fpreal64 | min () const |
| |
| fpreal64 | minAbs () const |
| |
| fpreal64 | max () const |
| |
| fpreal64 | maxAbs () const |
| |
| fpreal64 | average () const |
| |
| fpreal64 | localAverage (UT_Vector3I &radius) |
| |
| fpreal64 | localSum (UT_Vector3I &radius) |
| |
| fpreal64 | localSumSqr (UT_Vector3I &radius) |
| |
| fpreal64 | localSumAbs (UT_Vector3I &radius) |
| |
| fpreal64 | localMin (UT_Vector3I &radius) |
| |
| fpreal64 | localMinAbs (UT_Vector3I &radius) |
| |
| fpreal64 | localMax (UT_Vector3I &radius) |
| |
| fpreal64 | localMaxAbs (UT_Vector3I &radius) |
| |
| void | boxBlur (int passes, UT_Vector3 radius) |
| |
| void | computeNorms (fpreal64 &norminf, fpreal64 &norm2) const |
| | Compute the infinity-norm and 2-norm of the grid. More...
|
| |
This class provides a specializaion of CE_Grid that can solve the 2D or 3D Poisson equation using the multigrid algorithm, running on an OpenCL device. It's interface closely matches that of UT_MultigridArray.
Definition at line 21 of file CE_Multigrid.h.