Skip to content

Commit 968c175

Browse files
tmp commit
1 parent 06e14bd commit 968c175

File tree

7 files changed

+24
-42
lines changed

7 files changed

+24
-42
lines changed

pina/problem/zoo/advection.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ class AdvectionProblem(SpatialProblem, TimeDependentProblem):
3333
DOI: `arXiv:2308.08468 <https://arxiv.org/abs/2308.08468>`_.
3434
3535
:Example:
36-
37-
>>> problem = AdvectionProblem(c=1.0)
36+
>>> problem = AdvectionProblem()
3837
"""
3938

4039
output_variables = ["u"]
@@ -54,7 +53,7 @@ def __init__(self, c=1.0):
5453
"""
5554
Initialization of the :class:`AdvectionProblem`.
5655
57-
:param c: The advection velocity parameter. Default is 1.0.
56+
:param c: The advection velocity parameter.
5857
:type c: float | int
5958
"""
6059
super().__init__()

pina/problem/zoo/allen_cahn.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class AllenCahnProblem(TimeDependentProblem, SpatialProblem):
2828
:math:`[-1, 1]` and temporal interval :math:`[0, 1]`.
2929
3030
.. seealso::
31-
3231
**Original reference**: Sokratis J. Anagnostopoulos, Juan D. Toscano,
3332
Nikolaos Stergiopulos, and George E. Karniadakis.
3433
*Residual-based attention and connection to information
@@ -38,8 +37,7 @@ class AllenCahnProblem(TimeDependentProblem, SpatialProblem):
3837
j.cma.2024.116805 <https://doi.org/10.1016/j.cma.2024.116805>`_.
3938
4039
:Example:
41-
42-
>>> problem = AllenCahnProblem(alpha=1e-4, beta=5.0)
40+
>>> problem = AllenCahnProblem()
4341
"""
4442

4543
output_variables = ["u"]
@@ -59,9 +57,9 @@ def __init__(self, alpha=1e-4, beta=5):
5957
"""
6058
Initialization of the :class:`AllenCahnProblem`.
6159
62-
:param alpha: The diffusion coefficient. Default is 1e-4.
60+
:param alpha: The diffusion coefficient.
6361
:type alpha: float | int
64-
:param beta: The reaction coefficient. Default is 5.0.
62+
:param beta: The reaction coefficient.
6563
:type beta: float | int
6664
"""
6765
super().__init__()

pina/problem/zoo/diffusion_reaction.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,12 @@ class DiffusionReactionProblem(TimeDependentProblem, SpatialProblem):
3434
:math:`[-\pi, \pi]` and temporal interval :math:`[0, 1]`.
3535
3636
.. seealso::
37-
3837
**Original reference**: Si, Chenhao, et al. *Complex Physics-Informed
3938
Neural Network.* arXiv preprint arXiv:2502.04917 (2025).
4039
DOI: `arXiv:2502.04917 <https://arxiv.org/abs/2502.04917>`_.
4140
4241
:Example:
43-
44-
>>> problem = DiffusionReactionProblem(alpha=1e-4)
42+
>>> problem = DiffusionReactionProblem()
4543
"""
4644

4745
output_variables = ["u"]
@@ -56,16 +54,16 @@ class DiffusionReactionProblem(TimeDependentProblem, SpatialProblem):
5654
}
5755

5856
conditions = {
59-
"g1": Condition(domain="g1", equation=FixedValue(value=0.0)),
60-
"g2": Condition(domain="g2", equation=FixedValue(value=0.0)),
57+
"g1": Condition(domain="g1", equation=FixedValue(0.0)),
58+
"g2": Condition(domain="g2", equation=FixedValue(0.0)),
6159
"t0": Condition(domain="t0", equation=Equation(initial_condition)),
6260
}
6361

6462
def __init__(self, alpha=1e-4):
6563
"""
6664
Initialization of the :class:`DiffusionReactionProblem`.
6765
68-
:param alpha: The diffusion coefficient. Default is 1e-4.
66+
:param alpha: The diffusion coefficient.
6967
:type alpha: float | int
7068
"""
7169
super().__init__()

pina/problem/zoo/helmholtz.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ class HelmholtzProblem(SpatialProblem):
1414
:math:`[-1, 1] \times [-1, 1]`.
1515
1616
.. seealso::
17-
1817
**Original reference**: Si, Chenhao, et al. *Complex Physics-Informed
1918
Neural Network.* arXiv preprint arXiv:2502.04917 (2025).
2019
DOI: `arXiv:2502.04917 <https://arxiv.org/abs/2502.04917>`_.
2120
2221
:Example:
23-
24-
>>> problem = HelmholtzProblem(alpha=3.0)
22+
>>> problem = HelmholtzProblem()
2523
"""
2624

2725
output_variables = ["u"]
@@ -36,17 +34,17 @@ class HelmholtzProblem(SpatialProblem):
3634
}
3735

