SteadyStateLinearPDE#
- class cuqi.pde.SteadyStateLinearPDE(PDE_form, observation_map=None, **kwargs)[source]#
Linear steady state PDE.
- Parameters:
PDE_form (callable function) – 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
linalg_solve()accepts as first and second parameters, respectively.observation_map (a function handle) – A function that takes the PDE solution, interpolated on grid_obs, as input and returns the observed solution. e.g. observation_map=lambda u, grid_obs: u**2.
kwargs – See
LinearPDEfor the remaining keyword arguments.
Example
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.
Methods
__init__(PDE_form[, observation_map])assemble(*args, **kwargs)Assembles differential operator and rhs according to PDE_form
interpolate_on_observed_domain(solution)Interpolate solution on observed space grid.
observe(solution)Apply observation operator to the solution.
solve()Solve the PDE and returns the solution and an information variable info which is a tuple of all variables returned by the function linalg_solve after the solution.
Attributes