Tutorials#
One notebook per workflow stage, each linking to the matching algorithm page and API reference. Read a tutorial for how to do it; read the algorithm page for why it works.
Reading order#
The stages chain, and the tutorials are ordered to match. A complete experimental study runs left to right:
raw HEDM scans -> stitch -> reconstruct -> mesh -> CPFE -> analyse
If you are evaluating graintrace rather than using it, start at the analysis
end: Post-CPFE analysis & plotting and Rare-event identification (REI) run on shipped
sample data with nothing but pip install graintrace, so you can see what the
package produces before installing anything heavy.
Two tiers#
Whether a tutorial shows you real output depends on what it needs to run.
Tier |
What it means |
|---|---|
A |
Runs with no external binary. Every number and figure on the page was produced by running the code above it — nothing is hand-written. |
B |
Needs NEPER, CUBIT/SCULPT, or MOOSE/PUMA. None of those exist in CI or Colab, so these notebooks are annotated code listings with no stored output. Each one names its external requirement at the top, and the table below says exactly which binary. |
Tier A splits again by where the execution happens, which is worth knowing if you are editing one:
Tutorial |
How its output is produced |
|---|---|
Rare-event identification on a 2D field, Rare-event identification on a 3D field, Comparing two REI point clouds, Rare-event identification (REI) |
No stored output; |
Post-CPFE analysis & plotting, Reorientation and fragmentation |
Outputs executed locally and committed, because both need NEML2 v3
for the orientation maths and NEML2 is not pip-installable in CI. Re-run
them after editing: |
Neither of the last two gets a Colab badge: they read ../../mwe_data/, which
only exists in a checkout.
What each Tier B tutorial needs#
Reproduce these by running the matching script from Examples in a configured environment. The required capability is the only thing standing between the listing and a figure:
Tutorial |
Needs |
Why |
|---|---|---|
|
Generates the synthetic crystal and the z-scans being stitched. |
|
|
The tessellation is the output. |
|
|
Voronoi/CVT reconstruction from FF centroids. |
|
|
One Voronoi build per file supplies the rotated |
|
|
Builds the per-step grain graphs that are matched. |
|
|
Hexahedral meshing of the segmented voxel grid. |
|
|
Same; the segmentation half is pure Python. |
|
|
The |
|
|
Runs the finite-element solve. |
|
|
Spans the whole pipeline in one notebook. |
|
NEML2 v3 + |
No binary needed, but NEML2 v3 is not pip-installable, so CI cannot build it. This is the one Tier B tutorial that could become Tier A on a machine with NEML2 installed. |
Note
Tier A notebooks address data as ../../mwe_data/..., relative to
docs/tutorials/, because that is the working directory nbsphinx gives
the kernel. Tier B notebooks use repository-root-relative paths and are meant
to be run from the root of a checkout. If a path does not resolve, that is
which convention you are on.
Data & microstructure
Calibration & simulation
Analysis
Reference