Skip to content

Commit e0fbd3d

Browse files
fix rendering part 1
1 parent cba9f90 commit e0fbd3d

15 files changed

+89
-63
lines changed

pina/domain/difference_domain.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ def __init__(self, geometries):
2323
Initialization of the :class:`Difference` class.
2424
2525
:param list[DomainInterface] geometries: A list of instances of the
26-
:class:`~pina.domain.DomainInterface` class on which the difference
27-
operation is performed. The first domain in the list serves as the
28-
base from which points are sampled, while the remaining domains
29-
define the regions to be excluded from the base domain to compute
30-
the difference.
26+
:class:`~pina.domain.domain_interface.DomainInterface` class on
27+
which the difference operation is performed. The first domain in the
28+
list serves as the base from which points are sampled, while the
29+
remaining domains define the regions to be excluded from the base
30+
domain to compute the difference.
3131
3232
:Example:
3333
>>> # Create two ellipsoid domains

pina/domain/ellipsoid.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ def __init__(self, ellipsoid_dict, sample_surface=False):
2626
.. warning::
2727
Sampling for dimensions greater or equal to 10 could result in a
2828
shrinkage of the ellipsoid, which degrades the quality of the
29-
samples. For dimensions higher than 10, use other sampling
30-
algorithms.
31-
.. seealso::
32-
**Original reference**: Dezert, Jean, and Musso, Christian.
33-
*An efficient method for generating points uniformly distributed
34-
in hyperellipsoids.*
35-
Proceedings of the Workshop on Estimation, Tracking and Fusion:
36-
A Tribute to Yaakov Bar-Shalom. 2001.
29+
samples. For dimensions higher than 10, see the following reference.
30+
31+
.. seealso::
32+
**Original reference**: Dezert, Jean, and Musso, Christian.
33+
*An efficient method for generating points uniformly distributed
34+
in hyperellipsoids.*
35+
Proceedings of the Workshop on Estimation, Tracking and Fusion:
36+
A Tribute to Yaakov Bar-Shalom. 2001.
3737
3838
:Example:
3939
>>> spatial_domain = Ellipsoid({'x':[-1, 1], 'y':[-1,1]})

pina/domain/exclusion_domain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def __init__(self, geometries):
2525
Initialization of the :class:`Exclusion` class.
2626
2727
:param list[DomainInterface] geometries: A list of instances of the
28-
:class:`~pina.domain.DomainInterface` class on which the exclusion
29-
operation is performed.
28+
:class:`~pina.domain.domain_interface.DomainInterface` class on
29+
which the exclusion operation is performed.
3030
3131
:Example:
3232
>>> # Create two ellipsoid domains

pina/domain/intersection_domain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def __init__(self, geometries):
2424
Initialization of the :class:`Intersection` class.
2525
2626
:param list[DomainInterface] geometries: A list of instances of the
27-
:class:`~pina.domain.DomainInterface` class on which the
28-
intersection operation is performed.
27+
:class:`~pina.domain.domain_interface.DomainInterface` class on
28+
which the intersection operation is performed.
2929
3030
:Example:
3131
>>> # Create two ellipsoid domains

