33import warnings
44from pina ._src .equation .equation import Equation
55from pina ._src .core .operator import laplacian
6+ from pina ._src .core .utils import check_consistency
67
78
89class FixedLaplacian (Equation ):
@@ -14,16 +15,29 @@ def __init__(self, value, components=None, d=None):
1415 """
1516 Initialization of the :class:`FixedLaplacian` class.
1617
17- :param float value: The fixed value to be enforced to the laplacian.
18- :param list[str] components: The name of the output variables for which
19- the fixed laplace condition is applied. It should be a subset of the
20- output labels. If ``None``, all output variables are considered.
21- Default is ``None``.
22- :param list[str] d: The name of the input variables on which the
23- laplacian is computed. It should be a subset of the input labels.
24- If ``None``, all the input variables are considered.
25- Default is ``None``.
18+ :param value: The fixed value to be enforced to the laplacian.
19+ :type value: float | int
20+ :param components: The name of the output variables for which the fixed
21+ laplace condition is applied. It should be a subset of the output
22+ labels. If ``None``, all output variables are considered. Default is
23+ ``None``.
24+ :type components: str | list[str]
25+ :param d: The name of the input variables on which the laplacian is
26+ computed. It should be a subset of the input labels. If ``None``,
27+ all the input variables are considered. Default is ``None``.
28+ :type d: str | list[str]
29+ :raises ValueError: If ``value`` is neither a float nor an integer.
30+ :raises ValueError: If, when provided, ``components`` is neither a
31+ string nor a list of strings.
32+ :raises ValueError: If, when provided, ``d`` is neither a string nor a
33+ list of strings.
2634 """
35+ # Check consistency
36+ check_consistency (value , (float , int ))
37+ if components is not None :
38+ check_consistency (components , str )
39+ if d is not None :
40+ check_consistency (d , str )
2741
2842 def equation (input_ , output_ ):
2943 """
0 commit comments