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.CopyOnWriteVector
Wraps a NGSolve BaseVector to make it usable with ListVectorArray.
- 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 byListVectorArray
. All interface methods have a direct counterpart in theVectorArray
interface.
- 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.LinearComplexifiedListVectorArrayOperatorBase
Wraps 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
Operator
which represents the sumc_1*O_1 + ... + c_N*O_N + s*I
where
O_i
areOperators
,c_i
,s
scalar coefficients andI
the identity.This method is called in the
assemble
method ofLincombOperator
on 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 returnsNone
to indicate that assembly is not possible.Parameters
- operators
List of
Operators
O_i
whose linear combination is formed.- coefficients
List of the corresponding linear coefficients
c_i
.- identity_shift
The coefficient
s
.- solver_options
solver_options
for the assembled operator.- name
Name of the assembled operator.
Returns
The assembled
Operator
if 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
source
andrange
, this method is equivalent to callingas_range_array
oras_source_array
respectively. The resultingVectorArray
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.NGSolveVisualizer(mesh, fespace)[source]¶
Bases:
pymor.core.base.ImmutableObject
Visualize an NGSolve grid function.