Skip to content

Commit

Permalink
[models] small update
Browse files Browse the repository at this point in the history
Co-authored-by: Stephan Rave <stephanrave@uni-muenster.de>
  • Loading branch information
Tim Keil and sdrave committed Dec 4, 2020
1 parent 49cfde3 commit 146ca40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pymor/models/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,10 @@ def _compute_output_d_mu(self, solution, mu, return_array=False, use_adjoint=Non
else:
assert self.output_functional is not None
assert self.output_functional.linear
output_functional_array = self.output_functional.H.as_range_array(mu)
dual_solutions = self.operator.range.empty()
for d in range(self.output_functional.range.dim):
dual_problem = self.with_(operator=self.operator.H, rhs=self.output_functional.H.as_range_array(mu)[d])
dual_problem = self.with_(operator=self.operator.H, rhs=output_functional_array[d])
dual_solutions.append(dual_problem.solve(mu))
gradients = [] if return_array else {}
for (parameter, size) in self.parameters.items():
Expand Down

0 comments on commit 146ca40

Please sign in to comment.