Skip to content

Repace 'invert_options' by 'solver_options' (second try)#184

Merged
sdrave merged 5 commits into
masterfrom
solver_options2
Nov 19, 2015
Merged

Repace 'invert_options' by 'solver_options' (second try)#184
sdrave merged 5 commits into
masterfrom
solver_options2

Conversation

@sdrave

@sdrave sdrave commented Nov 18, 2015

Copy link
Copy Markdown
Member

This pull request contains the following changes:

  • options is removed from OperatorInterface.apply_inverse
  • invert_options is removed from OperatorInterface
  • solver_options is added to OperatorInterface
  • solver_options can be given to the implict Euler algorithm.

If not None, solver_options is a dict which can contain the keys
'inverse' and 'jacobian'. The following rules apply:

  • OperatorInterface.apply_inverse uses the 'inverse' entry
    of solver_options for solver selection and configuration.
    If not available, or None, defaults are used.
  • OperatorInterface.jacobian uses the values of the 'jacobian'
    entry of solver_options as solver_options for the Jacobian
    operator. If missing, solver_options is set to None.
  • OperatorInterface.assemble returns an assembled operator with
    the same solver_options.
  • OperatorInterface.projected and OperatorInterface.restricted
    return operators with solver_options set to None.

This PR addresses #122.

- 'options' is removed from OperatorInterface.apply_inverse
- 'invert_options' is removed from OperatorInterface
- 'solver_options' is added to OperatorInterface

If not 'None', solver_options is a dict which can contain the keys
'inverse' and 'jacobian'. The following rules apply:

- OperatorInterface.apply_inverse uses the 'inverse' entry
  of solver_options for solver selection and configuration.
  If not available, or 'None', defaults are used.
- OperatorInterface.jacobian uses the values of the 'jacobian'
  entry of solver_options as solver_options for the Jacobian
  operator. If missing, solver_options is set to None.
- OperatorInterface.assemlbe returns an assembled operator with
  the same solver_options.
- OperatorInterface.projected and OperatorInterface.restricted
  return operators with solver_options set to None.
@sdrave

sdrave commented Nov 18, 2015

Copy link
Copy Markdown
Member Author

After some discussion, we decided that there are too many corner cases where the approach in #183 does not work out very well.

As there are relatively few places, where new operators are created, for which appropriate solver_options cannot be known at this point, it seems better to make the solver_options used for these new operators configurable (see 1e54111).

Conflicts:
	src/pymor/algorithms/timestepping.py
@ftalbrecht

Copy link
Copy Markdown
Contributor

Very nice, thank you! If I remember correctly, we also decided to allow for an 'adjoint_inverse' key in the 'solver_options', just for future reference.

The tests currently seem to fail bc. of the newton, which might be related to 45c797f?

sdrave added a commit that referenced this pull request Nov 19, 2015
Repace 'invert_options' by 'solver_options'
@sdrave sdrave merged commit e1301a8 into master Nov 19, 2015
@sdrave sdrave deleted the solver_options2 branch November 19, 2015 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants