pymor.bindings.fenicsx

Module Contents

class pymor.bindings.fenicsx.ComplexifiedFenicsxVector(real_part, imag_part)[source]

Bases: pymor.vectorarrays.list.ComplexifiedVector

Interface for vectors used in conjunction with ListVectorArray.

This interface must be satisfied by the individual entries of the vector list managed by ListVectorArray. All interface methods have a direct counterpart in the VectorArray interface.

Methods

amax

abstract amax()[source]
class pymor.bindings.fenicsx.FenicsxMatrixOperator(matrix, source_space, range_space, solver_options=None, name=None)[source]

Bases: pymor.operators.list.LinearComplexifiedListVectorArrayOperatorBase

Wraps a FEniCSx matrix as an Operator.

class pymor.bindings.fenicsx.FenicsxVector(impl)[source]

Bases: pymor.vectorarrays.list.CopyOnWriteVector

Wraps a FEniCSx vector to make it usable with ListVectorArray.

abstract amax()[source]
dofs(dof_indices)[source]
classmethod from_instance(instance)[source]
inner(other)[source]
norm()[source]
norm2()[source]
sup_norm()[source]
to_numpy(ensure_copy=False)[source]
class pymor.bindings.fenicsx.FenicsxVectorSpace(V)[source]

Bases: pymor.vectorarrays.list.ComplexifiedListVectorSpace

VectorSpace of ListVectorArrays.

real_vector_type[source]
vector_type[source]
real_full_vector(value)[source]
real_make_vector(obj)[source]
real_random_vector(distribution, random_state, **kwargs)[source]
real_vector_from_numpy(data, ensure_copy=False)[source]
real_zero_vector()[source]
class pymor.bindings.fenicsx.FenicsxVisualizer(space)[source]

Bases: pymor.core.base.ImmutableObject

Visualize a FEniCSx grid function.

Parameters

space

The FenicsVectorSpace for which we want to visualize DOF vectors.

Methods

visualize

Visualize the provided data.

visualize(U, title='', legend=None, filename=None, block=True, separate_colorbars=True)[source]

Visualize the provided data.

Parameters

U

VectorArray of the data to visualize (length must be 1). Alternatively, a tuple of VectorArrays which will be visualized in separate windows. If filename is specified, only one VectorArray may be provided which, however, is allowed to contain multiple vectors that will be interpreted as a time series.

title

Title of the plot.

legend

Description of the data that is plotted. If U is a tuple of VectorArrays, legend has to be a tuple of the same length.

filename

If specified, write the data to that file. filename needs to have an extension supported by FEniCS (e.g. .pvd).

separate_colorbars

If True, use separate colorbars for each subplot.

block

If True, block execution until the plot window is closed.