pymordemos.stokes

Module Contents

pymordemos.stokes.compute_speedup_and_errors(fom_results, rom_results)[source]
pymordemos.stokes.evaluate_fom_once(fom, mu)[source]
pymordemos.stokes.evaluate_rom_once(rom, reductor_stokes, mu)[source]
pymordemos.stokes.main(mu_low: float = Argument(0.01), mu_high: float = Argument(1000), modes: int = Argument(50), n_tests: int = Argument(10))[source]

This example demonstrates a MOR workflow for a 2D Stokes equation.

The script first computes POD bases for the velocity and pressure spaces from randomly sampled solutions of the full order model (FOM). Then, it constructs reduced order models (ROMs) using three different projection methods: supremizer enrichment Galerkin projection, least-squares projection with normal equations, and least-squares projection without normal equations. Finally, it evaluates the ROMs against the FOM on a set of random parameters.

pymordemos.stokes.print_results(speedups, errors_u, errors_p)[source]
pymordemos.stokes.PROJECTION_METHODS = ['supremizer_galerkin', 'ls-normal', 'ls-ls'][source]