# pymor.analyticalproblems package¶

## Submodules¶

### burgers module¶

`pymor.analyticalproblems.burgers.``burgers_problem`(v=1.0, circle=True, initial_data_type='sin', parameter_range=(1.0, 2.0))[source]

One-dimensional Burgers-type problem.

The problem is to solve

```∂_t u(x, t, μ)  +  ∂_x (v * u(x, t, μ)^μ) = 0
u(x, 0, μ) = u_0(x)
```

for u with t in [0, 0.3] and x in [0, 2].

Parameters

v

The velocity v.

circle

If `True`, impose periodic boundary conditions. Otherwise Dirichlet left, outflow right.

initial_data_type

Type of initial data (`'sin'` or `'bump'`).

parameter_range

The interval in which μ is allowed to vary.

`pymor.analyticalproblems.burgers.``burgers_problem_2d`(vx=1.0, vy=1.0, torus=True, initial_data_type='sin', parameter_range=(1.0, 2.0))[source]

Two-dimensional Burgers-type problem.

The problem is to solve

```∂_t u(x, t, μ)  +  ∇ ⋅ (v * u(x, t, μ)^μ) = 0
u(x, 0, μ) = u_0(x)
```

for u with t in [0, 0.3], x in [0, 2] x [0, 1].

Parameters

vx

The x component of the velocity vector v.

vy

The y component of the velocity vector v.

torus

If `True`, impose periodic boundary conditions. Otherwise, Dirichlet left and bottom, outflow top and right.

initial_data_type

Type of initial data (`'sin'` or `'bump'`).

parameter_range

The interval in which μ is allowed to vary.

### elliptic module¶

class `pymor.analyticalproblems.elliptic.``StationaryProblem`(domain, rhs=None, diffusion=None, advection=None, nonlinear_advection=None, nonlinear_advection_derivative=None, reaction=None, nonlinear_reaction=None, nonlinear_reaction_derivative=None, dirichlet_data=None, neumann_data=None, robin_data=None, outputs=None, parameter_space=None, name=None)[source]

Linear elliptic problem description.

The problem consists in solving

```- ∇ ⋅ [d(x, μ) ∇ u(x, μ)] + ∇ ⋅ [f(x, u(x, μ), μ)] + c(x, u(x, μ), μ) = f(x, μ)
```

for u.

Parameters

domain

A `DomainDescription` of the domain the problem is posed on.

rhs

The `Function` f(x, μ). `rhs.dim_domain` has to agree with the dimension of `domain`, whereas `rhs.shape_range` has to be `()`.

diffusion

The `Function` d(x, μ) with `shape_range` of either `()` or `(dim domain, dim domain)`.

The `Function` f, only depending on x, with `shape_range` of `(dim domain,)`.

The `Function` f, only depending on u, with `shape_range` of `(dim domain,)`.

The derivative of f, only depending on u, with respect to u.

reaction

The `Function` c, only depending on x, with `shape_range` of `()`.

nonlinear_reaction

The `Function` c, only depending on u, with `shape_range` of `()`.

nonlinear_reaction_derivative

The derivative of the `Function` c, only depending on u, with `shape_range` of `()`.

dirichlet_data

`Function` providing the Dirichlet boundary values.

neumann_data

`Function` providing the Neumann boundary values.

robin_data

Tuple of two `Functions` providing the Robin parameter and boundary values.

outputs

Tuple of additional output functionals to assemble. Each value must be a tuple of the form `(functional_type, data)` where `functional_type` is a string defining the type of functional to assemble and `data` is a `Function` holding the corresponding coefficient function. Currently implemented `functional_types` are:

l2

Evaluate the l2-product with the given data function.

l2_boundary

Evaluate the l2-product with the given data function on the boundary.

parameter_space

`ParameterSpace` for the problem.

name

Name of the problem.

`domain`
`rhs`
`diffusion`
`advection`
`nonlinear_advection`
`nonlinear_advection_derivative`
`reaction`
`nonlinear_reaction`
`nonlinear_reaction_derivative`
`dirichlet_data`
`neumann_data`
`robin_data`
`outputs`

### helmholtz module¶

`pymor.analyticalproblems.helmholtz.``helmholtz_problem`(domain=RectDomain(domain=array([[0, 0], [1, 1]])), rhs=None, parameter_range=(0.0, 100.0), dirichlet_data=None, neumann_data=None)[source]

Helmholtz equation problem.

This problem is to solve the Helmholtz equation

```- ∆ u(x, k) - k^2 u(x, k) = f(x, k)
```

on a given domain.

Parameters

domain

A `DomainDescription` of the domain the problem is posed on.

rhs

The `Function` f(x, μ).

parameter_range

A tuple `(k_min, k_max)` describing the interval in which k is allowd to vary.

dirichlet_data

`Function` providing the Dirichlet boundary values.

neumann_data

`Function` providing the Neumann boundary values.

### instationary module¶

class `pymor.analyticalproblems.instationary.``InstationaryProblem`(stationary_part, initial_data, T=1.0, parameter_space=None, name=None)[source]

Instationary problem description.

This class describes an instationary problem of the form

```|    ∂_t u(x, t, μ) + A(u(x, t, μ), t, μ) = f(x, t, μ),
|                              u(x, 0, μ) = u_0(x, μ)
```

where A, f are given by the problem’s `stationary_part` and t is allowed to vary in the interval [0, T].

Parameters

stationary_part

The stationary part of the problem.

initial_data

`Function` providing the initial values u_0.

T

The final time T.

parameter_space

`ParameterSpace` for the problem.

name

Name of the problem.

`T`
`stationary_part`
`parameter_space`
`name`

### text module¶

`pymor.analyticalproblems.text.``text_problem`(text='pyMOR', font_name=None)[source]

### thermalblock module¶

`pymor.analyticalproblems.thermalblock.``thermal_block_problem`(num_blocks=(3, 3), parameter_range=(0.1, 1))[source]

Analytical description of a 2D ‘thermal block’ diffusion problem.

The problem is to solve the elliptic equation

```- ∇ ⋅ [ d(x, μ) ∇ u(x, μ) ] = f(x, μ)
```

on the domain [0,1]^2 with Dirichlet zero boundary values. The domain is partitioned into nx x ny blocks and the diffusion function d(x, μ) is constant on each such block (i,j) with value μ_ij.

```----------------------------
|        |        |        |
|  μ_11  |  μ_12  |  μ_13  |
|        |        |        |
|---------------------------
|        |        |        |
|  μ_21  |  μ_22  |  μ_23  |
|        |        |        |
----------------------------
```

Parameters

num_blocks

The tuple `(nx, ny)`

parameter_range

A tuple `(μ_min, μ_max)`. Each `Parameter` component μ_ij is allowed to lie in the interval [μ_min, μ_max].