Skip to content

Commit

Permalink
Correct documentation on default linear solvers
Browse files Browse the repository at this point in the history
  • Loading branch information
j-fu committed Sep 13, 2024
1 parent 484a3a0 commit 59b601b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions src/vfvm_solvercontrol.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,13 @@ Base.@kwdef mutable struct SolverControl

"""
Solver method for linear systems (see LinearSolve.jl). If given `nothing`, as default
are chosen (for `Float64` calculations):
- 1D: `KLUFactorization()`
- 2D: `SparspakFactorization()`
- 3D: `UMFPACKFactorization()`
`SparspakFactorization()` is the default choice for general number types.
are chosen:
- `UMFPACKFactorization()` for sparse matrices with Float64
- `SparspakFactorization()` for sparse matrices with general number types.
- Defaults from LinearSolve.jl for tridiagonal and banded matrices
Users should experiment with what works best for their problem.
For easy access to this functionality, see see also [`VoronoiFVM.LinearSolverStrategy`](@ref).
For an overeview on possible alternatives, see [`VoronoiFVM.LinearSolverStrategy`](@ref).
"""
method_linear::Union{Nothing, LinearSolve.SciMLLinearSolveAlgorithm} = nothing
Expand Down
2 changes: 1 addition & 1 deletion src/vfvm_state.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function SystemState(::Type{Tu}, system::AbstractSystem{Tv, Tc, Ti, Tm};

matrixtype = system.matrixtype

if matrixtype == :default
if matrixtype == :auto
if !isdensesystem(system) || dim_grid(system.grid)>1
matrixtype = :sparse
else
Expand Down
4 changes: 2 additions & 2 deletions src/vfvm_system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ Physics keyword arguments:
This allows to pass various parameters to the callback functions. If `data` is given, all callback functions
should accept a last `data` argument. Otherwise, no data are passed explicitly, and constitutive callbacks can
take parameters from the closure where the function is defined.
- `matrixtype`: :default, :sparse, :tridiagonal, :banded
- `matrixtype`: :sparse, :tridiagonal, :banded, :auto. Default: :sparse. :auto leads to automatic choice for dense
solution storage depending on space dimension and number of species.
"""
function System(grid::ExtendableGrid;
Expand Down

0 comments on commit 59b601b

Please sign in to comment.