Institut für Numerische und Angewandte Mathematik
FB Mathematik und Informatik der Universität Münster
Prof. Dr. Mario Ohlberger und Dr. Stephan Rave
%matplotlib notebook
from pymor.basic import *
from problems import *
from algorithms import *
from matplotlib import pyplot as plt
import time
set_log_levels({'pymor.discretizations': 'WARN',
'pymor.discretizers': 'WARN',
'pymor.functions.bitmap': 'CRITICAL'})
Wie zuvor legen wir die Diskretisierung an und definieren einen geeigneten Reduktor:
d, _ = discretize_stationary_cg(problem_1_2_c())
reductor = CoerciveRBReductor(
d, product=d.h1_0_semi_product,
coercivity_estimator=ExpressionParameterFunctional('min([1, R, B])', d.parameter_type)
)
00:00 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 00:00 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 00:00 DiffusionOperatorP1: Determine global dofs ... 00:00 DiffusionOperatorP1: Boundary treatment ... 00:00 DiffusionOperatorP1: Assemble system matrix ... 00:00 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 00:00 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 00:00 DiffusionOperatorP1: Determine global dofs ... 00:00 DiffusionOperatorP1: Boundary treatment ... 00:00 DiffusionOperatorP1: Assemble system matrix ... 00:00 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 00:00 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 00:00 DiffusionOperatorP1: Determine global dofs ... 00:00 DiffusionOperatorP1: Boundary treatment ... 00:00 DiffusionOperatorP1: Assemble system matrix ... 00:00 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 00:00 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 00:00 DiffusionOperatorP1: Determine global dofs ... 00:00 DiffusionOperatorP1: Boundary treatment ... 00:00 DiffusionOperatorP1: Assemble system matrix ... 00:01 L2ProductP1: Integrate the products of the shape functions on each element 00:01 L2ProductP1: Determine global dofs ... 00:01 L2ProductP1: Boundary treatment ... 00:01 L2ProductP1: Assemble system matrix ... 00:01 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 00:01 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 00:01 DiffusionOperatorP1: Determine global dofs ... 00:01 DiffusionOperatorP1: Boundary treatment ... 00:01 DiffusionOperatorP1: Assemble system matrix ... 00:01 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 00:01 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 00:01 DiffusionOperatorP1: Determine global dofs ... 00:01 DiffusionOperatorP1: Boundary treatment ... 00:01 DiffusionOperatorP1: Assemble system matrix ... 00:01 L2ProductP1: Integrate the products of the shape functions on each element 00:01 L2ProductP1: Determine global dofs ... 00:01 L2ProductP1: Boundary treatment ... 00:01 L2ProductP1: Assemble system matrix ...
Im Anschluss konstruieren wir eine reduzierte Basis mit dem Weak-Greedy-Verfahren. Hierzu verwenden wir pymor.algorithms.greedy.greedy. Die ersten drei Parameter, die von dem Algorithmus erwartet werden, sind die zu reduzierende Diskretisierung, der Reduktor, sowie eine Menge an Trainings-Parametern. Zusätzlich legen wir fest, dass eine Basis der Größe 30 generiert werden soll, und zur Basiserweiterung reductor.extend_basis mit dem Parameter method='gram_schmidt' verwendet werden soll:
greedy_data = greedy(
d, reductor, d.parameter_space.sample_uniformly(100),
max_extensions=30,
extension_params={'method': 'gram_schmidt'}
)
00:01 greedy: Started greedy search on 10000 samples
00:01 greedy: Reducing ...
00:01 | CoerciveRBReductor: RB projection ...
00:01 | CoerciveRBReductor: Assembling error estimator ...
00:01 | | ResidualReductor: Estimating residual range ...
00:01 | | | estimate_image_hierarchical: Estimating image for basis vector -1 ...
00:02 | | | estimate_image_hierarchical: Orthonormalizing ...
00:02 | | ResidualReductor: Projecting residual operator ...
00:02 greedy: Estimating errors ...
00:05 greedy: Maximum error after 0 extensions: 5199.189979573535 (mu = {B: 0.0001, R: 0.0001})
00:05 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.0001} ...
00:05 greedy: Extending basis with solution snapshot ...
00:05 greedy: Reducing ...
00:05 | CoerciveRBReductor: RB projection ...
00:05 | CoerciveRBReductor: Assembling error estimator ...
00:05 | | ResidualReductor: Estimating residual range ...
00:05 | | | estimate_image_hierarchical: Estimating image for basis vector 0 ...
00:05 | | | estimate_image_hierarchical: Orthonormalizing ...
00:05 | | | | gram_schmidt: Removing vector 1 of norm 5.391986272059822e-18
00:05 | | | | gram_schmidt: Removing linear dependent vector 4
00:05 | | ResidualReductor: Projecting residual operator ...
00:05 greedy: Estimating errors ...
00:09 greedy: Maximum error after 1 extensions: 3588.8146149577183 (mu = {B: 0.0001, R: 1.0})
00:09 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 1.0} ...
00:09 greedy: Extending basis with solution snapshot ...
00:09 greedy: Reducing ...
00:09 | CoerciveRBReductor: RB projection ...
00:09 | CoerciveRBReductor: Assembling error estimator ...
00:09 | | ResidualReductor: Estimating residual range ...
00:09 | | | estimate_image_hierarchical: Estimating image for basis vector 1 ...
00:09 | | | estimate_image_hierarchical: Orthonormalizing ...
00:09 | | | | gram_schmidt: Removing vector 3 of norm 1.4202669682039294e-17
00:09 | | | | gram_schmidt: Orthonormalizing vector 4 again
00:09 | | | | gram_schmidt: Orthonormalizing vector 6 again
00:09 | | ResidualReductor: Projecting residual operator ...
00:09 greedy: Estimating errors ...
00:13 greedy: Maximum error after 2 extensions: 2764.7755366045703 (mu = {B: 1.0, R: 0.0001})
00:13 greedy: Computing solution snapshot for mu = {B: 1.0, R: 0.0001} ...
00:13 greedy: Extending basis with solution snapshot ...
00:13 greedy: Reducing ...
00:13 | CoerciveRBReductor: RB projection ...
00:13 | CoerciveRBReductor: Assembling error estimator ...
00:13 | | ResidualReductor: Estimating residual range ...
00:13 | | | estimate_image_hierarchical: Estimating image for basis vector 2 ...
00:13 | | | estimate_image_hierarchical: Orthonormalizing ...
00:13 | | | | gram_schmidt: Removing vector 6 of norm 1.5079215320133834e-17
00:13 | | | | gram_schmidt: Orthonormalizing vector 8 again
00:13 | | ResidualReductor: Projecting residual operator ...
00:13 greedy: Estimating errors ...
00:17 greedy: Maximum error after 3 extensions: 202.7329220834271 (mu = {B: 0.0001, R: 0.22229999999999997})
00:17 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.22229999999999997} ...
00:17 greedy: Extending basis with solution snapshot ...
00:17 | gram_schmidt: Orthonormalizing vector 3 again
00:17 greedy: Reducing ...
00:17 | CoerciveRBReductor: RB projection ...
00:17 | CoerciveRBReductor: Assembling error estimator ...
00:17 | | ResidualReductor: Estimating residual range ...
00:17 | | | estimate_image_hierarchical: Estimating image for basis vector 3 ...
00:17 | | | estimate_image_hierarchical: Orthonormalizing ...
00:17 | | | | gram_schmidt: Removing vector 9 of norm 1.5090794153035123e-16
00:17 | | | | gram_schmidt: Orthonormalizing vector 11 again
00:17 | | | | gram_schmidt: Orthonormalizing vector 12 again
00:17 | | ResidualReductor: Projecting residual operator ...
00:17 greedy: Estimating errors ...
00:21 greedy: Maximum error after 4 extensions: 198.2312470568775 (mu = {B: 0.2728, R: 0.0001})
00:21 greedy: Computing solution snapshot for mu = {B: 0.2728, R: 0.0001} ...
00:21 greedy: Extending basis with solution snapshot ...
00:21 | gram_schmidt: Orthonormalizing vector 4 again
00:21 greedy: Reducing ...
00:21 | CoerciveRBReductor: RB projection ...
00:21 | CoerciveRBReductor: Assembling error estimator ...
00:21 | | ResidualReductor: Estimating residual range ...
00:21 | | | estimate_image_hierarchical: Estimating image for basis vector 4 ...
00:21 | | | estimate_image_hierarchical: Orthonormalizing ...
00:21 | | | | gram_schmidt: Removing vector 12 of norm 2.0843139467312482e-16
00:21 | | | | gram_schmidt: Orthonormalizing vector 15 again
00:21 | | ResidualReductor: Projecting residual operator ...
00:21 greedy: Estimating errors ...
00:26 greedy: Maximum error after 5 extensions: 46.28371663458428 (mu = {B: 0.0708, R: 0.0001})
00:26 greedy: Computing solution snapshot for mu = {B: 0.0708, R: 0.0001} ...
00:27 greedy: Extending basis with solution snapshot ...
00:27 | gram_schmidt: Orthonormalizing vector 5 again
00:27 greedy: Reducing ...
00:27 | CoerciveRBReductor: RB projection ...
00:27 | CoerciveRBReductor: Assembling error estimator ...
00:27 | | ResidualReductor: Estimating residual range ...
00:27 | | | estimate_image_hierarchical: Estimating image for basis vector 5 ...
00:27 | | | estimate_image_hierarchical: Orthonormalizing ...
00:27 | | | | gram_schmidt: Removing vector 15 of norm 3.2542138457139867e-16
00:27 | | | | gram_schmidt: Orthonormalizing vector 17 again
00:27 | | | | gram_schmidt: Orthonormalizing vector 18 again
00:27 | | ResidualReductor: Projecting residual operator ...
00:27 greedy: Estimating errors ...
00:31 greedy: Maximum error after 6 extensions: 41.35728288181194 (mu = {B: 0.0001, R: 0.060700000000000004})
00:31 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.060700000000000004} ...
00:31 greedy: Extending basis with solution snapshot ...
00:31 | gram_schmidt: Orthonormalizing vector 6 again
00:31 greedy: Reducing ...
00:31 | CoerciveRBReductor: RB projection ...
00:31 | CoerciveRBReductor: Assembling error estimator ...
00:31 | | ResidualReductor: Estimating residual range ...
00:31 | | | estimate_image_hierarchical: Estimating image for basis vector 6 ...
00:31 | | | estimate_image_hierarchical: Orthonormalizing ...
00:31 | | | | gram_schmidt: Removing vector 18 of norm 3.2893989762725844e-16
00:31 | | | | gram_schmidt: Orthonormalizing vector 21 again
00:31 | | ResidualReductor: Projecting residual operator ...
00:31 greedy: Estimating errors ...
00:35 greedy: Maximum error after 7 extensions: 18.968321429085044 (mu = {B: 0.0001, R: 0.596})
00:35 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.596} ...
00:35 greedy: Extending basis with solution snapshot ...
00:35 | gram_schmidt: Orthonormalizing vector 7 again
00:35 greedy: Reducing ...
00:35 | CoerciveRBReductor: RB projection ...
00:35 | CoerciveRBReductor: Assembling error estimator ...
00:35 | | ResidualReductor: Estimating residual range ...
00:35 | | | estimate_image_hierarchical: Estimating image for basis vector 7 ...
00:35 | | | estimate_image_hierarchical: Orthonormalizing ...
00:35 | | | | gram_schmidt: Removing vector 21 of norm 2.073184230116846e-15
00:35 | | | | gram_schmidt: Orthonormalizing vector 23 again
00:35 | | | | gram_schmidt: Orthonormalizing vector 24 again
00:35 | | ResidualReductor: Projecting residual operator ...
00:35 greedy: Estimating errors ...
00:41 greedy: Maximum error after 8 extensions: 15.67092279856719 (mu = {B: 0.6364, R: 0.0001})
00:41 greedy: Computing solution snapshot for mu = {B: 0.6364, R: 0.0001} ...
00:41 greedy: Extending basis with solution snapshot ...
00:41 | gram_schmidt: Orthonormalizing vector 8 again
00:41 greedy: Reducing ...
00:41 | CoerciveRBReductor: RB projection ...
00:41 | CoerciveRBReductor: Assembling error estimator ...
00:41 | | ResidualReductor: Estimating residual range ...
00:41 | | | estimate_image_hierarchical: Estimating image for basis vector 8 ...
00:41 | | | estimate_image_hierarchical: Orthonormalizing ...
00:41 | | | | gram_schmidt: Removing vector 24 of norm 3.6145476004159095e-15
00:41 | | | | gram_schmidt: Orthonormalizing vector 25 again
00:41 | | | | gram_schmidt: Orthonormalizing vector 26 again
00:41 | | | | gram_schmidt: Orthonormalizing vector 27 again
00:41 | | ResidualReductor: Projecting residual operator ...
00:41 greedy: Estimating errors ...
00:45 greedy: Maximum error after 9 extensions: 6.281860618856772 (mu = {B: 0.0203, R: 0.0001})
00:45 greedy: Computing solution snapshot for mu = {B: 0.0203, R: 0.0001} ...
00:45 greedy: Extending basis with solution snapshot ...
00:45 | gram_schmidt: Orthonormalizing vector 9 again
00:45 greedy: Reducing ...
00:45 | CoerciveRBReductor: RB projection ...
00:46 | CoerciveRBReductor: Assembling error estimator ...
00:46 | | ResidualReductor: Estimating residual range ...
00:46 | | | estimate_image_hierarchical: Estimating image for basis vector 9 ...
00:46 | | | estimate_image_hierarchical: Orthonormalizing ...
00:46 | | | | gram_schmidt: Removing vector 27 of norm 3.682173922910782e-15
00:46 | | | | gram_schmidt: Orthonormalizing vector 29 again
00:46 | | | | gram_schmidt: Orthonormalizing vector 30 again
00:46 | | ResidualReductor: Projecting residual operator ...
00:46 greedy: Estimating errors ...
00:53 greedy: Maximum error after 10 extensions: 4.6462018798861875 (mu = {B: 0.0001, R: 0.0203})
00:53 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.0203} ...
00:53 greedy: Extending basis with solution snapshot ...
00:53 | gram_schmidt: Orthonormalizing vector 10 again
00:53 greedy: Reducing ...
00:53 | CoerciveRBReductor: RB projection ...
00:53 | CoerciveRBReductor: Assembling error estimator ...
00:53 | | ResidualReductor: Estimating residual range ...
00:53 | | | estimate_image_hierarchical: Estimating image for basis vector 10 ...
00:53 | | | estimate_image_hierarchical: Orthonormalizing ...
00:53 | | | | gram_schmidt: Removing vector 30 of norm 2.8654963174122783e-15
00:53 | | | | gram_schmidt: Orthonormalizing vector 32 again
00:53 | | | | gram_schmidt: Orthonormalizing vector 33 again
00:53 | | ResidualReductor: Projecting residual operator ...
00:53 greedy: Estimating errors ...
01:00 greedy: Maximum error after 11 extensions: 1.0355654795473341 (mu = {B: 0.010199999999999999, R: 0.0001})
01:00 greedy: Computing solution snapshot for mu = {B: 0.010199999999999999, R: 0.0001} ...
01:00 greedy: Extending basis with solution snapshot ...
01:00 | gram_schmidt: Orthonormalizing vector 11 again
01:00 greedy: Reducing ...
01:00 | CoerciveRBReductor: RB projection ...
01:00 | CoerciveRBReductor: Assembling error estimator ...
01:00 | | ResidualReductor: Estimating residual range ...
01:00 | | | estimate_image_hierarchical: Estimating image for basis vector 11 ...
01:00 | | | estimate_image_hierarchical: Orthonormalizing ...
01:00 | | | | gram_schmidt: Removing vector 33 of norm 4.728469806444864e-15
01:00 | | | | gram_schmidt: Orthonormalizing vector 35 again
01:00 | | | | gram_schmidt: Orthonormalizing vector 36 again
01:00 | | ResidualReductor: Projecting residual operator ...
01:01 greedy: Estimating errors ...
01:06 greedy: Maximum error after 12 extensions: 0.854208469991368 (mu = {B: 0.0001, R: 0.010199999999999999})
01:06 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.010199999999999999} ...
01:06 greedy: Extending basis with solution snapshot ...
01:06 | gram_schmidt: Orthonormalizing vector 12 again
01:06 greedy: Reducing ...
01:06 | CoerciveRBReductor: RB projection ...
01:06 | CoerciveRBReductor: Assembling error estimator ...
01:06 | | ResidualReductor: Estimating residual range ...
01:06 | | | estimate_image_hierarchical: Estimating image for basis vector 12 ...
01:06 | | | estimate_image_hierarchical: Orthonormalizing ...
01:06 | | | | gram_schmidt: Removing vector 36 of norm 7.441417620100196e-15
01:06 | | | | gram_schmidt: Orthonormalizing vector 38 again
01:06 | | | | gram_schmidt: Orthonormalizing vector 39 again
01:06 | | ResidualReductor: Projecting residual operator ...
01:06 greedy: Estimating errors ...
01:11 greedy: Maximum error after 13 extensions: 0.5521868085673406 (mu = {B: 0.0001, R: 0.38389999999999996})
01:11 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.38389999999999996} ...
01:11 greedy: Extending basis with solution snapshot ...
01:11 | gram_schmidt: Orthonormalizing vector 13 again
01:11 greedy: Reducing ...
01:11 | CoerciveRBReductor: RB projection ...
01:11 | CoerciveRBReductor: Assembling error estimator ...
01:11 | | ResidualReductor: Estimating residual range ...
01:11 | | | estimate_image_hierarchical: Estimating image for basis vector 13 ...
01:11 | | | estimate_image_hierarchical: Orthonormalizing ...
01:11 | | | | gram_schmidt: Removing vector 39 of norm 8.313585137270208e-14
01:11 | | | | gram_schmidt: Orthonormalizing vector 41 again
01:11 | | | | gram_schmidt: Orthonormalizing vector 42 again
01:11 | | ResidualReductor: Projecting residual operator ...
01:11 greedy: Estimating errors ...
01:18 greedy: Maximum error after 14 extensions: 0.49296530714152736 (mu = {B: 0.15159999999999998, R: 0.0001})
01:18 greedy: Computing solution snapshot for mu = {B: 0.15159999999999998, R: 0.0001} ...
01:18 greedy: Extending basis with solution snapshot ...
01:18 | gram_schmidt: Orthonormalizing vector 14 again
01:18 greedy: Reducing ...
01:18 | CoerciveRBReductor: RB projection ...
01:18 | CoerciveRBReductor: Assembling error estimator ...
01:18 | | ResidualReductor: Estimating residual range ...
01:18 | | | estimate_image_hierarchical: Estimating image for basis vector 14 ...
01:18 | | | estimate_image_hierarchical: Orthonormalizing ...
01:18 | | | | gram_schmidt: Orthonormalizing vector 44 again
01:18 | | | | gram_schmidt: Orthonormalizing vector 45 again
01:18 | | ResidualReductor: Projecting residual operator ...
01:18 greedy: Estimating errors ...
01:26 greedy: Maximum error after 15 extensions: 0.23163590881126642 (mu = {B: 0.010199999999999999, R: 1.0})
01:26 greedy: Computing solution snapshot for mu = {B: 0.010199999999999999, R: 1.0} ...
01:26 greedy: Extending basis with solution snapshot ...
01:26 | gram_schmidt: Orthonormalizing vector 15 again
01:26 greedy: Reducing ...
01:26 | CoerciveRBReductor: RB projection ...
01:26 | CoerciveRBReductor: Assembling error estimator ...
01:26 | | ResidualReductor: Estimating residual range ...
01:26 | | | estimate_image_hierarchical: Estimating image for basis vector 15 ...
01:26 | | | estimate_image_hierarchical: Orthonormalizing ...
01:26 | | | | gram_schmidt: Removing vector 46 of norm 2.7885353192804537e-15
01:26 | | | | gram_schmidt: Orthonormalizing vector 48 again
01:26 | | | | gram_schmidt: Orthonormalizing vector 49 again
01:26 | | ResidualReductor: Projecting residual operator ...
01:26 greedy: Estimating errors ...
01:32 greedy: Maximum error after 16 extensions: 0.17317119859116836 (mu = {B: 1.0, R: 0.010199999999999999})
01:32 greedy: Computing solution snapshot for mu = {B: 1.0, R: 0.010199999999999999} ...
01:33 greedy: Extending basis with solution snapshot ...
01:33 | gram_schmidt: Orthonormalizing vector 16 again
01:33 greedy: Reducing ...
01:33 | CoerciveRBReductor: RB projection ...
01:33 | CoerciveRBReductor: Assembling error estimator ...
01:33 | | ResidualReductor: Estimating residual range ...
01:33 | | | estimate_image_hierarchical: Estimating image for basis vector 16 ...
01:33 | | | estimate_image_hierarchical: Orthonormalizing ...
01:33 | | | | gram_schmidt: Removing vector 49 of norm 3.885126182404111e-15
01:33 | | | | gram_schmidt: Orthonormalizing vector 51 again
01:33 | | | | gram_schmidt: Orthonormalizing vector 52 again
01:33 | | ResidualReductor: Projecting residual operator ...
01:33 greedy: Estimating errors ...
01:45 greedy: Maximum error after 17 extensions: 0.1348784493100934 (mu = {B: 0.8484999999999999, R: 0.0001})
01:45 greedy: Computing solution snapshot for mu = {B: 0.8484999999999999, R: 0.0001} ...
01:45 greedy: Extending basis with solution snapshot ...
01:45 | gram_schmidt: Orthonormalizing vector 17 again
01:45 greedy: Reducing ...
01:45 | CoerciveRBReductor: RB projection ...
01:45 | CoerciveRBReductor: Assembling error estimator ...
01:45 | | ResidualReductor: Estimating residual range ...
01:45 | | | estimate_image_hierarchical: Estimating image for basis vector 17 ...
01:45 | | | estimate_image_hierarchical: Orthonormalizing ...
01:45 | | | | gram_schmidt: Orthonormalizing vector 53 again
01:45 | | | | gram_schmidt: Orthonormalizing vector 54 again
01:45 | | | | gram_schmidt: Orthonormalizing vector 55 again
01:45 | | ResidualReductor: Projecting residual operator ...
01:45 greedy: Estimating errors ...
01:53 greedy: Maximum error after 18 extensions: 0.10537984401597025 (mu = {B: 0.0001, R: 0.1112})
01:53 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.1112} ...
01:53 greedy: Extending basis with solution snapshot ...
01:53 | gram_schmidt: Orthonormalizing vector 18 again
01:54 greedy: Reducing ...
01:54 | CoerciveRBReductor: RB projection ...
01:54 | CoerciveRBReductor: Assembling error estimator ...
01:54 | | ResidualReductor: Estimating residual range ...
01:54 | | | estimate_image_hierarchical: Estimating image for basis vector 18 ...
01:54 | | | estimate_image_hierarchical: Orthonormalizing ...
01:54 | | | | gram_schmidt: Orthonormalizing vector 58 again
01:54 | | | | gram_schmidt: Orthonormalizing vector 59 again
01:54 | | ResidualReductor: Projecting residual operator ...
01:54 greedy: Estimating errors ...
02:03 greedy: Maximum error after 19 extensions: 0.04232345507856488 (mu = {B: 0.0001, R: 0.8484999999999999})
02:03 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.8484999999999999} ...
02:03 greedy: Extending basis with solution snapshot ...
02:03 | gram_schmidt: Orthonormalizing vector 19 again
02:03 greedy: Reducing ...
02:03 | CoerciveRBReductor: RB projection ...
02:03 | CoerciveRBReductor: Assembling error estimator ...
02:03 | | ResidualReductor: Estimating residual range ...
02:03 | | | estimate_image_hierarchical: Estimating image for basis vector 19 ...
02:03 | | | estimate_image_hierarchical: Orthonormalizing ...
02:03 | | | | gram_schmidt: Orthonormalizing vector 61 again
02:03 | | | | gram_schmidt: Orthonormalizing vector 62 again
02:04 | | | | gram_schmidt: Orthonormalizing vector 63 again
02:04 | | ResidualReductor: Projecting residual operator ...
02:04 greedy: Estimating errors ...
02:09 greedy: Maximum error after 20 extensions: 0.036465300661351376 (mu = {B: 0.0405, R: 0.0001})
02:09 greedy: Computing solution snapshot for mu = {B: 0.0405, R: 0.0001} ...
02:09 greedy: Extending basis with solution snapshot ...
02:09 | gram_schmidt: Orthonormalizing vector 20 again
02:10 greedy: Reducing ...
02:10 | CoerciveRBReductor: RB projection ...
02:10 | CoerciveRBReductor: Assembling error estimator ...
02:10 | | ResidualReductor: Estimating residual range ...
02:10 | | | estimate_image_hierarchical: Estimating image for basis vector 20 ...
02:10 | | | estimate_image_hierarchical: Orthonormalizing ...
02:10 | | | | gram_schmidt: Orthonormalizing vector 66 again
02:10 | | | | gram_schmidt: Orthonormalizing vector 67 again
02:10 | | ResidualReductor: Projecting residual operator ...
02:10 greedy: Estimating errors ...
02:15 greedy: Maximum error after 21 extensions: 0.03467633350825215 (mu = {B: 1.0, R: 0.18189999999999998})
02:15 greedy: Computing solution snapshot for mu = {B: 1.0, R: 0.18189999999999998} ...
02:15 greedy: Extending basis with solution snapshot ...
02:15 | gram_schmidt: Orthonormalizing vector 21 again
02:15 greedy: Reducing ...
02:15 | CoerciveRBReductor: RB projection ...
02:15 | CoerciveRBReductor: Assembling error estimator ...
02:15 | | ResidualReductor: Estimating residual range ...
02:15 | | | estimate_image_hierarchical: Estimating image for basis vector 21 ...
02:15 | | | estimate_image_hierarchical: Orthonormalizing ...
02:15 | | | | gram_schmidt: Orthonormalizing vector 68 again
02:15 | | | | gram_schmidt: Orthonormalizing vector 69 again
02:15 | | | | gram_schmidt: Orthonormalizing vector 70 again
02:15 | | | | gram_schmidt: Orthonormalizing vector 71 again
02:15 | | ResidualReductor: Projecting residual operator ...
02:16 greedy: Estimating errors ...
02:21 greedy: Maximum error after 22 extensions: 0.02116208877795844 (mu = {B: 1.0, R: 0.0405})
02:21 greedy: Computing solution snapshot for mu = {B: 1.0, R: 0.0405} ...
02:21 greedy: Extending basis with solution snapshot ...
02:21 | gram_schmidt: Orthonormalizing vector 22 again
02:21 greedy: Reducing ...
02:21 | CoerciveRBReductor: RB projection ...
02:21 | CoerciveRBReductor: Assembling error estimator ...
02:21 | | ResidualReductor: Estimating residual range ...
02:21 | | | estimate_image_hierarchical: Estimating image for basis vector 22 ...
02:21 | | | estimate_image_hierarchical: Orthonormalizing ...
02:21 | | | | gram_schmidt: Orthonormalizing vector 72 again
02:21 | | | | gram_schmidt: Orthonormalizing vector 74 again
02:21 | | | | gram_schmidt: Orthonormalizing vector 75 again
02:21 | | ResidualReductor: Projecting residual operator ...
02:22 greedy: Estimating errors ...
02:27 greedy: Maximum error after 23 extensions: 0.014536586870473815 (mu = {B: 0.1011, R: 1.0})
02:27 greedy: Computing solution snapshot for mu = {B: 0.1011, R: 1.0} ...
02:27 greedy: Extending basis with solution snapshot ...
02:27 | gram_schmidt: Orthonormalizing vector 23 again
02:27 greedy: Reducing ...
02:27 | CoerciveRBReductor: RB projection ...
02:27 | CoerciveRBReductor: Assembling error estimator ...
02:27 | | ResidualReductor: Estimating residual range ...
02:27 | | | estimate_image_hierarchical: Estimating image for basis vector 23 ...
02:27 | | | estimate_image_hierarchical: Orthonormalizing ...
02:27 | | | | gram_schmidt: Orthonormalizing vector 76 again
02:27 | | | | gram_schmidt: Orthonormalizing vector 78 again
02:28 | | | | gram_schmidt: Orthonormalizing vector 79 again
02:28 | | ResidualReductor: Projecting residual operator ...
02:28 greedy: Estimating errors ...
02:33 greedy: Maximum error after 24 extensions: 0.013329432239530451 (mu = {B: 0.2829, R: 0.010199999999999999})
02:33 greedy: Computing solution snapshot for mu = {B: 0.2829, R: 0.010199999999999999} ...
02:33 greedy: Extending basis with solution snapshot ...
02:33 | gram_schmidt: Orthonormalizing vector 24 again
02:33 greedy: Reducing ...
02:33 | CoerciveRBReductor: RB projection ...
02:33 | CoerciveRBReductor: Assembling error estimator ...
02:33 | | ResidualReductor: Estimating residual range ...
02:33 | | | estimate_image_hierarchical: Estimating image for basis vector 24 ...
02:33 | | | estimate_image_hierarchical: Orthonormalizing ...
02:33 | | | | gram_schmidt: Orthonormalizing vector 80 again
02:33 | | | | gram_schmidt: Orthonormalizing vector 83 again
02:34 | | ResidualReductor: Projecting residual operator ...
02:34 greedy: Estimating errors ...
02:40 greedy: Maximum error after 25 extensions: 0.00829632859786011 (mu = {B: 0.0001, R: 0.0304})
02:40 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.0304} ...
02:40 greedy: Extending basis with solution snapshot ...
02:40 | gram_schmidt: Orthonormalizing vector 25 again
02:40 greedy: Reducing ...
02:40 | CoerciveRBReductor: RB projection ...
02:41 | CoerciveRBReductor: Assembling error estimator ...
02:41 | | ResidualReductor: Estimating residual range ...
02:41 | | | estimate_image_hierarchical: Estimating image for basis vector 25 ...
02:41 | | | estimate_image_hierarchical: Orthonormalizing ...
02:41 | | | | gram_schmidt: Orthonormalizing vector 84 again
02:41 | | | | gram_schmidt: Orthonormalizing vector 86 again
02:41 | | | | gram_schmidt: Orthonormalizing vector 87 again
02:41 | | ResidualReductor: Projecting residual operator ...
02:41 greedy: Estimating errors ...
02:52 greedy: Maximum error after 26 extensions: 0.008246202641088355 (mu = {B: 0.42429999999999995, R: 0.0001})
02:52 greedy: Computing solution snapshot for mu = {B: 0.42429999999999995, R: 0.0001} ...
02:52 greedy: Extending basis with solution snapshot ...
02:52 | gram_schmidt: Orthonormalizing vector 26 again
02:52 greedy: Reducing ...
02:52 | CoerciveRBReductor: RB projection ...
02:52 | CoerciveRBReductor: Assembling error estimator ...
02:52 | | ResidualReductor: Estimating residual range ...
02:52 | | | estimate_image_hierarchical: Estimating image for basis vector 26 ...
02:52 | | | estimate_image_hierarchical: Orthonormalizing ...
02:52 | | | | gram_schmidt: Orthonormalizing vector 88 again
02:53 | | | | gram_schmidt: Orthonormalizing vector 90 again
02:53 | | | | gram_schmidt: Orthonormalizing vector 91 again
02:53 | | ResidualReductor: Projecting residual operator ...
02:53 greedy: Estimating errors ...
03:00 greedy: Maximum error after 27 extensions: 0.0058066040836719955 (mu = {B: 0.0203, R: 0.3132})
03:00 greedy: Computing solution snapshot for mu = {B: 0.0203, R: 0.3132} ...
03:00 greedy: Extending basis with solution snapshot ...
03:00 | gram_schmidt: Orthonormalizing vector 27 again
03:00 greedy: Reducing ...
03:00 | CoerciveRBReductor: RB projection ...
03:01 | CoerciveRBReductor: Assembling error estimator ...
03:01 | | ResidualReductor: Estimating residual range ...
03:01 | | | estimate_image_hierarchical: Estimating image for basis vector 27 ...
03:01 | | | estimate_image_hierarchical: Orthonormalizing ...
03:01 | | | | gram_schmidt: Orthonormalizing vector 92 again
03:01 | | | | gram_schmidt: Orthonormalizing vector 95 again
03:01 | | ResidualReductor: Projecting residual operator ...
03:01 greedy: Estimating errors ...
03:06 greedy: Maximum error after 28 extensions: 0.0016575362489082807 (mu = {B: 0.6162, R: 0.010199999999999999})
03:06 greedy: Computing solution snapshot for mu = {B: 0.6162, R: 0.010199999999999999} ...
03:06 greedy: Extending basis with solution snapshot ...
03:06 | gram_schmidt: Orthonormalizing vector 28 again
03:06 greedy: Reducing ...
03:06 | CoerciveRBReductor: RB projection ...
03:06 | CoerciveRBReductor: Assembling error estimator ...
03:06 | | ResidualReductor: Estimating residual range ...
03:06 | | | estimate_image_hierarchical: Estimating image for basis vector 28 ...
03:06 | | | estimate_image_hierarchical: Orthonormalizing ...
03:06 | | | | gram_schmidt: Orthonormalizing vector 96 again
03:07 | | | | gram_schmidt: Orthonormalizing vector 97 again
03:07 | | | | gram_schmidt: Orthonormalizing vector 98 again
03:07 | | | | gram_schmidt: Orthonormalizing vector 99 again
03:07 | | ResidualReductor: Projecting residual operator ...
03:07 greedy: Estimating errors ...
03:14 greedy: Maximum error after 29 extensions: 0.0015271039861232617 (mu = {B: 1.0, R: 0.8282999999999999})
03:14 greedy: Computing solution snapshot for mu = {B: 1.0, R: 0.8282999999999999} ...
03:14 greedy: Extending basis with solution snapshot ...
03:14 | gram_schmidt: Orthonormalizing vector 29 again
03:14 greedy: Maximum number of 30 extensions reached.
03:14 greedy: Reducing once more ...
03:14 | CoerciveRBReductor: RB projection ...
03:14 | CoerciveRBReductor: Assembling error estimator ...
03:14 | | ResidualReductor: Estimating residual range ...
03:14 | | | estimate_image_hierarchical: Estimating image for basis vector 29 ...
03:14 | | | estimate_image_hierarchical: Orthonormalizing ...
03:14 | | | | gram_schmidt: Orthonormalizing vector 100 again
03:14 | | | | gram_schmidt: Orthonormalizing vector 101 again
03:15 | | | | gram_schmidt: Orthonormalizing vector 102 again
03:15 | | | | gram_schmidt: Orthonormalizing vector 103 again
03:15 | | ResidualReductor: Projecting residual operator ...
03:15 greedy: Greedy search took 193.45183205604553 seconds
reductor.RB enthält nun die erzeugte reduzierte Basis:
len(reductor.RB)
30
Die zugehörige reduzierte Diskretisierung wurde bereits im Verlauf des Greedy-Verfahrens berechnet und ist in dem zurückgegebenen Dictionary enthalten:
rd = greedy_data['reduced_discretization']
Schließlich berechnen wir den Modellreduktionsfehler wie zuvor:
basis = reductor.RB
test_mus = d.parameter_space.sample_randomly(100, seed=5678)
errors = np.empty((len(basis) + 1, len(test_mus)))
estimates = np.empty((len(basis) + 1, len(test_mus)))
proj_errors = np.empty((len(basis) + 1, len(test_mus)))
times = np.empty((len(basis) + 1, len(test_mus)))
for i_mu, mu in enumerate(test_mus):
print('.', end='', flush=True)
U = d.solve(mu)
for N in range(len(basis) + 1):
rd = reductor.reduce(N)
tic = time.time()
u_rb = rd.solve(mu)
estimates[N, i_mu] = rd.estimate(u_rb, mu)
times[N, i_mu] = time.time() - tic
U_rb = reductor.reconstruct(u_rb)
errors[N, i_mu] = d.h1_0_semi_norm(U - U_rb)
U_proj = orthogonal_projection(U, basis[:N], product=d.h1_0_semi_product)
proj_errors[N, i_mu] = d.h1_0_semi_norm(U - U_proj)
....................................................................................................
und plotten das Ergebnis:
plt.figure()
plt.subplot(1, 2, 1)
plt.semilogy(np.max(proj_errors, axis=1), label='orth. proj.')
plt.semilogy(np.max(errors, axis=1), label='RB')
plt.semilogy(np.max(estimates, axis=1), label='est.')
plt.legend()
plt.subplot(1, 2, 2)
plt.plot(np.min(errors / estimates, axis=1), label='min. estimator effectivity')
plt.legend()
<matplotlib.legend.Legend at 0x7f76a5de6080>
discretize_stationary_cg liefert als zweites Rückgabeargument ein Dictionary, in dem das Gitter enhalten ist, auf dessen Basis die Diskretisierung erzeugt wurde:
d, d_data = discretize_stationary_cg(problem_1_2_c())
grid = d_data['grid']
03:53 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 03:53 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 03:53 DiffusionOperatorP1: Determine global dofs ... 03:53 DiffusionOperatorP1: Boundary treatment ... 03:53 DiffusionOperatorP1: Assemble system matrix ... 03:53 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 03:53 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 03:53 DiffusionOperatorP1: Determine global dofs ... 03:53 DiffusionOperatorP1: Boundary treatment ... 03:53 DiffusionOperatorP1: Assemble system matrix ... 03:53 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 03:53 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 03:54 DiffusionOperatorP1: Determine global dofs ... 03:54 DiffusionOperatorP1: Boundary treatment ... 03:54 DiffusionOperatorP1: Assemble system matrix ... 03:54 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 03:54 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 03:54 DiffusionOperatorP1: Determine global dofs ... 03:54 DiffusionOperatorP1: Boundary treatment ... 03:54 DiffusionOperatorP1: Assemble system matrix ... 03:54 L2ProductP1: Integrate the products of the shape functions on each element 03:54 L2ProductP1: Determine global dofs ... 03:54 L2ProductP1: Boundary treatment ... 03:54 L2ProductP1: Assemble system matrix ... 03:54 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 03:54 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 03:54 DiffusionOperatorP1: Determine global dofs ... 03:54 DiffusionOperatorP1: Boundary treatment ... 03:54 DiffusionOperatorP1: Assemble system matrix ... 03:54 DiffusionOperatorP1: Calulate gradients of shape functions transformed by reference map ... 03:54 DiffusionOperatorP1: Calculate all local scalar products beween gradients ... 03:54 DiffusionOperatorP1: Determine global dofs ... 03:54 DiffusionOperatorP1: Boundary treatment ... 03:54 DiffusionOperatorP1: Assemble system matrix ... 03:54 L2ProductP1: Integrate the products of the shape functions on each element 03:54 L2ProductP1: Determine global dofs ... 03:54 L2ProductP1: Boundary treatment ... 03:54 L2ProductP1: Assemble system matrix ...
Dieses Gitter benötigen wir, um das gewünschte Ausgabefunktional zu definieren:
from pymor.operators.cg import L2ProductFunctionalP1
f = L2ProductFunctionalP1(grid,
ExpressionFunction('(x[..., 1] >= 0.9) * 10.', 2, ())).assemble()
Das Ausgabefunktional können wir nun der Diskretisierung hinzufügen, indem wir es als Element des operators-Dictionary der Diskretisierung übergeben. Wie zuvor verwenden wir hierbei d.with_, um eine neue, modifizierte Diskretisierung zu konstruieren:
d = d.with_(operators={'output': f.assemble()})
Für die Modellreduktion können wir genauso wie zuvor verfahren. Das Ausgabefunktional wird dabei automatisch zusammen mit der allen weiteren in der Diskretisierung enthaltenen Operatoren reduziert:
reductor = CoerciveRBReductor(
d, product=d.h1_0_semi_product,
coercivity_estimator=ExpressionParameterFunctional('min([1, R, B])', d.parameter_type)
)
greedy_data = greedy(
d, reductor, d.parameter_space.sample_uniformly(100),
max_extensions=30,
extension_params={'method': 'gram_schmidt'}
)
rd = greedy_data['reduced_discretization']
03:55 greedy: Started greedy search on 10000 samples
03:55 greedy: Reducing ...
03:55 | CoerciveRBReductor: RB projection ...
03:55 | CoerciveRBReductor: Assembling error estimator ...
03:55 | | ResidualReductor: Estimating residual range ...
03:55 | | | estimate_image_hierarchical: Estimating image for basis vector -1 ...
03:55 | | | estimate_image_hierarchical: Orthonormalizing ...
03:55 | | ResidualReductor: Projecting residual operator ...
03:55 greedy: Estimating errors ...
03:58 greedy: Maximum error after 0 extensions: 5199.189979573535 (mu = {B: 0.0001, R: 0.0001})
03:58 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.0001} ...
03:58 greedy: Extending basis with solution snapshot ...
03:58 greedy: Reducing ...
03:58 | CoerciveRBReductor: RB projection ...
03:58 | CoerciveRBReductor: Assembling error estimator ...
03:58 | | ResidualReductor: Estimating residual range ...
03:58 | | | estimate_image_hierarchical: Estimating image for basis vector 0 ...
03:58 | | | estimate_image_hierarchical: Orthonormalizing ...
03:58 | | | | gram_schmidt: Removing vector 1 of norm 5.391986272059822e-18
03:58 | | | | gram_schmidt: Removing linear dependent vector 4
03:58 | | ResidualReductor: Projecting residual operator ...
03:58 greedy: Estimating errors ...
04:02 greedy: Maximum error after 1 extensions: 3588.8146149577183 (mu = {B: 0.0001, R: 1.0})
04:02 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 1.0} ...
04:02 greedy: Extending basis with solution snapshot ...
04:02 greedy: Reducing ...
04:02 | CoerciveRBReductor: RB projection ...
04:02 | CoerciveRBReductor: Assembling error estimator ...
04:02 | | ResidualReductor: Estimating residual range ...
04:02 | | | estimate_image_hierarchical: Estimating image for basis vector 1 ...
04:02 | | | estimate_image_hierarchical: Orthonormalizing ...
04:02 | | | | gram_schmidt: Removing vector 3 of norm 1.4202669682039294e-17
04:02 | | | | gram_schmidt: Orthonormalizing vector 4 again
04:02 | | | | gram_schmidt: Orthonormalizing vector 6 again
04:02 | | ResidualReductor: Projecting residual operator ...
04:02 greedy: Estimating errors ...
04:06 greedy: Maximum error after 2 extensions: 2764.7755366045703 (mu = {B: 1.0, R: 0.0001})
04:06 greedy: Computing solution snapshot for mu = {B: 1.0, R: 0.0001} ...
04:06 greedy: Extending basis with solution snapshot ...
04:06 greedy: Reducing ...
04:06 | CoerciveRBReductor: RB projection ...
04:06 | CoerciveRBReductor: Assembling error estimator ...
04:06 | | ResidualReductor: Estimating residual range ...
04:06 | | | estimate_image_hierarchical: Estimating image for basis vector 2 ...
04:06 | | | estimate_image_hierarchical: Orthonormalizing ...
04:06 | | | | gram_schmidt: Removing vector 6 of norm 1.5079215320133834e-17
04:06 | | | | gram_schmidt: Orthonormalizing vector 8 again
04:06 | | ResidualReductor: Projecting residual operator ...
04:06 greedy: Estimating errors ...
04:10 greedy: Maximum error after 3 extensions: 202.7329220834271 (mu = {B: 0.0001, R: 0.22229999999999997})
04:10 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.22229999999999997} ...
04:10 greedy: Extending basis with solution snapshot ...
04:10 | gram_schmidt: Orthonormalizing vector 3 again
04:10 greedy: Reducing ...
04:10 | CoerciveRBReductor: RB projection ...
04:10 | CoerciveRBReductor: Assembling error estimator ...
04:10 | | ResidualReductor: Estimating residual range ...
04:10 | | | estimate_image_hierarchical: Estimating image for basis vector 3 ...
04:10 | | | estimate_image_hierarchical: Orthonormalizing ...
04:10 | | | | gram_schmidt: Removing vector 9 of norm 1.5090794153035123e-16
04:10 | | | | gram_schmidt: Orthonormalizing vector 11 again
04:10 | | | | gram_schmidt: Orthonormalizing vector 12 again
04:10 | | ResidualReductor: Projecting residual operator ...
04:10 greedy: Estimating errors ...
04:14 greedy: Maximum error after 4 extensions: 198.2312470568775 (mu = {B: 0.2728, R: 0.0001})
04:14 greedy: Computing solution snapshot for mu = {B: 0.2728, R: 0.0001} ...
04:14 greedy: Extending basis with solution snapshot ...
04:14 | gram_schmidt: Orthonormalizing vector 4 again
04:14 greedy: Reducing ...
04:14 | CoerciveRBReductor: RB projection ...
04:14 | CoerciveRBReductor: Assembling error estimator ...
04:14 | | ResidualReductor: Estimating residual range ...
04:14 | | | estimate_image_hierarchical: Estimating image for basis vector 4 ...
04:14 | | | estimate_image_hierarchical: Orthonormalizing ...
04:14 | | | | gram_schmidt: Removing vector 12 of norm 2.0843139467312482e-16
04:14 | | | | gram_schmidt: Orthonormalizing vector 15 again
04:14 | | ResidualReductor: Projecting residual operator ...
04:14 greedy: Estimating errors ...
04:18 greedy: Maximum error after 5 extensions: 46.28371663458428 (mu = {B: 0.0708, R: 0.0001})
04:18 greedy: Computing solution snapshot for mu = {B: 0.0708, R: 0.0001} ...
04:18 greedy: Extending basis with solution snapshot ...
04:18 | gram_schmidt: Orthonormalizing vector 5 again
04:18 greedy: Reducing ...
04:18 | CoerciveRBReductor: RB projection ...
04:18 | CoerciveRBReductor: Assembling error estimator ...
04:18 | | ResidualReductor: Estimating residual range ...
04:18 | | | estimate_image_hierarchical: Estimating image for basis vector 5 ...
04:18 | | | estimate_image_hierarchical: Orthonormalizing ...
04:18 | | | | gram_schmidt: Removing vector 15 of norm 3.2542138457139867e-16
04:19 | | | | gram_schmidt: Orthonormalizing vector 17 again
04:19 | | | | gram_schmidt: Orthonormalizing vector 18 again
04:19 | | ResidualReductor: Projecting residual operator ...
04:19 greedy: Estimating errors ...
04:22 greedy: Maximum error after 6 extensions: 41.35728288181194 (mu = {B: 0.0001, R: 0.060700000000000004})
04:22 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.060700000000000004} ...
04:23 greedy: Extending basis with solution snapshot ...
04:23 | gram_schmidt: Orthonormalizing vector 6 again
04:23 greedy: Reducing ...
04:23 | CoerciveRBReductor: RB projection ...
04:23 | CoerciveRBReductor: Assembling error estimator ...
04:23 | | ResidualReductor: Estimating residual range ...
04:23 | | | estimate_image_hierarchical: Estimating image for basis vector 6 ...
04:23 | | | estimate_image_hierarchical: Orthonormalizing ...
04:23 | | | | gram_schmidt: Removing vector 18 of norm 3.2893989762725844e-16
04:23 | | | | gram_schmidt: Orthonormalizing vector 21 again
04:23 | | ResidualReductor: Projecting residual operator ...
04:23 greedy: Estimating errors ...
04:27 greedy: Maximum error after 7 extensions: 18.968321429085044 (mu = {B: 0.0001, R: 0.596})
04:27 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.596} ...
04:27 greedy: Extending basis with solution snapshot ...
04:27 | gram_schmidt: Orthonormalizing vector 7 again
04:27 greedy: Reducing ...
04:27 | CoerciveRBReductor: RB projection ...
04:27 | CoerciveRBReductor: Assembling error estimator ...
04:27 | | ResidualReductor: Estimating residual range ...
04:27 | | | estimate_image_hierarchical: Estimating image for basis vector 7 ...
04:27 | | | estimate_image_hierarchical: Orthonormalizing ...
04:27 | | | | gram_schmidt: Removing vector 21 of norm 2.073184230116846e-15
04:27 | | | | gram_schmidt: Orthonormalizing vector 23 again
04:27 | | | | gram_schmidt: Orthonormalizing vector 24 again
04:27 | | ResidualReductor: Projecting residual operator ...
04:27 greedy: Estimating errors ...
04:31 greedy: Maximum error after 8 extensions: 15.67092279856719 (mu = {B: 0.6364, R: 0.0001})
04:31 greedy: Computing solution snapshot for mu = {B: 0.6364, R: 0.0001} ...
04:31 greedy: Extending basis with solution snapshot ...
04:31 | gram_schmidt: Orthonormalizing vector 8 again
04:31 greedy: Reducing ...
04:31 | CoerciveRBReductor: RB projection ...
04:31 | CoerciveRBReductor: Assembling error estimator ...
04:31 | | ResidualReductor: Estimating residual range ...
04:31 | | | estimate_image_hierarchical: Estimating image for basis vector 8 ...
04:31 | | | estimate_image_hierarchical: Orthonormalizing ...
04:31 | | | | gram_schmidt: Removing vector 24 of norm 3.6145476004159095e-15
04:31 | | | | gram_schmidt: Orthonormalizing vector 25 again
04:31 | | | | gram_schmidt: Orthonormalizing vector 26 again
04:31 | | | | gram_schmidt: Orthonormalizing vector 27 again
04:31 | | ResidualReductor: Projecting residual operator ...
04:31 greedy: Estimating errors ...
04:35 greedy: Maximum error after 9 extensions: 6.281860618856772 (mu = {B: 0.0203, R: 0.0001})
04:35 greedy: Computing solution snapshot for mu = {B: 0.0203, R: 0.0001} ...
04:35 greedy: Extending basis with solution snapshot ...
04:35 | gram_schmidt: Orthonormalizing vector 9 again
04:35 greedy: Reducing ...
04:35 | CoerciveRBReductor: RB projection ...
04:36 | CoerciveRBReductor: Assembling error estimator ...
04:36 | | ResidualReductor: Estimating residual range ...
04:36 | | | estimate_image_hierarchical: Estimating image for basis vector 9 ...
04:36 | | | estimate_image_hierarchical: Orthonormalizing ...
04:36 | | | | gram_schmidt: Removing vector 27 of norm 3.682173922910782e-15
04:36 | | | | gram_schmidt: Orthonormalizing vector 29 again
04:36 | | | | gram_schmidt: Orthonormalizing vector 30 again
04:36 | | ResidualReductor: Projecting residual operator ...
04:36 greedy: Estimating errors ...
04:40 greedy: Maximum error after 10 extensions: 4.6462018798861875 (mu = {B: 0.0001, R: 0.0203})
04:40 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.0203} ...
04:40 greedy: Extending basis with solution snapshot ...
04:40 | gram_schmidt: Orthonormalizing vector 10 again
04:40 greedy: Reducing ...
04:40 | CoerciveRBReductor: RB projection ...
04:40 | CoerciveRBReductor: Assembling error estimator ...
04:40 | | ResidualReductor: Estimating residual range ...
04:40 | | | estimate_image_hierarchical: Estimating image for basis vector 10 ...
04:40 | | | estimate_image_hierarchical: Orthonormalizing ...
04:40 | | | | gram_schmidt: Removing vector 30 of norm 2.8654963174122783e-15
04:40 | | | | gram_schmidt: Orthonormalizing vector 32 again
04:40 | | | | gram_schmidt: Orthonormalizing vector 33 again
04:40 | | ResidualReductor: Projecting residual operator ...
04:40 greedy: Estimating errors ...
04:45 greedy: Maximum error after 11 extensions: 1.0355654795473341 (mu = {B: 0.010199999999999999, R: 0.0001})
04:45 greedy: Computing solution snapshot for mu = {B: 0.010199999999999999, R: 0.0001} ...
04:45 greedy: Extending basis with solution snapshot ...
04:45 | gram_schmidt: Orthonormalizing vector 11 again
04:45 greedy: Reducing ...
04:45 | CoerciveRBReductor: RB projection ...
04:45 | CoerciveRBReductor: Assembling error estimator ...
04:45 | | ResidualReductor: Estimating residual range ...
04:45 | | | estimate_image_hierarchical: Estimating image for basis vector 11 ...
04:46 | | | estimate_image_hierarchical: Orthonormalizing ...
04:46 | | | | gram_schmidt: Removing vector 33 of norm 4.728469806444864e-15
04:46 | | | | gram_schmidt: Orthonormalizing vector 35 again
04:46 | | | | gram_schmidt: Orthonormalizing vector 36 again
04:46 | | ResidualReductor: Projecting residual operator ...
04:46 greedy: Estimating errors ...
04:50 greedy: Maximum error after 12 extensions: 0.854208469991368 (mu = {B: 0.0001, R: 0.010199999999999999})
04:50 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.010199999999999999} ...
04:50 greedy: Extending basis with solution snapshot ...
04:50 | gram_schmidt: Orthonormalizing vector 12 again
04:50 greedy: Reducing ...
04:50 | CoerciveRBReductor: RB projection ...
04:50 | CoerciveRBReductor: Assembling error estimator ...
04:50 | | ResidualReductor: Estimating residual range ...
04:50 | | | estimate_image_hierarchical: Estimating image for basis vector 12 ...
04:50 | | | estimate_image_hierarchical: Orthonormalizing ...
04:50 | | | | gram_schmidt: Removing vector 36 of norm 7.441417620100196e-15
04:50 | | | | gram_schmidt: Orthonormalizing vector 38 again
04:51 | | | | gram_schmidt: Orthonormalizing vector 39 again
04:51 | | ResidualReductor: Projecting residual operator ...
04:51 greedy: Estimating errors ...
04:57 greedy: Maximum error after 13 extensions: 0.5521868085673406 (mu = {B: 0.0001, R: 0.38389999999999996})
04:57 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.38389999999999996} ...
04:57 greedy: Extending basis with solution snapshot ...
04:57 | gram_schmidt: Orthonormalizing vector 13 again
04:57 greedy: Reducing ...
04:57 | CoerciveRBReductor: RB projection ...
04:57 | CoerciveRBReductor: Assembling error estimator ...
04:57 | | ResidualReductor: Estimating residual range ...
04:57 | | | estimate_image_hierarchical: Estimating image for basis vector 13 ...
04:57 | | | estimate_image_hierarchical: Orthonormalizing ...
04:57 | | | | gram_schmidt: Removing vector 39 of norm 8.313585137270208e-14
04:58 | | | | gram_schmidt: Orthonormalizing vector 41 again
04:58 | | | | gram_schmidt: Orthonormalizing vector 42 again
04:58 | | ResidualReductor: Projecting residual operator ...
04:58 greedy: Estimating errors ...
05:02 greedy: Maximum error after 14 extensions: 0.49296530714152736 (mu = {B: 0.15159999999999998, R: 0.0001})
05:02 greedy: Computing solution snapshot for mu = {B: 0.15159999999999998, R: 0.0001} ...
05:02 greedy: Extending basis with solution snapshot ...
05:02 | gram_schmidt: Orthonormalizing vector 14 again
05:02 greedy: Reducing ...
05:02 | CoerciveRBReductor: RB projection ...
05:02 | CoerciveRBReductor: Assembling error estimator ...
05:02 | | ResidualReductor: Estimating residual range ...
05:03 | | | estimate_image_hierarchical: Estimating image for basis vector 14 ...
05:03 | | | estimate_image_hierarchical: Orthonormalizing ...
05:03 | | | | gram_schmidt: Orthonormalizing vector 44 again
05:03 | | | | gram_schmidt: Orthonormalizing vector 45 again
05:03 | | ResidualReductor: Projecting residual operator ...
05:03 greedy: Estimating errors ...
05:08 greedy: Maximum error after 15 extensions: 0.23163590881126642 (mu = {B: 0.010199999999999999, R: 1.0})
05:08 greedy: Computing solution snapshot for mu = {B: 0.010199999999999999, R: 1.0} ...
05:08 greedy: Extending basis with solution snapshot ...
05:08 | gram_schmidt: Orthonormalizing vector 15 again
05:08 greedy: Reducing ...
05:08 | CoerciveRBReductor: RB projection ...
05:08 | CoerciveRBReductor: Assembling error estimator ...
05:08 | | ResidualReductor: Estimating residual range ...
05:08 | | | estimate_image_hierarchical: Estimating image for basis vector 15 ...
05:08 | | | estimate_image_hierarchical: Orthonormalizing ...
05:08 | | | | gram_schmidt: Removing vector 46 of norm 2.7885353192804537e-15
05:08 | | | | gram_schmidt: Orthonormalizing vector 48 again
05:08 | | | | gram_schmidt: Orthonormalizing vector 49 again
05:08 | | ResidualReductor: Projecting residual operator ...
05:08 greedy: Estimating errors ...
05:16 greedy: Maximum error after 16 extensions: 0.17317119859116836 (mu = {B: 1.0, R: 0.010199999999999999})
05:16 greedy: Computing solution snapshot for mu = {B: 1.0, R: 0.010199999999999999} ...
05:16 greedy: Extending basis with solution snapshot ...
05:16 | gram_schmidt: Orthonormalizing vector 16 again
05:17 greedy: Reducing ...
05:17 | CoerciveRBReductor: RB projection ...
05:17 | CoerciveRBReductor: Assembling error estimator ...
05:17 | | ResidualReductor: Estimating residual range ...
05:17 | | | estimate_image_hierarchical: Estimating image for basis vector 16 ...
05:17 | | | estimate_image_hierarchical: Orthonormalizing ...
05:17 | | | | gram_schmidt: Removing vector 49 of norm 3.885126182404111e-15
05:17 | | | | gram_schmidt: Orthonormalizing vector 51 again
05:17 | | | | gram_schmidt: Orthonormalizing vector 52 again
05:17 | | ResidualReductor: Projecting residual operator ...
05:17 greedy: Estimating errors ...
05:22 greedy: Maximum error after 17 extensions: 0.1348784493100934 (mu = {B: 0.8484999999999999, R: 0.0001})
05:22 greedy: Computing solution snapshot for mu = {B: 0.8484999999999999, R: 0.0001} ...
05:22 greedy: Extending basis with solution snapshot ...
05:22 | gram_schmidt: Orthonormalizing vector 17 again
05:22 greedy: Reducing ...
05:22 | CoerciveRBReductor: RB projection ...
05:22 | CoerciveRBReductor: Assembling error estimator ...
05:23 | | ResidualReductor: Estimating residual range ...
05:23 | | | estimate_image_hierarchical: Estimating image for basis vector 17 ...
05:23 | | | estimate_image_hierarchical: Orthonormalizing ...
05:23 | | | | gram_schmidt: Orthonormalizing vector 53 again
05:23 | | | | gram_schmidt: Orthonormalizing vector 54 again
05:23 | | | | gram_schmidt: Orthonormalizing vector 55 again
05:23 | | ResidualReductor: Projecting residual operator ...
05:23 greedy: Estimating errors ...
05:28 greedy: Maximum error after 18 extensions: 0.10537984401597025 (mu = {B: 0.0001, R: 0.1112})
05:28 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.1112} ...
05:28 greedy: Extending basis with solution snapshot ...
05:28 | gram_schmidt: Orthonormalizing vector 18 again
05:28 greedy: Reducing ...
05:28 | CoerciveRBReductor: RB projection ...
05:28 | CoerciveRBReductor: Assembling error estimator ...
05:28 | | ResidualReductor: Estimating residual range ...
05:28 | | | estimate_image_hierarchical: Estimating image for basis vector 18 ...
05:28 | | | estimate_image_hierarchical: Orthonormalizing ...
05:28 | | | | gram_schmidt: Orthonormalizing vector 58 again
05:28 | | | | gram_schmidt: Orthonormalizing vector 59 again
05:28 | | ResidualReductor: Projecting residual operator ...
05:28 greedy: Estimating errors ...
05:34 greedy: Maximum error after 19 extensions: 0.04232345507856488 (mu = {B: 0.0001, R: 0.8484999999999999})
05:34 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.8484999999999999} ...
05:34 greedy: Extending basis with solution snapshot ...
05:34 | gram_schmidt: Orthonormalizing vector 19 again
05:34 greedy: Reducing ...
05:34 | CoerciveRBReductor: RB projection ...
05:34 | CoerciveRBReductor: Assembling error estimator ...
05:34 | | ResidualReductor: Estimating residual range ...
05:34 | | | estimate_image_hierarchical: Estimating image for basis vector 19 ...
05:34 | | | estimate_image_hierarchical: Orthonormalizing ...
05:34 | | | | gram_schmidt: Orthonormalizing vector 61 again
05:34 | | | | gram_schmidt: Orthonormalizing vector 62 again
05:34 | | | | gram_schmidt: Orthonormalizing vector 63 again
05:34 | | ResidualReductor: Projecting residual operator ...
05:34 greedy: Estimating errors ...
05:39 greedy: Maximum error after 20 extensions: 0.036465300661351376 (mu = {B: 0.0405, R: 0.0001})
05:39 greedy: Computing solution snapshot for mu = {B: 0.0405, R: 0.0001} ...
05:39 greedy: Extending basis with solution snapshot ...
05:39 | gram_schmidt: Orthonormalizing vector 20 again
05:39 greedy: Reducing ...
05:39 | CoerciveRBReductor: RB projection ...
05:39 | CoerciveRBReductor: Assembling error estimator ...
05:39 | | ResidualReductor: Estimating residual range ...
05:39 | | | estimate_image_hierarchical: Estimating image for basis vector 20 ...
05:39 | | | estimate_image_hierarchical: Orthonormalizing ...
05:39 | | | | gram_schmidt: Orthonormalizing vector 66 again
05:39 | | | | gram_schmidt: Orthonormalizing vector 67 again
05:40 | | ResidualReductor: Projecting residual operator ...
05:40 greedy: Estimating errors ...
05:45 greedy: Maximum error after 21 extensions: 0.03467633350825215 (mu = {B: 1.0, R: 0.18189999999999998})
05:45 greedy: Computing solution snapshot for mu = {B: 1.0, R: 0.18189999999999998} ...
05:45 greedy: Extending basis with solution snapshot ...
05:45 | gram_schmidt: Orthonormalizing vector 21 again
05:45 greedy: Reducing ...
05:45 | CoerciveRBReductor: RB projection ...
05:45 | CoerciveRBReductor: Assembling error estimator ...
05:45 | | ResidualReductor: Estimating residual range ...
05:45 | | | estimate_image_hierarchical: Estimating image for basis vector 21 ...
05:45 | | | estimate_image_hierarchical: Orthonormalizing ...
05:45 | | | | gram_schmidt: Orthonormalizing vector 68 again
05:45 | | | | gram_schmidt: Orthonormalizing vector 69 again
05:46 | | | | gram_schmidt: Orthonormalizing vector 70 again
05:46 | | | | gram_schmidt: Orthonormalizing vector 71 again
05:46 | | ResidualReductor: Projecting residual operator ...
05:46 greedy: Estimating errors ...
05:51 greedy: Maximum error after 22 extensions: 0.02116208877795844 (mu = {B: 1.0, R: 0.0405})
05:51 greedy: Computing solution snapshot for mu = {B: 1.0, R: 0.0405} ...
05:51 greedy: Extending basis with solution snapshot ...
05:51 | gram_schmidt: Orthonormalizing vector 22 again
05:51 greedy: Reducing ...
05:51 | CoerciveRBReductor: RB projection ...
05:51 | CoerciveRBReductor: Assembling error estimator ...
05:51 | | ResidualReductor: Estimating residual range ...
05:51 | | | estimate_image_hierarchical: Estimating image for basis vector 22 ...
05:51 | | | estimate_image_hierarchical: Orthonormalizing ...
05:51 | | | | gram_schmidt: Orthonormalizing vector 72 again
05:51 | | | | gram_schmidt: Orthonormalizing vector 74 again
05:51 | | | | gram_schmidt: Orthonormalizing vector 75 again
05:51 | | ResidualReductor: Projecting residual operator ...
05:51 greedy: Estimating errors ...
05:57 greedy: Maximum error after 23 extensions: 0.014536586870473815 (mu = {B: 0.1011, R: 1.0})
05:57 greedy: Computing solution snapshot for mu = {B: 0.1011, R: 1.0} ...
05:57 greedy: Extending basis with solution snapshot ...
05:57 | gram_schmidt: Orthonormalizing vector 23 again
05:57 greedy: Reducing ...
05:57 | CoerciveRBReductor: RB projection ...
05:57 | CoerciveRBReductor: Assembling error estimator ...
05:57 | | ResidualReductor: Estimating residual range ...
05:57 | | | estimate_image_hierarchical: Estimating image for basis vector 23 ...
05:57 | | | estimate_image_hierarchical: Orthonormalizing ...
05:57 | | | | gram_schmidt: Orthonormalizing vector 76 again
05:57 | | | | gram_schmidt: Orthonormalizing vector 78 again
05:57 | | | | gram_schmidt: Orthonormalizing vector 79 again
05:57 | | ResidualReductor: Projecting residual operator ...
05:57 greedy: Estimating errors ...
06:02 greedy: Maximum error after 24 extensions: 0.013329432239530451 (mu = {B: 0.2829, R: 0.010199999999999999})
06:02 greedy: Computing solution snapshot for mu = {B: 0.2829, R: 0.010199999999999999} ...
06:02 greedy: Extending basis with solution snapshot ...
06:02 | gram_schmidt: Orthonormalizing vector 24 again
06:02 greedy: Reducing ...
06:02 | CoerciveRBReductor: RB projection ...
06:02 | CoerciveRBReductor: Assembling error estimator ...
06:02 | | ResidualReductor: Estimating residual range ...
06:02 | | | estimate_image_hierarchical: Estimating image for basis vector 24 ...
06:02 | | | estimate_image_hierarchical: Orthonormalizing ...
06:02 | | | | gram_schmidt: Orthonormalizing vector 80 again
06:02 | | | | gram_schmidt: Orthonormalizing vector 83 again
06:03 | | ResidualReductor: Projecting residual operator ...
06:03 greedy: Estimating errors ...
06:08 greedy: Maximum error after 25 extensions: 0.00829632859786011 (mu = {B: 0.0001, R: 0.0304})
06:08 greedy: Computing solution snapshot for mu = {B: 0.0001, R: 0.0304} ...
06:08 greedy: Extending basis with solution snapshot ...
06:08 | gram_schmidt: Orthonormalizing vector 25 again
06:08 greedy: Reducing ...
06:08 | CoerciveRBReductor: RB projection ...
06:08 | CoerciveRBReductor: Assembling error estimator ...
06:08 | | ResidualReductor: Estimating residual range ...
06:08 | | | estimate_image_hierarchical: Estimating image for basis vector 25 ...
06:08 | | | estimate_image_hierarchical: Orthonormalizing ...
06:08 | | | | gram_schmidt: Orthonormalizing vector 84 again
06:08 | | | | gram_schmidt: Orthonormalizing vector 86 again
06:08 | | | | gram_schmidt: Orthonormalizing vector 87 again
06:09 | | ResidualReductor: Projecting residual operator ...
06:09 greedy: Estimating errors ...
06:16 greedy: Maximum error after 26 extensions: 0.008246202641088355 (mu = {B: 0.42429999999999995, R: 0.0001})
06:16 greedy: Computing solution snapshot for mu = {B: 0.42429999999999995, R: 0.0001} ...
06:16 greedy: Extending basis with solution snapshot ...
06:16 | gram_schmidt: Orthonormalizing vector 26 again
06:16 greedy: Reducing ...
06:16 | CoerciveRBReductor: RB projection ...
06:16 | CoerciveRBReductor: Assembling error estimator ...
06:16 | | ResidualReductor: Estimating residual range ...
06:16 | | | estimate_image_hierarchical: Estimating image for basis vector 26 ...
06:16 | | | estimate_image_hierarchical: Orthonormalizing ...
06:16 | | | | gram_schmidt: Orthonormalizing vector 88 again
06:16 | | | | gram_schmidt: Orthonormalizing vector 90 again
06:16 | | | | gram_schmidt: Orthonormalizing vector 91 again
06:17 | | ResidualReductor: Projecting residual operator ...
06:17 greedy: Estimating errors ...
06:25 greedy: Maximum error after 27 extensions: 0.0058066040836719955 (mu = {B: 0.0203, R: 0.3132})
06:25 greedy: Computing solution snapshot for mu = {B: 0.0203, R: 0.3132} ...
06:25 greedy: Extending basis with solution snapshot ...
06:25 | gram_schmidt: Orthonormalizing vector 27 again
06:25 greedy: Reducing ...
06:25 | CoerciveRBReductor: RB projection ...
06:25 | CoerciveRBReductor: Assembling error estimator ...
06:25 | | ResidualReductor: Estimating residual range ...
06:25 | | | estimate_image_hierarchical: Estimating image for basis vector 27 ...
06:25 | | | estimate_image_hierarchical: Orthonormalizing ...
06:25 | | | | gram_schmidt: Orthonormalizing vector 92 again
06:25 | | | | gram_schmidt: Orthonormalizing vector 95 again
06:25 | | ResidualReductor: Projecting residual operator ...
06:25 greedy: Estimating errors ...
06:32 greedy: Maximum error after 28 extensions: 0.0016575362489082807 (mu = {B: 0.6162, R: 0.010199999999999999})
06:32 greedy: Computing solution snapshot for mu = {B: 0.6162, R: 0.010199999999999999} ...
06:32 greedy: Extending basis with solution snapshot ...
06:32 | gram_schmidt: Orthonormalizing vector 28 again
06:32 greedy: Reducing ...
06:32 | CoerciveRBReductor: RB projection ...
06:32 | CoerciveRBReductor: Assembling error estimator ...
06:32 | | ResidualReductor: Estimating residual range ...
06:32 | | | estimate_image_hierarchical: Estimating image for basis vector 28 ...
06:32 | | | estimate_image_hierarchical: Orthonormalizing ...
06:32 | | | | gram_schmidt: Orthonormalizing vector 96 again
06:32 | | | | gram_schmidt: Orthonormalizing vector 97 again
06:32 | | | | gram_schmidt: Orthonormalizing vector 98 again
06:32 | | | | gram_schmidt: Orthonormalizing vector 99 again
06:32 | | ResidualReductor: Projecting residual operator ...
06:33 greedy: Estimating errors ...
06:38 greedy: Maximum error after 29 extensions: 0.0015271039861232617 (mu = {B: 1.0, R: 0.8282999999999999})
06:38 greedy: Computing solution snapshot for mu = {B: 1.0, R: 0.8282999999999999} ...
06:38 greedy: Extending basis with solution snapshot ...
06:38 | gram_schmidt: Orthonormalizing vector 29 again
06:38 greedy: Maximum number of 30 extensions reached.
06:38 greedy: Reducing once more ...
06:38 | CoerciveRBReductor: RB projection ...
06:38 | CoerciveRBReductor: Assembling error estimator ...
06:38 | | ResidualReductor: Estimating residual range ...
06:38 | | | estimate_image_hierarchical: Estimating image for basis vector 29 ...
06:38 | | | estimate_image_hierarchical: Orthonormalizing ...
06:38 | | | | gram_schmidt: Orthonormalizing vector 100 again
06:38 | | | | gram_schmidt: Orthonormalizing vector 101 again
06:38 | | | | gram_schmidt: Orthonormalizing vector 102 again
06:38 | | | | gram_schmidt: Orthonormalizing vector 103 again
06:39 | | ResidualReductor: Projecting residual operator ...
06:39 greedy: Greedy search took 164.11847281455994 seconds
Das reduzierte Ausgabefunktional erhalten wir nun als rd.operators['output']. Zur Auswertung des Funktionals verwenden wir wie üblich die apply-Methode. Der Rückgabewert ist dabei konsequenter Weise ein NumpyVectorArray der Länge und Dimension 1, aus dem wir den eigentlichen Wert mittels result.data[0] extrahieren können:
X = Y = np.linspace(-4, 1, 100)
X, Y = np.meshgrid(X, Y)
def param_to_output_mapping(R, B):
return rd.operators['output'].apply(rd.solve({'R': 10**R, 'B':10**B})).data[0]
param_to_output_mapping = np.vectorize(param_to_output_mapping)
%time Z = param_to_output_mapping(X, Y)
from matplotlib import pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(X, Y, Z, cmap=cm.viridis)
ax.invert_xaxis()
CPU times: user 2.8 s, sys: 2.3 s, total: 5.1 s Wall time: 2.89 s
In diesem Fall wurden dabei 2.9 Sekunden für 10000 Lösungen des reduzierten Problems und Auswertungen des Ausgabefunktionals benötigt!