Skip to content

Short tutorials for learning HyperFEM: structure and the hyperelastic bar - #8

Merged
jmartfrut merged 2 commits into
mainfrom
short-tutorials
Dec 4, 2026
Merged

jmartfrut merged 2 commits into
mainfrom
short-tutorials

Conversation

@jmartfrut

Copy link
Copy Markdown
Member

First step of the short tutorials for learning HyperFEM (plan agreed with @jmartfrut).

  • New folder tutorials/ with short scripts, listed in order in SHORT_TUTORIALS: the problem, the theory it needs,
    a simple implementation in five blocks, a sketch and a result figure, and a link to the validation example that
    solves the same problem in full. The first one: Stretching a hyperelastic bar (from E02; 128 lines, of which
    about 50 are code).
  • The 18 scripts in src/ stay where they are and are presented as validation examples. They will move to
    validation/ once all the short tutorials exist, together with the links from HyperFEM's documentation.
  • Documentation and README show the tutorials first, then the validation examples. run_tutorial("hyperelastic_stretch")
    runs a short tutorial.
  • Tests: a group tutorials (also in CI) runs each short tutorial as published, in a temporary folder; the list test
    checks that each short tutorial is in the README and the docs index and that its validation example exists.

Checks: the tutorial runs in 10 increments and its force equals the exact one (largest relative difference 2.4e-9);
Pkg.test of the tutorials group and of E02/E19 with --depwarn=error pass; docs build OK, with the figures and the
link to E02 working in the page and in the notebook. Light review: fixed the notebook links, the "Try it yourself"
variants (they must drop the final check) and a few explanations.

… bar

The new folder tutorials/ holds short scripts to learn HyperFEM, listed in SHORT_TUTORIALS: the problem, the
theory it needs and a simple implementation, with a sketch and a result figure. The first one stretches a
hyperelastic bar (from E02). The scripts in src/ stay where they are and are presented as validation
examples. The documentation and the README show the tutorials first; the test suite runs them as
published (group "tutorials", also in CI) and checks that each is listed and links to its example.
Images and the link to E02 also work in the notebooks (absolute addresses there); the variants of "Try it
yourself" say to remove the check; the compiled backend, the parameters and two idioms explained; the
README describes the new test group and notebook names; a clear error for an unknown script name; no
metadata in the figures.
@jmartfrut
jmartfrut merged commit 1702995 into main Dec 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant