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(self, 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(cls, instance)[source]
inner(self, other)[source]
norm(self)[source]
norm2(self)[source]
to_numpy(self, ensure_copy=False)[source]
class pymor.bindings.ngsolve.NGSolveVectorCommon[source]

Methods

amax

dofs

amax(self)[source]
dofs(self, 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]
property dim(self)[source]
real_make_vector(self, obj)[source]
real_vector_from_numpy(self, data, ensure_copy=False)[source]
real_zero_vector(self)[source]
classmethod space_from_vector_obj(cls, vec, id)[source]
property value_dim(self)[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(self, U, legend=None, separate_colorbars=True, filename=None, block=True)[source]

Visualize the provided data.