fix equation doc

This commit is contained in:
giovanni
2025-03-12 16:19:11 +01:00
committed by Nicola Demo
parent ce35af6397
commit 0b7fc80325
6 changed files with 130 additions and 111 deletions

View File

@@ -1,28 +1,23 @@
"""Module for EquationInterface class"""
"""Module for the Equation Interface"""
from abc import ABCMeta, abstractmethod
class EquationInterface(metaclass=ABCMeta):
"""
The abstract `AbstractProblem` class. All the class defining a PINA Problem
should be inheritied from this class.
In the definition of a PINA problem, the fundamental elements are:
the output variables, the condition(s), and the domain(s) where the
conditions are applied.
Abstract base class for equations.
"""
@abstractmethod
def residual(self, input_, output_, params_):
"""
Residual computation of the equation.
Abstract method to compute the residual of an equation.
:param LabelTensor input_: Input points to evaluate the equation.
:param LabelTensor output_: Output vectors given by my model (e.g.,
a ``FeedForward`` model).
:param dict params_: Dictionary of unknown parameters, eventually
related to an ``InverseProblem``.
:return: The residual evaluation of the specified equation.
:param LabelTensor input_: Input points where the equation is evaluated.
:param LabelTensor output_: Output tensor, eventually produced by a
:class:`~torch.nn.Module` instance.
:param dict params_: Dictionary of unknown parameters, associated with a
:class:`~pina.problem.InverseProblem` instance.
:return: The computed residual of the equation.
:rtype: LabelTensor
"""