SpatialProblem#

Module for the SpatialProblem class.

class SpatialProblem[source]#

Bases: BaseProblem

Base class for all spatial problems, extending the standard problem definition with spatial-dependent inputs.

A spatial problem is defined over a spatial domain, where input variables represent the coordinates of the system (e.g., positions in one or more dimensions) on which the solution is evaluated.

This class is not meant to be instantiated directly.

Example:
>>> from pina.problem import SpatialProblem
>>> from pina.domain import CartesianDomain
>>> class MySpatialProblem(SpatialProblem):
...     @property
...     def spatial_domain(self):
...         return CartesianDomain({"x": [0, 1], "y": [0, 1]})
...     @property
...     def conditions(self): return {}
>>> problem = MySpatialProblem()
>>> problem.spatial_variables
['x', 'y']

Initialization of the BaseProblem class.

abstract property spatial_domain#

The domain of spatial variables of the problem.

property spatial_variables#

The spatial input variables of the problem.

Returns:

The spatial input variables of the problem.

Return type:

list[str]