pymor.models.hierarchy¶
Module Contents¶
- class pymor.models.hierarchy.DDRBModelHierarchy(fom, rb_reductor, dd_reductor_parameters, tol, compression=None, retrain_interval=1)[source]¶
Bases:
pymor.models.interface.ModelAdaptive model hierarchy combining data-driven and reduced basis models.
The adaptive model hierarchy consists of three models: A full-order model, a reduced basis ROM and a data-driven model. For a new parameter, the hierarchy evaluates the data-driven model first as it is (usually) the fastest model. The estimated error of the data-driven model is compared to the prescribed tolerance. If the error is below the tolerance, the data-driven solution is returned without calling the other two models. If the error is larger than the tolerance, the hierarchy falls back to the reduced basis model that is more accurate compared to the data-driven model but also more costly to evaluate. If the error of the reduced basis model is below the tolerance, its solution is returned and used to improve the data-driven model. If the error is too large, the full-order model is called and its solution used to extend the reduced basis of the reduced basis model.
The implementation is based on the strategies described in [HKO+23].
- Parameters:
fom – Full-order model used as last fallback option in the hierarchy.
rb_reductor – Reductor used to generate the reduced basis model.
dd_reductor_parameters – Attributes used to generate the
DataDrivenReductor.tol – Tolerance to which the estimated errors are compared to decide which solution to return.
compression – Either
Noneor a callable used to compress solutions before extending the reduced basis. Particularly useful when dealing with instationary problems where the solution trajectory should first be compressed using for instance thepodalgorithm.retrain_interval – Integer used to determine how many new training data points should be collected before training the data-driven model again.