black formatter
This commit is contained in:
@@ -27,7 +27,7 @@ class EllipsoidDomain(DomainInterface):
|
|||||||
Sampling for dimensions greater or equal to 10 could result in a
|
Sampling for dimensions greater or equal to 10 could result in a
|
||||||
shrinkage of the ellipsoid, which degrades the quality of the
|
shrinkage of the ellipsoid, which degrades the quality of the
|
||||||
samples. For dimensions higher than 10, see the following reference.
|
samples. For dimensions higher than 10, see the following reference.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
**Original reference**: Dezert, Jean, and Musso, Christian.
|
**Original reference**: Dezert, Jean, and Musso, Christian.
|
||||||
*An efficient method for generating points uniformly distributed
|
*An efficient method for generating points uniformly distributed
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class Equation(EquationInterface):
|
|||||||
:class:`torch.nn.Module` instance.
|
:class:`torch.nn.Module` instance.
|
||||||
:param dict params_: Dictionary of unknown parameters, associated with a
|
:param dict params_: Dictionary of unknown parameters, associated with a
|
||||||
:class:`~pina.problem.inverse_problem.InverseProblem` instance.
|
:class:`~pina.problem.inverse_problem.InverseProblem` instance.
|
||||||
If the equation is not related to a
|
If the equation is not related to a
|
||||||
:class:`~pina.problem.inverse_problem.InverseProblem` instance, the
|
:class:`~pina.problem.inverse_problem.InverseProblem` instance, the
|
||||||
parameters must be initialized to ``None``. Default is ``None``.
|
parameters must be initialized to ``None``. Default is ``None``.
|
||||||
:return: The computed residual of the equation.
|
:return: The computed residual of the equation.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ class EquationInterface(metaclass=ABCMeta):
|
|||||||
Equations in PINA simplify the training process. When defining a problem,
|
Equations in PINA simplify the training process. When defining a problem,
|
||||||
each equation passed to a :class:`~pina.condition.condition.Condition`
|
each equation passed to a :class:`~pina.condition.condition.Condition`
|
||||||
object must be either an :class:`~pina.equation.equation.Equation` or a
|
object must be either an :class:`~pina.equation.equation.Equation` or a
|
||||||
:class:`~pina.equation.system_equation.SystemEquation` instance.
|
:class:`~pina.equation.system_equation.SystemEquation` instance.
|
||||||
|
|
||||||
An :class:`~pina.equation.equation.Equation` is a wrapper for a callable
|
An :class:`~pina.equation.equation.Equation` is a wrapper for a callable
|
||||||
function, while :class:`~pina.equation.system_equation.SystemEquation`
|
function, while :class:`~pina.equation.system_equation.SystemEquation`
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class AllenCahnProblem(TimeDependentProblem, SpatialProblem):
|
|||||||
Computer Methods in Applied Mechanics and Engineering 421 (2024): 116805
|
Computer Methods in Applied Mechanics and Engineering 421 (2024): 116805
|
||||||
DOI: `10.1016/
|
DOI: `10.1016/
|
||||||
j.cma.2024.116805 <https://doi.org/10.1016/j.cma.2024.116805>`_.
|
j.cma.2024.116805 <https://doi.org/10.1016/j.cma.2024.116805>`_.
|
||||||
|
|
||||||
:Example:
|
:Example:
|
||||||
>>> problem = AllenCahnProblem()
|
>>> problem = AllenCahnProblem()
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class HelmholtzProblem(SpatialProblem):
|
|||||||
**Original reference**: Si, Chenhao, et al. *Complex Physics-Informed
|
**Original reference**: Si, Chenhao, et al. *Complex Physics-Informed
|
||||||
Neural Network.* arXiv preprint arXiv:2502.04917 (2025).
|
Neural Network.* arXiv preprint arXiv:2502.04917 (2025).
|
||||||
DOI: `arXiv:2502.04917 <https://arxiv.org/abs/2502.04917>`_.
|
DOI: `arXiv:2502.04917 <https://arxiv.org/abs/2502.04917>`_.
|
||||||
|
|
||||||
:Example:
|
:Example:
|
||||||
>>> problem = HelmholtzProblem()
|
>>> problem = HelmholtzProblem()
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class GAROM(MultiSolverInterface):
|
|||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Initialization of the :class:`GAROM` class.
|
Initialization of the :class:`GAROM` class.
|
||||||
|
|
||||||
:param AbstractProblem problem: The formulation of the problem.
|
:param AbstractProblem problem: The formulation of the problem.
|
||||||
:param torch.nn.Module generator: The generator model.
|
:param torch.nn.Module generator: The generator model.
|
||||||
:param torch.nn.Module discriminator: The discriminator model.
|
:param torch.nn.Module discriminator: The discriminator model.
|
||||||
@@ -50,7 +50,7 @@ class GAROM(MultiSolverInterface):
|
|||||||
:param Optimizer optimizer_generator: The optimizer for the generator.
|
:param Optimizer optimizer_generator: The optimizer for the generator.
|
||||||
If `None`, the :class:`torch.optim.Adam` optimizer is used.
|
If `None`, the :class:`torch.optim.Adam` optimizer is used.
|
||||||
Default is ``None``.
|
Default is ``None``.
|
||||||
:param Optimizer optimizer_discriminator: The optimizer for the
|
:param Optimizer optimizer_discriminator: The optimizer for the
|
||||||
discriminator. If `None`, the :class:`torch.optim.Adam` optimizer is
|
discriminator. If `None`, the :class:`torch.optim.Adam` optimizer is
|
||||||
used. Default is ``None``.
|
used. Default is ``None``.
|
||||||
:param Scheduler scheduler_generator: The learning rate scheduler for
|
:param Scheduler scheduler_generator: The learning rate scheduler for
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class SolverInterface(lightning.pytorch.LightningModule, metaclass=ABCMeta):
|
|||||||
def _check_solver_consistency(self, problem):
|
def _check_solver_consistency(self, problem):
|
||||||
"""
|
"""
|
||||||
Check the consistency of the solver with the problem formulation.
|
Check the consistency of the solver with the problem formulation.
|
||||||
|
|
||||||
:param AbstractProblem problem: The problem to be solved.
|
:param AbstractProblem problem: The problem to be solved.
|
||||||
"""
|
"""
|
||||||
for condition in problem.conditions.values():
|
for condition in problem.conditions.values():
|
||||||
@@ -290,6 +290,7 @@ class SingleSolverInterface(SolverInterface, metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
Base class for PINA solvers using a single :class:`torch.nn.Module`.
|
Base class for PINA solvers using a single :class:`torch.nn.Module`.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
problem,
|
problem,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class Trainer(lightning.pytorch.Trainer):
|
|||||||
"""
|
"""
|
||||||
Initialization of the :class:`Trainer` class.
|
Initialization of the :class:`Trainer` class.
|
||||||
|
|
||||||
:param SolverInterface solver: A
|
:param SolverInterface solver: A
|
||||||
:class:`~pina.solver.solver.SolverInterface` solver used to solve a
|
:class:`~pina.solver.solver.SolverInterface` solver used to solve a
|
||||||
:class:`~pina.problem.abstract_problem.AbstractProblem`.
|
:class:`~pina.problem.abstract_problem.AbstractProblem`.
|
||||||
:param int batch_size: The number of samples per batch to load.
|
:param int batch_size: The number of samples per batch to load.
|
||||||
|
|||||||
Reference in New Issue
Block a user