Equation Interface#
Module for the Equation Interface.
- class EquationInterface[source]#
Bases:
objectAbstract interface for all equations.
- abstract residual(input_, output_, params_=None)[source]#
Evaluate the equation residual at the given inputs.
- Parameters:
input (LabelTensor) – The input points where the residual is computed.
output (LabelTensor) – The output tensor, potentially produced by a
torch.nn.Moduleinstance.params (dict) – An optional dictionary of unknown parameters, used in
InverseProblemsettings. If the equation is not related to an inverse problem, this should be set toNone. Default isNone.
- Returns:
The residual values of the equation.
- Return type:
- abstract to(device)[source]#
Move all tensor attributes to the specified device.
- Parameters:
device (torch.device) – The target device to move the tensors to.
- Returns:
The instance moved to the specified device.
- Return type: