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

Move all of pyMOR's PDE toolkit to discretizers.builtin #847

Merged
merged 2 commits into from Jan 14, 2020

Conversation

sdrave
Copy link
Member

@sdrave sdrave commented Jan 10, 2020

This moves all components of pyMOR's builtin discretization toolkit to pymor.discretizers.builtin. The rationale:

  1. I want to make it clearer which parts of pyMOR are only relevant for the PDE toolkit and have a cleaner top-level namespace. In a next step I want to move pymor.domaindescriptions into pymor.analyticalproblems.
  2. In the not too distant future, I want to have discretizers.fenics and discretizers.ngsolve modules with discretizers that take the same analyticalproblems as input as the builtin toolkit. For that we will need to make Functions interoperable between different PDE solvers, probably using sympy expressions which are converted to the appropriate format.

There is still pymor.discretizers.disk which seems misplaced. (It does not discretize anything.) I would like to completly ditch the current implementation and have a YAML-based input file format that is shared by all Models that can be read from disk. I will discuss this in another issue, however.

I want to merge this PR soon in order to have time for letting things settle before the next release.

@sdrave sdrave added pr:change builtin-models labels Jan 10, 2020
@sdrave sdrave added this to the 2020.1 milestone Jan 10, 2020
@sdrave sdrave requested review from renefritze, ftalbrecht and pmli Jan 10, 2020
@pmli
Copy link
Member

@pmli pmli commented Jan 10, 2020

I get an error when running make docs: KeyError: "Error loading defaults from file. Key 'pymor.discretizers.builtin.gui.jupyter.get_visualizer.backend' does not correspond to a default".

Copy link
Member

@ftalbrecht ftalbrecht left a comment

Looks good!

discretize_stationary_fv, discretize_instationary_fv,
OnedGrid, TriaGrid, RectGrid, load_gmsh)
from pymor.discretizers.builtin.domaindiscretizers.default import discretize_domain_default
from pymor.discretizers.builtin.grids.boundaryinfos import EmptyBoundaryInfo, GenericBoundaryInfo, AllDirichletBoundaryInfo
Copy link
Member

@ftalbrecht ftalbrecht Jan 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could even drop this and add some pymor.discretizers.basic which would result in

from pymor.basic import *
from pymor.discretizers.basic import *

Its only one additional line in interactive sessions but would further document the splitting.

Copy link
Member

@ftalbrecht ftalbrecht Jan 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just

from pymor.basic import *
from pymor.discretizers.builtin import *

@sdrave
Copy link
Member Author

@sdrave sdrave commented Jan 13, 2020

@pmli,

I get an error when running make docs: KeyError: "Error loading defaults from file. Key 'pymor.discretizers.builtin.gui.jupyter.get_visualizer.backend' does not correspond to a default".

I can't reproduce this. Could you try with a fresh build environment?

pmli
pmli approved these changes Jan 13, 2020
Copy link
Member

@pmli pmli left a comment

It seems the issue was that I forgot to run python setup.py build_ext --inplace...

@codecov
Copy link

@codecov codecov bot commented Jan 13, 2020

Codecov Report

Merging #847 into master will increase coverage by 0.15%.
The diff coverage is 85.24%.

Impacted Files Coverage Δ
src/pymor/bindings/pyamg.py 86.04% <ø> (ø) ⬆️
src/pymor/algorithms/genericsolvers.py 78.26% <ø> (ø) ⬆️
src/pymor/bindings/scipy.py 76.54% <ø> (ø) ⬆️
src/pymor/discretizers/builtin/fv.py 67.04% <ø> (-0.07%) ⬇️
src/pymor/parameters/base.py 75.44% <0%> (+2.72%) ⬆️
src/pymor/models/mpi.py 28.57% <0%> (-0.85%) ⬇️
src/pymor/models/iosys.py 46.7% <100%> (+0.07%) ⬆️
src/pymor/core/interfaces.py 95.26% <100%> (+15.4%) ⬆️
src/pymor/core/exceptions.py 84.61% <100%> (ø) ⬆️
src/pymor/tools/pprint.py 58.62% <100%> (ø) ⬆️
... and 7 more

@sdrave sdrave merged commit e55fe2c into master Jan 14, 2020
7 checks passed
@renefritze renefritze deleted the builtin_discretizers branch Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants