API
PINNConfig(type)PINNSolution(type)predict_on_grid(function)predict_on_grid!(function)train_pinn(function)
Note
PINNConfig (type)
Training hyperparameters for the Physics-Informed Neural Network solver.
The initial condition is enforced exactly via a hard constraint decomposition (no IC loss term or IC collocation points needed).
Keyword Arguments
hidden_dims::Vector{Int}- Hidden layer sizes (default[64, 64, 64])activation::Symbol- Activation function (default:tanh)n_interior::Int- PDE collocation points (default5000)n_boundary::Int- Boundary condition points (default500)lambda_pde::Float64- PDE loss weight (default1.0)lambda_bc::Float64- BC loss weight (default1.0)lambda_data::Float64- Data loss weight (default1.0)learning_rate::Float64- Adam learning rate (default1e-3)max_epochs::Int- Maximum training epochs (default10000)resample_every::Int- Resample collocation points every N epochs (default500)
Examples
Note
PINNSolution (type)
Trained PINN model. Callable as sol(t, x, y) to evaluate the level set function.
Fields
model- Lux neural network chainparameters- Trained parameters (ComponentArray)state- Lux model stateconfig::PINNConfig- Training configurationloss_history::Vector{Float64}- Loss at each epochdomain::NamedTuple-(tspan, xspan, yspan, phi_scale)for input normalizationgrid_ic- Initial condition grid (for hard IC constraint decomposition)
Examples
Note
predict_on_grid (function)
Note
predict_on_grid! (function) {#predict_on_grid!}
Note
train_pinn (function)
Train a Physics-Informed Neural Network to solve the fire spread level set PDE.
The PINN learns a function phi_theta(x, y, t) satisfying:
where F is the spread rate from the FireSpreadModel.
Requires Lux to be loaded (triggers package extension).
Arguments
grid-LevelSetGridproviding domain geometry and initial conditionmodel- Callablemodel(t, x, y) -> spread_rate(e.g.FireSpreadModel)tspan- Time interval(t_start, t_end)config-PINNConfigwith training hyperparametersobservations- Optional(t, x, y, phi)tuple of observation data
Returns
A PINNSolution callable as sol(t, x, y).