Equation Interface#

Module for the Equation Interface.

class EquationInterface[source]#

Bases: object

Abstract 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.Module instance.

  • params (dict) – An optional dictionary of unknown parameters, used in InverseProblem settings. If the equation is not related to an inverse problem, this should be set to None. Default is None.

Returns:

The residual values of the equation.

Return type:

LabelTensor

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:

EquationInterface