Releases: JanStudnicka/pinn-toolbox
Release list
PINN Toolbox 1.1.0
Examples
- The example Live Scripts no longer require an open project. Paths to shipped
files are built by a new helper,examples/helper/pinnToolboxRoot.m, which
derives the toolbox root from its own location, so the examples run from a clone,
from an installed.mltbxand in MATLAB Online alike. Replaces
currentProject().RootFolderinpriklad_kyvadlo/example_pendulumand
priklad_teplo_2d/example_heat_2d. priklad_teplo_2d/example_heat_2dwrite the README GIF only when it is
missing (refreshGif), and fall back totempdirwhen the target folder is not
writable (installed toolbox).getframeoutput is never byte-identical, so the
previous unconditional write produced a spurious binary diff on every run.priklad_kyvadlo/example_pendulumno longer instruct users to overwrite the
committedexamples/data/kyvadlo.mat: record to any file outside the repository and
pointdataFileat it.- Data generators are now functions with an optional output path —
generate_kyvadlo_data(file)andgenerate_kyvadlo_data_simscape(file)write where
told; called without an argument they ask viauiputfile. As scripts they polluted
the caller's workspace and silently overwrote the committed data. generate_kyvadlo_data.mmoved fromexamples/data/toexamples/helper/, so it is
callable by name from anywhere andexamples/data/holds data only.
Fixed
priklad_konvekce.mprinted its curriculum phases without line breaks. The
fprintfformat string had lost the backslash of%%\n, so it printed a literal "n"
and ran the phases together on one line; the defect was present in 1.0.0. The Live
Editor strips one backslash directly after%%on every save (doubling it only delays
the loss by one round), so both the Czech example and its English mirror now use
%% \nwith a space, which is stable.- Math in the English mirrors normalised to the same backslash convention as the Czech
originals (\\pi,\\nu,\\,), and two thin spaces lost to an earlier Live Editor
round-trip restored inexample_burgers.mandexample_heat_2d.m. - **
example_neural_ode.mreturned error "Error using extractBinaryBroadcastData>iGetData (line 108)
Data must be of type double, single, or logical, or a gpuArray object of these types."
The code now corresponds to the Czech original and the example runs correctly.
Project and tooling
examples/helperadded to the project path, which now mirrorsToolboxMatlabPath
intools/packageToolbox.mexactly.setupProject.mis authoritative for the full folder, file and path lists (it
previously documented and restored only the repository root, so re-creating a lost
.prjwould have yielded a project that cannot run the examples);tools/is
registered with the project as well.- The project file registry now matches the repository. Only 35 of 111 committed
files were project members —addFolderIncludingChildFilesregisters what exists at
the time of the call, so everything added after the project was created stayed out
(all of+PINN/+tools, most of+PINN/+utils, ten examples, most ofexamples/en,
ten tests, all oftools/, every top-level file).setupProject.mnow also registers
the committed top-level files and prunes entries whose file no longer exists. setupProject.mis excluded from the packaged.mltbx— the repository root is on
the installed path, so an installed user calling it would have created a MATLAB
project in their current folder.tools/runAllExamples.mresolves the example folder viapinnToolboxRoot()and runs
without an open project.- New
tests/test_ExamplePaths.m.
Documentation
- The Helmholtz example no longer calls its problem "stiff". A stationary
Helmholtz BVP has no time scales, so it cannot be stiff in the usual sense; what is
ill-conditioned is the PINN optimisation, and Wang et al. 2021 (paper 05) attribute
the stiffness to the gradient flow of training rather than to the PDE. Relabelled in
the Czech example, the English mirror, both tutorials and both tuning guides. - Czech prose brought in line with
doc/Slovnik_terminologie.md. Glossary
violations replaced (multi-output,pipeline,rejection sampling, runaway λ,
defaulty,papery,appka,dle), the Czech tuning guide moved off lab jargon
onto the agreed terms, and the whole corpus switched to consistent vykání (formal
address), including the Trainer App README and the Simulink script comments. - Czech typography unified: en dash rather than a hyphen in prose and in ranges,
non-breaking space before%and units,1D/2Dwithout a hyphen. Each convention
is now a binding rule in §4 of the glossary — including the decision to keep the
decimal point in prose, because the text quotes the very numbers MATLAB prints
into the%[output:...]blocks a few lines below, and a comma would desync the two. - README carries an Open in MATLAB Online badge, so the repository can be opened
and run from a browser without a local installation.
PINN Toolbox 1.0.0
The first public release of the PINN Toolbox — a MATLAB namespace package (+PINN)
for solving forward and inverse PDE/ODE problems with Physics-Informed Neural
Networks, built on Deep Learning Toolbox automatic differentiation
(dlarray / dlnetwork / dlgradient / dlfeval).
What's in it
Core. Three value classes form the pipeline:
PINN.core.NeuralNetwork— network wrapper with optional random Fourier features,
a gated modified-MLP architecture (Wang et al. 2021) and asinactivation.PINN.core.LossFunction— combined data + physics loss from your own PDE residual
handle, with optional adaptive grad-norm weighting and a divergence cap.PINN.core.Optimizer— Adam and L-BFGS training loops (forward and inverse) with
dlaccelerategraph caching on by default, learning-rate schedules, early stopping,
in-loop residual-adaptive resampling, and a non-finite-loss guard that rolls back
and stops cleanly.
Utilities for collocation sampling (including complex geometries by rejection
sampling), hard boundary constraints, higher-order derivatives, a gradient-balance
diagnostic, and a name-value builder for the training inputs.
Examples. 19 narrated Live Scripts, one concept each, every one validated against
an analytic / pdepe / ode45 reference and reporting its relative L2 error. Czech
in examples/, with a full English mirror in examples/en/ and a guided tour in
both languages. They cover the basics, inverse problems from real sensor data, and
deliberate failure-mode studies with measured remedies — convection with curriculum
training (82.1 % → 9.93 %), stiff Helmholtz with adaptive weights and hard BCs
(34.7 % → 0.62 %), spectral bias with Fourier features (520.8 % → 5.23 %), and a
stiff reaction where the loss is near zero but the answer is 96 % wrong until
seq2seq time-marching fixes it (→ 0.12 %).
Interactive app. PINN.tools.launchTrainerApp — pick a preset or type your own
equation and data, configure the network, loss and optimizer, train, and export a
runnable script. Bilingual UI (Czech / English).
Optional companions. A Simscape Multibody digital twin that generates the pendulum
sensor data, and a trained PINN deployed as a Simulink block acting as a soft sensor.
Their generated artifacts are committed, so the core examples need only the Deep
Learning Toolbox.
Tests and tooling. 139 unit tests, including sentinels that verify numerical
equivalence with and without dlaccelerate caching, plus fast example-path smoke
tests. CI runs the suite on both supported releases.
Requirements
- MATLAB R2025a or newer — verified in CI on R2025a and R2026a, CPU only.
- Deep Learning Toolbox (required).
- Simulink, Simscape and Simscape Multibody only for the optional companion examples.
The committed.slxmodels were saved in R2026a; on an older release regenerate them
with thebuild_*.mscripts.
Install
From the repository (recommended — the examples resolve their data paths through
the MATLAB project):
% git clone https://github.com/JanStudnicka/pinn-toolbox.git
openProject("PINNToolbox.prj")
open examples/en/tutorial.m % guided tour, EnglishAs a toolbox: download PINNToolbox.mltbx below and double-click it, or run
matlab.addons.toolbox.installToolbox("PINNToolbox.mltbx").
Documentation
doc/Tuning_Guide.md— symptom → diagnosis → fix, grounded in this repo's own
measurements (Czech mirror:doc/Pruvodce_ladenim.md).doc/PINN_Architecture.md— architecture and a residual cookbook.Papers/README.md— the six publications the toolbox is built on..claude/skills/pinn-toolbox/— a usage skill for AI coding agents.
MIT licensed.