You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/devdocs/assembly.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,19 @@
1
1
# [Assembly](@id devdocs-assembly)
2
2
3
-
The assembler handles the insertion of the element matrices and element vectors into the system matrix and right hand side.
3
+
An assembler handles the insertion of the element matrices and element vectors into the system matrix and vector.
4
+
and should *normally* (the exact interface is yet to be fully established) subtype `AbstractAssembler{T}`. Here `T` is the
5
+
`eltype` of the contained system matrix and vector. This allows the user to infer the eltype when preallocating the element
6
+
matrix and vector, e.g.
7
+
```julia
8
+
functiondoassemble!(assembler::Ferrite.AbstractAssembler{T}, ...) where {T}
9
+
Ke =zeros(T, n, n) # n = dofs per cell
10
+
fe =zeros(T, n)
11
+
for cell inCellIterator(...)
12
+
element_routine!(Ke, fe, cell, ...)
13
+
assemble!(assembler, celldofs(cell), Ke, fe)
14
+
end
15
+
end
16
+
```
4
17
5
18
## Custom matrix formats
6
19
While the CSC and CSR formats are the most common sparse matrix formats in practice, users might want to have optimized custom matrix formats for their specific use-case. The default assemblers [`Ferrite.CSCAssembler`](@ref) and [`Ferrite.CSRAssembler`](@ref) should be able to handle most cases in practice. To support a custom format users have to dispatch the following functions on their matrix type. There is the public interface
0 commit comments