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

Discretizing robin boundary conditions on a RectGrid #687

merged 1 commit into from May 21, 2019


Copy link

@deneick deneick commented May 20, 2019

Currently discretizing a problem with a robin boundary condition on a RectGrid raises a NotImplementedError. Replacing NI = bi.neumann_boundaries(1) in line 310 in with NI = bi.boundaries(self.boundary_type, 1) if self.boundary_type else g.boundaries(1) as in line 136 worked as a fix for me.
Since then BoundaryL2ProductFunctionalP1 and BoundaryL2ProductFunctionalQ1 are basically the same, it might be an idea to have just one BoundaryL2ProductFunctional.


from pymor.basic import *
from pymor.grids.rect import RectGrid
p = StationaryProblem(domain=domain,
diffusion=ConstantFunction(1, dim_domain=domain.dim),
robin_data=(ConstantFunction(1, dim_domain=domain.dim), ConstantFunction(1, dim_domain=domain.dim))
d,data = discretize_stationary_cg(p, .1, grid_type=RectGrid)

Copy link

@sdrave sdrave commented May 21, 2019

@deneick, you are totally right. Thanks for the fix!

@sdrave sdrave added builtin-models pr:new-feature labels May 21, 2019
@sdrave sdrave added this to the 2019.2 milestone May 21, 2019
@sdrave sdrave merged commit fb076c9 into pymor:master May 21, 2019
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants