#include <DiffusionSolver.h>
Solving diffusion on 3D regular grids (stored as CImg)
size | (in) the size of the regular domain in the 3 directions. |
img | (in-out) the image to diffuse. It contains the Dirichlet boundary values and contains warm-start values (must be set to 0 for no warm-start). |
mask | (in) represents the type of each voxel. A negative value represents the exterior of the domain, a positive value for the interior and 0 for Dirichlet boundary conditions. The boundary exterior/interior implicitly represents a Neumann boundary condition imposing null gradients along normals. |
Static Public Attributes | |
static const char | OUTSIDE = -1 |
voxel type More... | |
static const char | INSIDE = 1 |
static const char | DIRICHLET = 0 |
Static Public Member Functions | |
static void | setNbThreads (unsigned nb) |
for multi-threaded implementations More... | |
static void | setDefaultNbThreads () |
static void | setMaxNbThreads () |
static int | getMaxNbThreads () |
static void | solveGS (ImageType &img, const MaskType &mask, Real spacingX, Real spacingY, Real spacingZ, unsigned iterations, Real threshold, Real sor=1, const ImageType *material=NULL, Real minValueThreshold=0) |
static void | solveJacobi (ImageType &img, const MaskType &mask, Real spacingX, Real spacingY, Real spacingZ, unsigned iterations, Real threshold, const ImageType *material=NULL, Real minValueThreshold=0) |
Jacobi implementation. More... | |
static void | solveCG (ImageType &img, const MaskType &mask, Real spacingX, Real spacingY, Real spacingZ, unsigned iterations, Real threshold, const ImageType *material=NULL) |
Conjugate Gradient implementation (matrix-free) More... | |
|
static |
|
static |
|
static |
voxel type
|
static |
|
static |
|
static |
|
static |
for multi-threaded implementations
|
static |
Conjugate Gradient implementation (matrix-free)
|
static |
Gauss-Seidel implementation
sor | (Successive Over Relaxation coef) 0<sor<2 should converge, 1<sor<2 can converge faster than pure GS (sor=1) |