pymor.algorithms.image

Module Contents

class pymor.algorithms.image.CollectOperatorRangeRules(source, image, extends)[source]

Bases: pymor.algorithms.rules.RuleTable

RuleTable for the estimate_image algorithm.

action_ConcatenationOperator(op)[source]
action_EmpiricalInterpolatedOperator(op)[source]
action_apply_operator(op)[source]
action_recurse(op)[source]
class pymor.algorithms.image.CollectVectorRangeRules(image)[source]

Bases: pymor.algorithms.rules.RuleTable

RuleTable for the estimate_image algorithm.

action_ConcatenationOperator(op)[source]
action_VectorArray(obj)[source]
action_as_range_array(op)[source]
action_recurse(op)[source]
pymor.algorithms.image.estimate_image(operators=(), vectors=(), domain=None, extends=False, orthonormalize=True, product=None, riesz_representatives=False)[source]

Estimate the image of given Operators for all mu.

Let operators be a list of Operators with common source and range, and let vectors be a list of VectorArrays or vector-like Operators in the range of these operators. Given a VectorArray domain of vectors in the source of the operators, this algorithms determines a VectorArray image of range vectors such that the linear span of image contains:

  • op.apply(U, mu=mu) for all operators op in operators, for all possible Parameters mu and for all VectorArrays U contained in the linear span of domain,

  • U for all VectorArrays in vectors,

  • v.as_range_array(mu) for all Operators in vectors and all possible Parameters mu.

The algorithm will try to choose image as small as possible. However, no optimality is guaranteed. The image estimation algorithm is specified by CollectOperatorRangeRules and CollectVectorRangeRules.

Parameters:
  • operators – See above.

  • vectors – See above.

  • domain – See above. If None, an empty domain VectorArray is assumed.

  • extends – For some operators, e.g. EmpiricalInterpolatedOperator, as well as for all elements of vectors, image is estimated independently from the choice of domain. If extends is True, such operators are ignored. (This is useful in case these vectors have already been obtained by earlier calls to this function.)

  • orthonormalize – Compute an orthonormal basis for the linear span of image using the gram_schmidt algorithm.

  • product – Inner product Operator w.r.t. which to orthonormalize.

  • riesz_representatives – If True, compute Riesz representatives of the vectors in image before orthonormalizing (useful for dual norm computation when the range of the operators is a dual space).

Returns:

The VectorArray image.

Raises:

ImageCollectionError – Is raised when for a given Operator no image estimate is possible.

pymor.algorithms.image.estimate_image_hierarchical(operators=(), vectors=(), domain=None, extends=None, orthonormalize=True, product=None, riesz_representatives=False)[source]

Estimate the image of given Operators for all mu.

This is an extended version of estimate_image, which calls estimate_image individually for each vector of domain.

As a result, the vectors in the returned image VectorArray will be ordered by the domain vector they correspond to (starting with vectors which correspond to the elements of vectors and to Operators for which the image is estimated independently from domain).

This function also returns an image_dims list, such that the first image_dims[i+1] vectors of image correspond to the first i vectors of domain (the first image_dims[0] vectors correspond to vectors and to Operators with fixed image estimate).

Parameters:
Returns:

  • image – See above.

  • image_dims – See above.

Raises:

ImageCollectionError – Is raised when for a given Operator no image estimate is possible.