3836
conditions = {
39-
"g1": Condition(domain="g1", equation=FixedValue(value=0.0)),
40-
"g2": Condition(domain="g2", equation=FixedValue(value=0.0)),
41-
"g3": Condition(domain="g3", equation=FixedValue(value=0.0)),
42-
"g4": Condition(domain="g4", equation=FixedValue(value=0.0)),
37+
"g1": Condition(domain="g1", equation=FixedValue(0.0)),
38+
"g2": Condition(domain="g2", equation=FixedValue(0.0)),
39+
"g3": Condition(domain="g3", equation=FixedValue(0.0)),
40+
"g4": Condition(domain="g4", equation=FixedValue(0.0)),
4341
}
4442

4543
def __init__(self, alpha=3.0):
4644
"""
4745
Initialization of the :class:`HelmholtzProblem` class.
4846
49-
:param alpha: Parameter of the forcing term. Default is 3.0.
47+
:param alpha: Parameter of the forcing term.
5048
:type alpha: float | int
5149
"""
5250
super().__init__()

pina/problem/zoo/inverse_poisson_2d_square.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ class InversePoisson2DSquareProblem(SpatialProblem, InverseProblem):
7777
downloaded successfully.
7878
7979
:Example:
80-
81-
>>> problem = InversePoisson2DSquareProblem(load=True, data_size=1.0)
80+
>>> problem = InversePoisson2DSquareProblem()
8281
"""
8382

8483
output_variables = ["u"]
@@ -96,10 +95,10 @@ class InversePoisson2DSquareProblem(SpatialProblem, InverseProblem):
9695
}
9796

9897
conditions = {
99-
"g1": Condition(domain="g1", equation=FixedValue(value=0.0)),
100-
"g2": Condition(domain="g2", equation=FixedValue(value=0.0)),
101-
"g3": Condition(domain="g3", equation=FixedValue(value=0.0)),
102-
"g4": Condition(domain="g4", equation=FixedValue(value=0.0)),
98+
"g1": Condition(domain="g1", equation=FixedValue(0.0)),
99+
"g2": Condition(domain="g2", equation=FixedValue(0.0)),
100+
"g3": Condition(domain="g3", equation=FixedValue(0.0)),
101+
"g4": Condition(domain="g4", equation=FixedValue(0.0)),
103102
"D": Condition(domain="D", equation=Equation(laplace_equation)),
104103
}
105104

@@ -109,7 +108,6 @@ def __init__(self, load=True, data_size=1.0):
109108
110109
:param bool load: If True, it attempts to load data from remote URLs.
111110
Set to False to skip data loading (e.g., if no internet connection).
112-
Default is True.
113111
:param float data_size: The fraction of the total data to use for the
114112
"data" condition. If set to 1.0, all available data is used.
115113
If set to 0.0, no data is used. Default is 1.0.

pina/problem/zoo/poisson_2d_square.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class Poisson2DSquareProblem(SpatialProblem):
2828
:math:`[0, 1] \times [0, 1]`.
2929
3030
:Example:
31-
3231
>>> problem = Poisson2DSquareProblem()
3332
"""
3433

@@ -44,10 +43,10 @@ class Poisson2DSquareProblem(SpatialProblem):
4443
}
4544

4645
conditions = {
47-
"g1": Condition(domain="g1", equation=FixedValue(value=0.0)),
48-
"g2": Condition(domain="g2", equation=FixedValue(value=0.0)),
49-
"g3": Condition(domain="g3", equation=FixedValue(value=0.0)),
50-
"g4": Condition(domain="g4", equation=FixedValue(value=0.0)),
46+
"g1": Condition(domain="g1", equation=FixedValue(0.0)),
47+
"g2": Condition(domain="g2", equation=FixedValue(0.0)),
48+
"g3": Condition(domain="g3", equation=FixedValue(0.0)),
49+
"g4": Condition(domain="g4", equation=FixedValue(0.0)),
5150
"D": Condition(domain="D", equation=Poisson(forcing_term=forcing_term)),
5251
}
5352

pina/problem/zoo/supervised_problem.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class SupervisedProblem(AbstractProblem):
1313
:class:`~pina.condition.input_target_condition.InputTargetCondition`.
1414
1515
:Example:
16-
1716
>>> import torch
1817
>>> input_data = torch.rand((100, 10))
1918
>>> output_data = torch.rand((100, 10))
@@ -34,17 +33,10 @@ def __init__(
3433
:type input_: torch.Tensor | LabelTensor | Graph | Data
3534
:param output_: Output data of the problem.
3635
:type output_: torch.Tensor | LabelTensor | Graph | Data
37-
:param list[str] input_variables: List of names of the input variables.
38-
If None, the input variables are inferred from `input_`.
39-
Default is None.
40-
:param list[str] output_variables: List of names of the output
41-
variables. If None, the output variables are inferred from
42-
`output_`. Default is None.
4336
"""
4437
# Set input and output variables
4538
self.input_variables = input_variables
4639
self.output_variables = output_variables
47-
4840
# Set the condition
4941
self.conditions["data"] = Condition(input=input_, target=output_)
5042
super().__init__()

0 commit comments

Comments
 (0)