pina/domain/operation_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def __init__(self, geometries):
1515
Initialization of the :class:`OperationInterface` class.
1616
1717
:param list[DomainInterface] geometries: A list of instances of the
18-
:class:`~pina.domain.DomainInterface` class on which the set
19-
operation is performed.
18+
:class:`~pina.domain.domain_interface.DomainInterface` class on
19+
which the set operation is performed.
2020
"""
2121
# check consistency geometries
2222
check_consistency(geometries, DomainInterface)

pina/domain/union_domain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def __init__(self, geometries):
2323
Initialization of the :class:`Union` class.
2424
2525
:param list[DomainInterface] geometries: A list of instances of the
26-
:class:`~pina.domain.DomainInterface` class on which the union
27-
operation is performed.
26+
:class:`~pina.domain.domain_interface.DomainInterface` class on
27+
which the union operation is performed.
2828
2929
:Example:
3030
>>> # Create two ellipsoid domains

pina/equation/equation.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
class Equation(EquationInterface):
77
"""
88
Implementation of the Equation class. Every ``equation`` passed to a
9-
:class:`~pina.condition.Condition` object must be either a :class:`Equation`
10-
or a :class:`~pina.equation.SystemEquation` instance.
9+
:class:`~pina.condition.condition.Condition` object must be either an
10+
instance of :class:`Equation` or
11+
:class:`~pina.equation.system_equation.SystemEquation`.
1112
"""
1213

1314
def __init__(self, equation):
@@ -32,10 +33,11 @@ def residual(self, input_, output_, params_=None):
3233
3334
:param LabelTensor input_: Input points where the equation is evaluated.
3435
:param LabelTensor output_: Output tensor, eventually produced by a
35-
:class:`~torch.nn.Module` instance.
36+
:class:`torch.nn.Module` instance.
3637
:param dict params_: Dictionary of unknown parameters, associated with a
37-
:class:`~pina.problem.InverseProblem` instance. If the equation is
38-
not related to a :class:`~pina.problem.InverseProblem` instance, the
38+
:class:`~pina.problem.inverse_problem.InverseProblem` instance.
39+
If the equation is not related to a
40+
:class:`~pina.problem.inverse_problem.InverseProblem` instance, the
3941
parameters must be initialized to ``None``. Default is ``None``.
4042
:return: The computed residual of the equation.
4143
:rtype: LabelTensor

pina/equation/equation_factory.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def equation(input_, output_):
2828
:param LabelTensor input_: Input points where the equation is
2929
evaluated.
3030
:param LabelTensor output_: Output tensor, eventually produced by a
31-
:class:`~torch.nn.Module` instance.
31+
:class:`torch.nn.Module` instance.
3232
:return: The computed residual of the equation.
3333
:rtype: LabelTensor
3434
"""
@@ -66,7 +66,7 @@ def equation(input_, output_):
6666
:param LabelTensor input_: Input points where the equation is
6767
evaluated.
6868
:param LabelTensor output_: Output tensor, eventually produced by a
69-
:class:`~torch.nn.Module` instance.
69+
:class:`torch.nn.Module` instance.
7070
:return: The computed residual of the equation.
7171
:rtype: LabelTensor
7272
"""
@@ -101,7 +101,7 @@ def equation(input_, output_):
101101
:param LabelTensor input_: Input points where the equation is
102102
evaluated.
103103
:param LabelTensor output_: Output tensor, eventually produced by a
104-
:class:`~torch.nn.Module` instance.
104+
:class:`torch.nn.Module` instance.
105105
:return: The computed residual of the equation.
106106
:rtype: LabelTensor
107107
"""
@@ -136,7 +136,7 @@ def equation(input_, output_):
136136
:param LabelTensor input_: Input points where the equation is
137137
evaluated.
138138
:param LabelTensor output_: Output tensor, eventually produced by a
139-
:class:`~torch.nn.Module` instance.
139+
:class:`torch.nn.Module` instance.
140140
:return: The computed residual of the equation.
141141
:rtype: LabelTensor
142142
"""

pina/equation/equation_interface.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
class EquationInterface(metaclass=ABCMeta):
77
"""
88
Abstract base class for equations.
9+
10+
Equations in PINA simplify the training process. When defining a problem,
11+
each equation passed to a :class:`~pina.condition.condition.Condition`
12+
object must be either an :class:`~pina.equation.equation.Equation` or a
13+
:class:`~pina.equation.system_equation.SystemEquation` instance.
14+
15+
An :class:`~pina.equation.equation.Equation` is a wrapper for a callable
16+
function, while :class:`~pina.equation.system_equation.SystemEquation`
17+
wraps a list of callable functions. To streamline code writing, PINA
18+
provides a diverse set of pre-implemented equations, such as
19+
:class:`~pina.equation.equation_factory.FixedValue`,
20+
:class:`~pina.equation.equation_factory.FixedGradient`, and many others.
921
"""
1022

1123
@abstractmethod
@@ -15,9 +27,9 @@ def residual(self, input_, output_, params_):
1527
1628
:param LabelTensor input_: Input points where the equation is evaluated.
1729
:param LabelTensor output_: Output tensor, eventually produced by a
18-
:class:`~torch.nn.Module` instance.
30+
:class:`torch.nn.Module` instance.
1931
:param dict params_: Dictionary of unknown parameters, associated with a
20-
:class:`~pina.problem.InverseProblem` instance.
32+
:class:`~pina.problem.inverse_problem.InverseProblem` instance.
2133
:return: The computed residual of the equation.
2234
:rtype: LabelTensor
2335
"""

pina/equation/system_equation.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
class SystemEquation(EquationInterface):
1010
"""
1111
Implementation of the System of Equations. Every ``equation`` passed to a
12-
:class:`~pina.condition.Condition` object must be either a :class:`Equation`
13-
or a :class:`~pina.equation.SystemEquation` instance.
12+
:class:`~pina.condition.condition.Condition` object must be either a
13+
:class:`~pina.equation.equation.Equation` or a
14+
:class:`~pina.equation.system_equation.SystemEquation` instance.
1415
"""
1516

1617
def __init__(self, list_equation, reduction=None):
@@ -56,10 +57,11 @@ def residual(self, input_, output_, params_=None):
5657
:param LabelTensor input_: Input points where each equation of the
5758
system is evaluated.
5859
:param LabelTensor output_: Output tensor, eventually produced by a
59-
:class:`~torch.nn.Module` instance.
60+
:class:`torch.nn.Module` instance.
6061
:param dict params_: Dictionary of unknown parameters, associated with a
61-
:class:`~pina.problem.InverseProblem` instance. If the equation is
62-
not related to a :class:`~pina.problem.InverseProblem` instance, the
62+
:class:`~pina.problem.inverse_problem.InverseProblem` instance.
63+
If the equation is not related to a
64+
:class:`~pina.problem.inverse_problem.InverseProblem` instance, the
6365
parameters must be initialized to ``None``. Default is ``None``.
6466
6567
:return: The aggregated residuals of the system of equations.

0 commit comments

Comments
 (0)