Fixed Laplacian#

Module for defining the fixed laplacian equation.

class FixedLaplacian(value, components=None, d=None)[source]#

Bases: Equation

Equation to enforce a fixed laplacian for a specific condition.

Example:
>>> from pina.equation import FixedLaplacian
>>> eq = FixedLaplacian(value=0.0)
>>> # Use within a Condition:
>>> # condition = Condition(domain=domain, equation=eq)

Initialization of the FixedLaplacian class.

Parameters:
  • value (float | int) – The fixed value to be enforced to the laplacian.

  • components (str | list[str]) – The name of the output variables for which the fixed laplace condition is applied. It should be a subset of the output labels. If None, all output variables are considered. Default is None.

  • d (str | list[str]) – The name of the input variables on which the laplacian is computed. It should be a subset of the input labels. If None, all the input variables are considered. Default is None.

Raises:
  • ValueError – If value is neither a float nor an integer.

  • ValueError – If, when provided, components is neither a string nor a list of strings.

  • ValueError – If, when provided, d is neither a string nor a list of strings.

class Laplace(components=None, d=None)[source]#

Bases: FixedLaplacian

Deprecated wrapper for FixedLaplacian with value=0.0.

Deprecated since version 0.3: Use FixedLaplacian with value=0.0 instead.

Initialization of the FixedLaplacian class.

Parameters:
  • value (float | int) – The fixed value to be enforced to the laplacian.

  • components (str | list[str]) – The name of the output variables for which the fixed laplace condition is applied. It should be a subset of the output labels. If None, all output variables are considered. Default is None.

  • d (str | list[str]) – The name of the input variables on which the laplacian is computed. It should be a subset of the input labels. If None, all the input variables are considered. Default is None.

Raises:
  • ValueError – If value is neither a float nor an integer.

  • ValueError – If, when provided, components is neither a string nor a list of strings.

  • ValueError – If, when provided, d is neither a string nor a list of strings.