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.

Note

@massert is not exported and used only internally. The PMeshAttributes package defines its own @massert macro.

Note

Whether @massert is globally enabled or disabled is currently "hard-coded" in src/error.jl.

Consistency checks

Consistency checks help to discover unwanted side-effects.

PMesh.checkmeshMethod
isconsistent = checkmesh(mesh[, silent=false)

Apply consistency checks on mesh, print report unless silent==true.

source

Visualization of data structure

The state of the data structure, in particular its "link"attributes, can be visualized by GraphViz.

Note

The visualization requires a 2d mesh.

PMesh.graphvizFunction
graphviz(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).

source