Pressure solvers
The discrete pressure Poisson equation
enforces divergence freeness. There are multiple options for solving this system.
IncompressibleNavierStokes.default_psolver Method
default_psolver(
setup
) -> Union{IncompressibleNavierStokes.var"#psolve!#100"{Bool}, IncompressibleNavierStokes.var"#psolve!#123"}
Get default Poisson solver from setup.
IncompressibleNavierStokes.poisson! Method
poisson!(psolver, f) -> Any
Solve the Poisson equation for the pressure (in-place version).
IncompressibleNavierStokes.poisson Method
poisson(psolver, f) -> Any
Solve the Poisson equation for the pressure with right hand side f
at time t
. For periodic and no-slip BC, the sum of f
should be zero.
Differentiable version.
IncompressibleNavierStokes.pressure! Method
pressure!(p, u, temp, t, setup; psolver, F)
Compute pressure from velocity field (in-place version).
IncompressibleNavierStokes.pressure Method
pressure(u, temp, t, setup; psolver)
Compute pressure from velocity field. This makes the pressure compatible with the velocity field, resulting in same order pressure as velocity.
Differentiable version.
IncompressibleNavierStokes.project! Method
project!(u, setup; psolver, p)
Project velocity field onto divergence-free space (in-place version).
IncompressibleNavierStokes.project Method
project(u, setup; psolver)
Project velocity field onto divergence-free space (differentiable version).
IncompressibleNavierStokes.psolver_cg Method
psolver_cg(
setup;
abstol,
reltol,
maxiter,
preconditioner
) -> IncompressibleNavierStokes.var"#psolve!#110"{_A, _B, _C, IncompressibleNavierStokes.var"#laplace_diag#108"{ndrange, workgroupsize}} where {_A, _B, _C, ndrange, workgroupsize}
Conjugate gradients iterative Poisson solver.
IncompressibleNavierStokes.psolver_cg_matrix Method
psolver_cg_matrix(
setup;
kwargs...
) -> IncompressibleNavierStokes.var"#psolve!#104"{Base.Pairs{Symbol, Union{}, Tuple{}, @NamedTuple{}}}
Conjugate gradients iterative Poisson solver. The kwargs
are passed to the cg!
function from IterativeSolvers.jl.
IncompressibleNavierStokes.psolver_direct Method
psolver_direct(
setup
) -> IncompressibleNavierStokes.var"#psolve!#100"{Bool}
Create direct Poisson solver using an appropriate matrix decomposition.
IncompressibleNavierStokes.psolver_spectral Method
psolver_spectral(
setup
) -> IncompressibleNavierStokes.var"#psolve!#123"
Create spectral Poisson solver from setup.