Interface IPDESpecification<T>
- Namespace
- AiDotNet.PhysicsInformed.Interfaces
- Assembly
- AiDotNet.dll
Defines the interface for specifying Partial Differential Equations (PDEs) that can be used with Physics-Informed Neural Networks.
public interface IPDESpecification<T>
Type Parameters
TThe numeric type (float, double, etc.) used for calculations.
Remarks
For Beginners: A Partial Differential Equation (PDE) is an equation that involves rates of change with respect to multiple variables. For example, the heat equation describes how temperature changes over both space and time. This interface allows you to define any PDE in a way that neural networks can learn to solve it.
Properties
InputDimension
Gets the dimension of the input space (e.g., 2 for 2D spatial problems, 3 for 2D space + time).
int InputDimension { get; }
Property Value
Name
Gets the name or description of the PDE (e.g., "Heat Equation", "Navier-Stokes").
string Name { get; }
Property Value
OutputDimension
Gets the dimension of the output space (e.g., 1 for scalar fields like temperature, 3 for vector fields like velocity).
int OutputDimension { get; }
Property Value
Methods
ComputeResidual(T[], T[], PDEDerivatives<T>)
Computes the PDE residual at the given point. The residual is how much the PDE equation is violated at that point. For a true solution, the residual should be zero everywhere.
T ComputeResidual(T[] inputs, T[] outputs, PDEDerivatives<T> derivatives)
Parameters
inputsT[]The spatial and temporal coordinates where to evaluate the PDE.
outputsT[]The predicted solution values at those coordinates.
derivativesPDEDerivatives<T>The derivatives of the solution (gradient, Hessian, etc.).
Returns
- T
The PDE residual value (should be zero for a perfect solution).