Skip to content

Commit 198cc75

Browse files
committed
Add docstring and clarify internal only for FastSparsityPattern
1 parent f5c4a76 commit 198cc75

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

docs/src/devdocs/special_datastructures.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ Ferrite.ArrayOfVectorViews
1414
Ferrite.ConstructionBuffer
1515
Ferrite.push_at_index!
1616
```
17+
18+
## `FastSparsityPattern`
19+
```@docs
20+
Ferrite.FastSparsityPattern
21+
```

src/Dofs/sparsity_pattern.jl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -692,10 +692,19 @@ end
692692
# FastSparsityPattern #
693693
## ================= ##
694694

695-
# Full `AbstractSparsityPattern` interface not supported
696-
# For now, this remains a non-public fast-path for `allocate_matrix(MatrixType, dh)`,
697-
# but can be extended in the future or potentially replace `SparsityPattern`.
698-
# See #1302 for details.
695+
"""
696+
FastSparsityPattern([Ti = Int64], dh::DofHandler)
697+
698+
This sparsity does not currently support the full `AbstractSparsityPattern` interface,
699+
but is used as an internal fast-path for `allocate_matrix(MatrixType, dh)` for some
700+
supported `MatrixType`s. It can be extended in the future or potentially be merged
701+
with `SparsityPattern`. See #1302 for details.
702+
703+
!!! warning "Internal"
704+
`FastSparsityPattern` is strictly internal and its interface and implementation
705+
may change at any time.
706+
707+
"""
699708
mutable struct FastSparsityPattern{Ti} <: AbstractSparsityPattern
700709
const rowlen::Vector{Ti} # Number of stored entries in each row
701710
const marker::Vector{Ti} # Marker if column has been "visited" by certain row

0 commit comments

Comments
 (0)