pymor.bindings.ngsolve¶
Module Contents¶
Classes¶
Wraps a NGSolve BaseVector to make it usable with ListVectorArray. |
|
Interface for vectors used in conjunction with |
|
Wraps a NGSolve matrix as an |
|
Visualize an NGSolve grid function. |
- class pymor.bindings.ngsolve.NGSolveVector(impl)[source]¶
Bases:
NGSolveVectorCommon,pymor.vectorarrays.list.CopyOnWriteVectorWraps a NGSolve BaseVector to make it usable with ListVectorArray.
- class pymor.bindings.ngsolve.ComplexifiedNGSolveVector(real_part, imag_part)[source]¶
Bases:
NGSolveVectorCommon,pymor.vectorarrays.list.ComplexifiedVectorInterface for vectors used in conjunction with
ListVectorArray.This interface must be satisfied by the individual entries of the vector
listmanaged byListVectorArray. All interface methods have a direct counterpart in theVectorArrayinterface.
- class pymor.bindings.ngsolve.NGSolveVectorSpace(V, id='STATE')[source]¶
- class pymor.bindings.ngsolve.NGSolveMatrixOperator(matrix, range, source, solver_options=None, name=None)[source]¶
Bases:
pymor.operators.list.LinearComplexifiedListVectorArrayOperatorBaseWraps a NGSolve matrix as an
Operator.- _real_apply_inverse_one_vector(self, v, mu=None, initial_guess=None, least_squares=False, prepare_data=None)[source]¶
- _assemble_lincomb(self, operators, coefficients, identity_shift=0.0, solver_options=None, name=None)[source]¶
Try to assemble a linear combination of the given operators.
Returns a new
Operatorwhich represents the sumc_1*O_1 + ... + c_N*O_N + s*I
where
O_iareOperators,c_i,sscalar coefficients andIthe identity.This method is called in the
assemblemethod ofLincombOperatoron the first of its operators. If an assembly of the given linear combination is possible, e.g. the linear combination of the system matrices of the operators can be formed, then the assembled operator is returned. Otherwise, the method returnsNoneto indicate that assembly is not possible.Parameters
- operators
List of
OperatorsO_iwhose linear combination is formed.- coefficients
List of the corresponding linear coefficients
c_i.- identity_shift
The coefficient
s.- solver_options
solver_optionsfor the assembled operator.- name
Name of the assembled operator.
Returns
The assembled
Operatorif assembly is possible, otherwiseNone.
- as_vector(self, copy=True)[source]¶
Return a vector representation of a linear functional or vector operator.
Depending on the operator’s
sourceandrange, this method is equivalent to callingas_range_arrayoras_source_arrayrespectively. The resultingVectorArrayis required to have length 1.Parameters
- mu
The
parameter valuesfor which to return the vector representation.
Returns
- V
VectorArrayof length 1 containing the vector representation.
- class pymor.bindings.ngsolve.NGSolveVisualizer(mesh, fespace)[source]¶
Bases:
pymor.core.base.ImmutableObjectVisualize an NGSolve grid function.