You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cuqi/pde/_pde.py
+13-8Lines changed: 13 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ class PDE(ABC):
17
17
Callable function which returns a tuple of the needed PDE components (expected components are explained in the subclasses)
18
18
19
19
observation_map: a function handle
20
-
A function that takes the PDE solution as input and the returns the observed solution. e.g. `observation_map=lambda u: u**2` or `observation_map=lambda u: u[0]`
20
+
A function that takes the PDE solution as input and the returns the observed solution. e.g. `observation_map=lambda u: u**2`.
21
21
22
22
grid_sol: np.ndarray
23
23
The grid on which solution is defined
@@ -195,7 +195,10 @@ class SteadyStateLinearPDE(LinearPDE):
195
195
Parameters
196
196
-----------
197
197
PDE_form : callable function
198
-
Callable function with signature `PDE_form(parameter1, parameter2, ...)` where `parameter1`, `parameter2`, etc. are the Bayesian unknown parameters (the user can choose any names for these parameters, e.g. `a`, `b`, etc.). The function returns a tuple with the discretized differential operator A and right-hand-side b. The types of A and b are determined by what the method :meth:`linalg_solve` accepts as first and second parameters, respectively.
198
+
Callable function with signature `PDE_form(parameter1, parameter2, ...)` where `parameter1`, `parameter2`, etc. are the Bayesian unknown parameters (the user can choose any names for these parameters, e.g. `a`, `b`, etc.). The function returns a tuple with the discretized differential operator A and right-hand-side b. The types of A and b are determined by what the method :meth:`linalg_solve` accepts as first and second parameters, respectively.
199
+
200
+
observation_map: a function handle
201
+
A function that takes the PDE solution and spatial grid as input and the returns the observed solution. e.g. `observation_map=lambda u, grid: u**2`.
199
202
200
203
kwargs:
201
204
See :class:`~cuqi.pde.LinearPDE` for the remaining keyword arguments.
@@ -205,8 +208,8 @@ class SteadyStateLinearPDE(LinearPDE):
205
208
See demo demos/demo24_fwd_poisson.py for an illustration on how to use SteadyStateLinearPDE with varying solver choices. And demos demos/demo25_fwd_poisson_2D.py and demos/demo26_fwd_poisson_mixedBC.py for examples with mixed (Dirichlet and Neumann) boundary conditions problems. demos/demo25_fwd_poisson_2D.py also illustrates how to observe on a specific boundary, for example.
@@ -252,6 +255,8 @@ class TimeDependentLinearPDE(LinearPDE):
252
255
method: str
253
256
Time stepping method. Currently two options are available `forward_euler` and `backward_euler`.
254
257
258
+
observation_map: a function handle
259
+
A function that takes the PDE solution, the spatial grid, and the time steps as input and the returns the observed solution. e.g. `observation_map=lambda u, grid, times: u**2`.
255
260
kwargs:
256
261
See :class:`~cuqi.pde.LinearPDE` for the remaining keyword arguments
257
262
@@ -261,8 +266,8 @@ class TimeDependentLinearPDE(LinearPDE):
0 commit comments