Skip to content

Commit

Permalink
modify docstring + add to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kimauth committed Dec 21, 2021
1 parent f926716 commit a7b40e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/src/reference/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ vtk_grid(filename::AbstractString, grid::Grid{dim,C,T}; compress::Bool) where {d
vtk_point_data(vtk::WriteVTK.DatasetFile, data::Union{Vector{SymmetricTensor{2,dim,T,M}}},name::AbstractString) where {dim,T,M}
vtk_point_data(vtk::WriteVTK.DatasetFile, data::Union{ Vector{Tensor{order,dim,T,M}}, Vector{SymmetricTensor{order,dim,T,M}}}, name::AbstractString) where {order,dim,T,M}
vtk_cellset
vtk_cell_data_colors
```
6 changes: 5 additions & 1 deletion docs/src/reference/grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
DocTestSetup = :(using Ferrite)
```

# Grid
# Grid
## Multithreaded Assembly
```@docs
create_coloring
```
11 changes: 6 additions & 5 deletions src/Grid/coloring.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ end
@enum ColoringAlgorithm GREEDY WORKSTREAM

"""
create_coloring(g::Grid; alg::ColoringAlgorithm)
create_coloring(g::Grid, cellset::Set{Int}=Set(1:getncells(g)); alg::ColoringAlgorithm)
Create a coloring of the cells in grid `g` such that no neighboring cells
have the same color.
have the same color. If only a subset of cells should be colored, the cells to color can be specified by `cellset`.
Returns a vector of vectors with cell indexes, e.g.:
Expand All @@ -159,9 +159,10 @@ ret = [
Two different algorithms are available, specified with the `alg` keyword argument:
- `alg = Ferrite.WORKSTREAM` (default): Three step algorithm from
[*WorkStream*](https://www.math.colostate.edu/%7Ebangerth/publications/2013-pattern.pdf)
, albeit with a greedy coloring in the second step.
- `alg = Ferrite.GREEDY`: greedy algorithm that works well for structured grid such as
e.g. grids from `generate_grid`.
, albeit with a greedy coloring in the second step. Generally results in more colors than `Ferrite.GREEDY`,
however the cells are more equally distributed among the colors.
- `alg = Ferrite.GREEDY`: greedy algorithm that works well for structured quadrilateral grids such as
e.g. quadrilateral grids from `generate_grid`.
The resulting colors can be visualized using [`vtk_cell_data_colors`](@ref).
Expand Down

0 comments on commit a7b40e5

Please sign in to comment.