Commit 5e6ad6d9 authored by Tim Keil's avatar Tim Keil
Browse files

[pymortest] reduce computational time

parent 289330bf
......@@ -124,9 +124,7 @@ def create_fom(grid_intervals, vector_valued_output=False):
def record_results(function, parse, data, mu):
QoI = function(mu)
data['num_evals'] += 1
# we need to make sure to copy the data, since the added mu will be changed inplace by minimize afterwards
data['evaluation_points'].append([parse(mu)['diffusion'][:][0],
parse(mu)['diffusion'][:][1]])
data['evaluation_points'].append(parse(mu).to_numpy())
data['evaluations'].append(QoI[0])
print('.', end='')
return QoI
......
......@@ -282,7 +282,7 @@ def test_output_d_mu():
from pymordemos.linear_optimization import create_fom
grid_intervals = 10
training_samples = 5
training_samples = 3
fom, mu_bar = create_fom(grid_intervals, vector_valued_output=True)
easy_fom, _ = create_fom(grid_intervals, vector_valued_output=False)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment