Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RuleTables for algorithms on Operator hierarchies #367

Merged
merged 37 commits into from May 8, 2017
Merged

Use RuleTables for algorithms on Operator hierarchies #367

merged 37 commits into from May 8, 2017

Conversation

@sdrave
Copy link
Member

@sdrave sdrave commented Apr 19, 2017

This addresses #274 and #262. Documentation is still missing, but the overall concept is there. @pymor/pymor-devs, @andreasbuhr, please take a close look if you like the design. (Note that it is still impossible to dynamically add rules to a RuleTable, etc.)

@sdrave sdrave changed the title Base mathematical algorithms on RuleTables Use RuleTables for algorithms on Operator hierarchies Apr 20, 2017
@ftalbrecht
Copy link
Member

@ftalbrecht ftalbrecht commented Apr 20, 2017

One trivial change that came out of our discussion: the native pygments colorscheme does not work well with light backgrounds. The following alternatives seem to work on light backgrounds (perhaps default would be a reasonable default):

['default',
 'emacs',
 'friendly',
 'colorful',
 'autumn',
 'manni',                                                                                                                     
 'perldoc',
 'pastie',
 'borland',
 'bw',
 'vs',
 'tango',
 'xcode',
 'igor',
 'algol',
 'algol_nu',
 'arduino',
 'rainbow_dash',
 'abap']
@sdrave
Copy link
Member Author

@sdrave sdrave commented Apr 27, 2017

I have now added a bit of documentation and RuleTables can now be modified via insert_rule and append_rule methods. If everyone agrees that this is a good way to go, I would like to merge soon to master, so there is enough time for testing and improvement before the next release ...

@pmli, if I haven't overlooked anything, there should not be a lot of consequences for the sys-mor branch, right?

@pmli
Copy link
Member

@pmli pmli commented May 4, 2017

@sdrave I merged sys-mor and rules branch, and when running the heat.py demo, I got the following error

Traceback (most recent call last):
  File "./heat.py", line 91, in <module>
    rom_bt, _, _ = bt(lti, r, tol=1e-5)
  File "/home/mp/Documents/mpi/codes/pymor/src/pymor/reductors/bt.py", line 100, in bt
    rom, rc, _ = reduce_generic_pg(discretization, V, W, use_default=['E'])
  File "/home/mp/Documents/mpi/codes/pymor/src/pymor/reductors/basic.py", line 210, in reduce_generic_pg
    for k, op in discretization.operators.items()}
  File "/home/mp/Documents/mpi/codes/pymor/src/pymor/reductors/basic.py", line 210, in <dictcomp>
    for k, op in discretization.operators.items()}
AttributeError: 'NumpyMatrixOperator' object has no attribute 'projected'
@sdrave
Copy link
Member Author

@sdrave sdrave commented May 5, 2017

Hi @pmli, reduce_generic_pg still needed updating (op.projected(...) -> project(op, ...)). I made the changes in the sys-mor-with-rules branch ...

@pmli
Copy link
Member

@pmli pmli commented May 5, 2017

Demos and notebooks are working now 👍

@sdrave sdrave merged commit d003691 into master May 8, 2017
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@sdrave sdrave deleted the rules branch May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants