pymor.models.interact

Module Contents

class pymor.models.interact.ParameterSelector(space, time_dependent)[source]

Bases: pymor.core.base.BasicObject

Parameter selector.

Methods

display

on_change

display()[source]
on_change(handler)[source]
pymor.models.interact.interact(model, parameter_space, show_solution=True, visualizer=None, transform=None)[source]

Interactively explore Model in jupyter environment.

This method dynamically creates a set of ipywidgets to interactively visualize a model’s solution and output.

Parameters

model

The Model to interact with.

parameter_space

ParameterSpace within which the Parameters of the model can be chosen.

show_solution

If True, show the model’s solution for the given parameters.

visualizer

A method of the form visualize(U, return_widget=True) which is called to obtain an ipywidget that renders the solution. If None, model.visualize is used.

transform

A method transform(U, mu) returning the data that is passed to the visualizer. If None the solution U is passed directly.

Returns

The created widgets as a single ipywidget.