Utilities
Assertions
The implementation of this package includes a large number of assertions for testing that significantly degrade performance. The package defines the macro @massert
as replacement for @assert
. The definition is almost identical, but the effect of @massert
can be "switched" such that the evaluation of assertions is optional.
@massert
is not exported and used only internally. The PMeshAttributes
package defines its own @massert
macro.
Consistency checks
Consistency checks help to discover unwanted side-effects.
PMesh.checkmesh
— Methodisconsistent = checkmesh(mesh[, silent=false)
Apply consistency checks on mesh
, print report unless silent==true
.
Visualization of data structure
The state of the data structure, in particular its "link"attributes, can be visualized by GraphViz.
PMesh.graphviz
— Functiongraphviz(io, mesh)
graphviz(mesh[; filename=tempname(), display=true, ext=:pdf])
Output GraphViz DOT representation for 2d mesh
. This method is intended for debugging internals. The graph representation displays handles and link
attributes of elements.
ext
determines the output format (see dot
manual). If display==true
, show result in PDF viewer (xdg-open
for ext==:pdf
) or SVG viewer (xsvg
for ext==:avg
).