-
Notifications
You must be signed in to change notification settings - Fork 75
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
ex13: add mesh.refined(1)
and everything is broken
#799
Comments
Ouch! #104? |
This is already fixed in #792, just waiting for it to be merged. Edit: However, it is not fixed for all We used to have a warning if Also some kind of proper error message would be nice if the boundary name does not exist when calling |
Let me add that currently |
I did some changes in #792 and now it looks like this if In [1]: from skfem import *
In [2]: m = MeshTet().refined()
Named boundaries invalidated by a call to Mesh.refined()
In [3]: basis = Basis(m, ElementTetP1())
In [4]: basis.get_dofs("left")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-4-9d9e979f36a3> in <module>
----> 1 basis.get_dofs("left")
~/src/scikit-fem/skfem/assembly/basis/abstract_basis.py in get_dofs(self, facets, elements, skip)
243 skip_dofnames=skip)
244
--> 245 facets = self._get_dofs_normalize_facets(facets)
246 return self.dofs.get_facet_dofs(facets,
247 skip_dofnames=skip)
~/src/scikit-fem/skfem/assembly/basis/abstract_basis.py in _get_dofs_normalize_facets(self, facets)
265 return self.mesh.boundaries[facets]
266 else:
--> 267 raise ValueError("Boundary '{}' not found.".format(facets))
268 raise NotImplementedError
269
ValueError: Boundary 'left' not found. The ultimate goal, of course, is to have these preserved for all |
Add
mesh = mesh.refined(1)
before line 40scikit-fem/docs/examples/ex13.py
Lines 36 to 40 in 71eb03e
and you get
The text was updated successfully, but these errors were encountered: