Equation Interface#
- class EquationInterface[source]#
Bases:
object
Abstract base class for equations.
Equations in PINA simplify the training process. When defining a problem, each equation passed to a
Condition
object must be either anEquation
or aSystemEquation
instance.An
Equation
is a wrapper for a callable function, whileSystemEquation
wraps 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.Module
instance.params (dict) – Dictionary of unknown parameters, associated with a
InverseProblem
instance.
- Returns:
The computed residual of the equation.
- Return type: