pymor.bindings.ngsolve

Module Contents

class pymor.bindings.ngsolve.ComplexifiedNGSolveVector(real_part, imag_part)[source]

Bases: NGSolveVectorCommon, 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.

class pymor.bindings.ngsolve.NGSolveMatrixOperator(matrix, range, source, solver_options=None, name=None)[source]

Bases: pymor.operators.list.LinearComplexifiedListVectorArrayOperatorBase

Wraps a NGSolve matrix as an Operator.

Methods

as_vector

Return a vector representation of a linear functional or vector operator.

as_vector(copy=True)[source]

Return a vector representation of a linear functional or vector operator.

Depending on the operator’s source and range, this method is equivalent to calling as_range_array or as_source_array respectively. The resulting VectorArray is required to have length 1.

Parameters

mu

The parameter values for which to return the vector representation.

Returns

V

VectorArray of length 1 containing the vector representation.

class pymor.bindings.ngsolve.NGSolveVector(impl)[source]

Bases: NGSolveVectorCommon, pymor.vectorarrays.list.CopyOnWriteVector

Wraps a NGSolve BaseVector to make it usable with ListVectorArray.

classmethod from_instance(instance)[source]
inner(other)[source]
norm()[source]
norm2()[source]
to_numpy(ensure_copy=False)[source]
class pymor.bindings.ngsolve.NGSolveVectorCommon[source]

Methods

amax

dofs

amax()[source]
dofs(dof_indices)[source]
class pymor.bindings.ngsolve.NGSolveVectorSpace(V, id='STATE')[source]

Bases: pymor.vectorarrays.list.ComplexifiedListVectorSpace

VectorSpace of ListVectorArrays.

real_vector_type[source]
vector_type[source]
real_make_vector(obj)[source]
real_vector_from_numpy(data, ensure_copy=False)[source]
real_zero_vector()[source]
classmethod space_from_vector_obj(vec, id)[source]
class pymor.bindings.ngsolve.NGSolveVisualizer(mesh, fespace)[source]

Bases: pymor.core.base.ImmutableObject

Visualize an NGSolve grid function.

Methods

visualize

Visualize the provided data.

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

Visualize the provided data.