pymordemos.thermalblock

Module Contents

pymordemos.thermalblock.discretize_fenics(xblocks, yblocks, grid_num_intervals, element_order)[source]
pymordemos.thermalblock.discretize_pymor(xblocks, yblocks, grid_num_intervals, use_list_vector_array)[source]
pymordemos.thermalblock.main(xblocks: int = Argument(..., help='Number of blocks in x direction.'), yblocks: int = Argument(..., help='Number of blocks in y direction.'), snapshots: int = Argument(..., help='naive: ignored\n\ngreedy/pod: Number of training_set parameters per block (in total SNAPSHOTS^(XBLOCKS * YBLOCKS) parameters).\n\nadaptive_greedy: size of validation set.\n\n'), rbsize: int = Argument(..., help='Size of the reduced basis.'), adaptive_greedy_gamma: float = Option(0.2, help='See pymor.algorithms.adaptivegreedy.'), adaptive_greedy_rho: float = Option(1.1, help='See pymor.algorithms.adaptivegreedy.'), adaptive_greedy_theta: float = Option(0.0, help='See pymor.algorithms.adaptivegreedy.'), alg: Choices('naive greedy adaptive_greedy pod') = Option('greedy', help='The model reduction algorithm to use.'), cache_region: Choices('none memory disk persistent') = Option('none', help='Name of cache region to use for caching solution snapshots.'), extension_alg: Choices('trivial gram_schmidt') = Option('gram_schmidt', help='Basis extension algorithm to be used.'), fenics: bool = Option(False, help='Use FEniCS model.'), greedy_with_error_estimator: bool = Option(True, help='Use error estimator for basis generation.'), grid: int = Option(100, help='Use grid with 4*NI*NI elements'), ipython_engines: int = Option(None, help='If positive, the number of IPython cluster engines to use for parallel greedy search. If zero, no parallelization is performed.'), ipython_profile: str = Option(None, help='IPython profile to use for parallelization.'), list_vector_array: bool = Option(False, help='Solve using ListVectorArray[NumpyVector] instead of NumpyVectorArray.'), order: int = Option(1, help='Polynomial order of the Lagrange finite elements to use in FEniCS.'), pickle: str = Option(None, help='Pickle reduced model, as well as reductor and high-dimensional model to files with this prefix.'), product: Choices('euclidean h1') = Option('h1', help='Product w.r.t. which to orthonormalize and calculate Riesz representatives.'), plot_err: bool = Option(False, help='Plot error'), plot_error_sequence: bool = Option(False, help='Plot reduction error vs. basis size.'), plot_solutions: bool = Option(False, help='Plot some example solutions.'), reductor: Choices('traditional residual_basis') = Option('residual_basis', help='Reductor (error estimator) to choose.'), test: int = Option(10, help='Use COUNT snapshots for stochastic error estimation.'))[source]

Thermalblock demo.

pymordemos.thermalblock.reduce_adaptive_greedy(fom, reductor, parameter_space, validation_mus, extension_alg_name, max_extensions, use_error_estimator, rho, gamma, theta, pool)[source]
pymordemos.thermalblock.reduce_greedy(fom, reductor, parameter_space, snapshots_per_block, extension_alg_name, max_extensions, use_error_estimator, pool)[source]
pymordemos.thermalblock.reduce_naive(fom, reductor, parameter_space, basis_size)[source]
pymordemos.thermalblock.reduce_pod(fom, reductor, parameter_space, snapshots_per_block, basis_size)[source]