pymor.reductors.basic¶
Module Contents¶
- class pymor.reductors.basic.DelayLTIPGReductor(fom, W, V, E_biorthonormal=False)[source]¶
Bases:
ProjectionBasedReductorPetrov-Galerkin projection of an
LinearDelayModel.- Parameters:
Methods
Extend a reduced basis with new vectors.
Reconstruct high-dimensional vector from reduced vector
u.- abstract extend_basis(**kwargs)[source]¶
Extend a reduced basis with new vectors.
Keyword arguments left as
Nonefall back toextension_paramsand anything not set there uses the defaults ofextend_basis.
- class pymor.reductors.basic.InstationaryRBReductor(fom, RB=None, product=None, initial_data_product=None, product_is_mass=False, check_orthonormality=None, check_tol=None, extension_params=None)[source]¶
Bases:
ProjectionBasedReductorGalerkin projection of an
InstationaryModel.- Parameters:
fom – The full order
Modelto reduce.RB – The basis of the reduced space onto which to project. If
Nonean empty basis is used.product – Inner product
Operatorw.r.t. whichRBis orthonormalized. IfNone, the the Euclidean inner product is used.initial_data_product – Inner product
Operatorw.r.t. which theinitial_dataoffomis orthogonally projected. IfNone, the Euclidean inner product is used.product_is_mass – If
True, no mass matrix for the reducedModelis assembled. Set toTrueifRBis orthonormal w.r.t. themassmatrix offom.check_orthonormality – See
ProjectionBasedReductor.check_tol – See
ProjectionBasedReductor.extension_params – See
ProjectionBasedReductor.
- class pymor.reductors.basic.LTIPGReductor(fom, W, V, E_biorthonormal=False)[source]¶
Bases:
ProjectionBasedReductorPetrov-Galerkin projection of an
LTIModel.- Parameters:
Methods
Extend a reduced basis with new vectors.
Reconstruct high-dimensional vector from reduced vector
u.- abstract extend_basis(**kwargs)[source]¶
Extend a reduced basis with new vectors.
Keyword arguments left as
Nonefall back toextension_paramsand anything not set there uses the defaults ofextend_basis.
- class pymor.reductors.basic.ProjectionBasedReductor(fom, bases, products={}, check_orthonormality=True, check_tol=0.001, extension_params=None)[source]¶
Bases:
pymor.core.base.BasicObjectGeneric projection based reductor.
- Parameters:
fom – The full order
Modelto reduce.bases – A dict of
VectorArraysof basis vectors.products – A dict of inner product
Operatorsw.r.t. which the corresponding bases are orthonormalized. A value ofNonecorresponds to orthonormalization of the basis w.r.t. the Euclidean inner product.check_orthonormality – If
True, check if bases which have a corresponding entry in theproductsdict are orthonormal w.r.t. the given inner product. After eachbasis extension, orthonormality is checked again.check_tol – If
check_orthonormalityisTrue, the numerical tolerance with which the checks are performed.extension_params – Dict of default keyword arguments for
extend_basis.
Methods
Adapt the ROM to new FOM solutions or to an updated FOM.
Extend a reduced basis with new vectors.
Reconstruct high-dimensional vector from reduced vector
u.- adapt(mu, new_fom=None, fom_solution=None, fom_output=None)[source]¶
Adapt the ROM to new FOM solutions or to an updated FOM.
Extends the reduced basis using a more accurate solution and returns the newly reduced model. Only implemented for reductors with a single
'RB'basis.- Parameters:
mu –
Parameter valuefor which to adapt. Only used to computefom_solutionif it is not provided.new_fom – A more accurate model (one level above in the hierarchy) to adapt from. If given, the reference model of this reductor is replaced by
new_fomand the existing basis is embedded into its (enlarged) solution space by zero-padding.fom_solution – More accurate solution used as training data. Computed from
muif not provided.fom_output – Corresponding more accurate output (ignored).
- Returns:
new_rom – The reduced model obtained after adaptation.
- extend_basis(U, basis='RB', method=None, pod_modes=None, pod_orthonormalize=None, copy_U=None)[source]¶
Extend a reduced basis with new vectors.
Keyword arguments left as
Nonefall back toextension_paramsand anything not set there uses the defaults ofextend_basis.
- class pymor.reductors.basic.ProxyEstimator(fom, reductor=None)[source]¶
Bases:
pymor.core.base.ImmutableObjectEstimate error using the FOM’s error estimator.
This error estimator reconstructs the given ROM solution and then evaluates the error estimator of the FOM for the reconstructed solution.
Note
This approach assumes that the FOM error estimator yields appropriate estimates for arbitrary vectors from the FOM’s
solution_space. While this is typically true for residual-based ROM error estimators, most FEM error estimators only yield reliable estimates for the actual finite-element solution.- Parameters:
fom – The full-order
Modelwhich is used to estimate the error. Must have anerror_estimatorattribute.reductor – The reductor used for reconstructing the solution vector. When
None, it is assumed that both models have the samesolution_space.
Methods
- class pymor.reductors.basic.SOLTIPGReductor(fom, W, V, M_biorthonormal=False)[source]¶
Bases:
ProjectionBasedReductorPetrov-Galerkin projection of an
SecondOrderModel.- Parameters:
Methods
Extend a reduced basis with new vectors.
Reconstruct high-dimensional vector from reduced vector
u.- abstract extend_basis(**kwargs)[source]¶
Extend a reduced basis with new vectors.
Keyword arguments left as
Nonefall back toextension_paramsand anything not set there uses the defaults ofextend_basis.
- class pymor.reductors.basic.StationaryLSRBReductor(fom, RB=None, product=None, use_normal_equations=False, check_orthonormality=None, check_tol=None)[source]¶
Bases:
ProjectionBasedReductorLeast-squares Petrov-Galerkin projection based reductor for stationary problems.
This reductor solves a least-squares problem either by Galerkin projection of the normal equations (
use_normal_equations = True) or by Petrov-Galerkin projection of the least-squares residual.- Parameters:
fom – The full order
Modelto reduce.RB – The basis of the reduced space onto which to project. If
None, an empty basis is used.product – Inner product
Operatorw.r.t. whichRBis orthonormalized. IfNone, the Euclidean inner product is used.use_normal_equations – If
True, projects the normal equation instead of using a least-squares solver. IfFalse, equip the operator with a least-squares solver.check_orthonormality – See
ProjectionBasedReductor.check_tol – See
ProjectionBasedReductor.
- class pymor.reductors.basic.StationaryRBReductor(fom, RB=None, product=None, check_orthonormality=None, check_tol=None, extension_params=None)[source]¶
Bases:
ProjectionBasedReductorGalerkin projection of a
StationaryModel.- Parameters:
fom – The full order
Modelto reduce.RB – The basis of the reduced space onto which to project. If
Nonean empty basis is used.product – Inner product
Operatorw.r.t. whichRBis orthonormalized. IfNone, the Euclidean inner product is used.check_orthonormality – See
ProjectionBasedReductor.check_tol – See
ProjectionBasedReductor.extension_params – See
ProjectionBasedReductor.