|
1 |
| -function GridVisualize.scalarplot!(p, op::Tuple{Unknown, DataType}, sol; abs = false, component = 1, title = String(op[1].identifier), kwargs...) |
2 |
| - return GridVisualize.scalarplot!(p, sol[op[1]].FES.dofgrid, view(nodevalues(sol[op[1]], op[2]; abs = abs), component, :); title = title, kwargs...) |
3 |
| -end |
4 |
| -function GridVisualize.scalarplot!(p, op::Tuple{Int, DataType}, sol; abs = false, component = 1, title = sol[op[1]].name, kwargs...) |
5 |
| - return GridVisualize.scalarplot!(p, sol[op[1]].FES.dofgrid, view(nodevalues(sol[op[1]], op[2]; abs = abs), component, :); title = title, kwargs...) |
| 1 | +function GridVisualize.scalarplot!( |
| 2 | + p, |
| 3 | + op::Union{Tuple{Unknown, DataType}, Tuple{Int, DataType}}, |
| 4 | + sol; |
| 5 | + abs = false, |
| 6 | + component = 1, |
| 7 | + title = typeof(op) <: Tuple{Unknown, DataType} ? String(op[1].identifier) : sol[op[1]].name, |
| 8 | + average_broken_plots = false, |
| 9 | + kwargs... |
| 10 | + ) |
| 11 | + if !average_broken_plots && ExtendableFEMBase.broken(sol[op[1]].FES) |
| 12 | + broken_scalarplot!(p, sol[op[1]], op[2]; title, average_broken_plots, kwargs...) |
| 13 | + else |
| 14 | + return GridVisualize.scalarplot!(p, sol[op[1]].FES.dofgrid, view(nodevalues(sol[op[1]], op[2]; abs = abs), component, :); title = title, kwargs...) |
| 15 | + end |
6 | 16 | end
|
| 17 | + |
7 | 18 | function GridVisualize.vectorplot!(p, op::Tuple{Unknown, DataType}, sol; title = String(op[1].identifier), kwargs...)
|
8 | 19 | return GridVisualize.vectorplot!(p, sol[op[1]].FES.dofgrid, eval_func_bary(PointEvaluator([op], sol)); title = title, kwargs...)
|
9 | 20 | end
|
|
0 commit comments