Equation Interface#
- class EquationInterface[source]#
Bases:
objectAbstract base class for equations.
Equations in PINA simplify the training process. When defining a problem, each equation passed to a
Conditionobject must be either anEquationor aSystemEquationinstance.An
Equationis a wrapper for a callable function, whileSystemEquationwraps a list of callable functions. To streamline code writing, PINA provides a diverse set of pre-implemented equations, such asFixedValue,FixedGradient, and many others.- abstract residual(input_, output_, params_)[source]#
Abstract method to compute the residual of an equation.
- Parameters:
input (LabelTensor) – Input points where the equation is evaluated.
output (LabelTensor) – Output tensor, eventually produced by a
torch.nn.Moduleinstance.params (dict) – Dictionary of unknown parameters, associated with a
InverseProbleminstance.
- Returns:
The computed residual of the equation.
- Return type: