Skip to content

Heat 1D – resampling

Example
Source DeepXDE example
Problem Forward
Dimension 1D (x, t)
Regime Time-dependent
Geometry Interval
Outputs u
Settings Default, Tuned

Governing equations

Mathematical form (from the benchmark records):

\[\frac{\partial u}{\partial t} = 0.4\frac{\partial^2 u}{\partial x^2}, \qquad x \in [0, 1],\ t \in [0, 1]\]

As typed in PINNStudio's Equations page (each expression is a residual, set to zero):

du_t - a*du_xx

Constants: a = 0.4, L = 1, n = 1

Domain

  • Interval: \(x \in [0, 1]\)
  • Time interval: \(t \in [0, 1]\)

Initial conditions

Output Initial value How it is imposed (Settings: Default)
u sin(n*pi*x/L) loss term

Boundary conditions

Type Where Output Value Details
Dirichlet BC True (the whole boundary) u 0 —

Settings

Settings: Default — DeepXDE's own settings

  • Network: FNN, hidden layers 3 × 20, inputs (x, t), 1 output; activation tanh, initializer Glorot normal
  • Points: 2,540 domain, 80 boundary, 160 initial, 2,540 test
  • Loss weights: 1,1,1 (equations, then boundary-condition rows, then initial conditions)
  • Methods: collocation-point resampling every 10 iterations
Phase Optimizer Iterations Learning rate Decay
1 Adam 200,000 0.001 none
2 L-BFGS 15,000 — none
Settings: Tuned

The Training Log reports: Tuned settings: a larger network (hidden layers twice as wide, one more layer). The change is applied to the example's own settings.

  • Network: FNN, hidden layers 4 × 40, inputs (x, t), 1 output; activation tanh, initializer Glorot normal
  • Points: 2,540 domain, 80 boundary, 160 initial, 2,540 test
  • Loss weights: 1,1,1 (equations, then boundary-condition rows, then initial conditions)
  • Methods: collocation-point resampling every 10 iterations
Phase Optimizer Iterations Learning rate Decay
1 Adam 200,000 0.001 none
2 L-BFGS 15,000 — none

Results

The configuration selected in PINNStudio's benchmark study, run on one RTX 4090. Forward: relative L₂ error of each output at the last reference time. Inverse: each parameter's relative error and, per seed, the largest of them (worst parameter error).

Forward problem

Settings: Tuned — Larger network (2× width, one more layer). Values: one run, seed 2026.

Output Relative L₂
u 3.1 × 10⁻³
Forward result: PINN, reference and error
Forward, Tuned settings: PINN, reference and error.

Full benchmark record: every setting tried, the per-seed values and all figures are in the benchmark records on GitHub.

Loading it in PINNStudio

  • Forward: toolbar Examples: › Forward › under the ── 1D ── heading, Heat 1D – resampling › Default or Tuned, then Solve.

Loading an example fills in every setting; anything you change before Solve is listed in the Training Log. Your save folder, GPU, random-seed and plot-style settings are kept.

Reference solution

  • Exact solution, Error Analysis › reference from formula: u = exp(-n**2*pi**2*a*t/L**2)*sin(n*pi*x/L)

Definition and records

How the benchmark values were measured and checked: Reproducibility.

← Back to the example gallery