Skip to content

Bases that vanish at the boundary #702

Answered by joostvanzwieten
mcurti asked this question in Q&A
Discussion options

You must be logged in to vote

You can remove specific dofs from a basis (on a structured topology!) using parameter removedofs. The value should be a list of lists of dofs to exclude per dimension. Per dimension the first spline (dof 0) is non-zero at the left boundary and the last spline (dof -1) is non-zero at the right boundary. To remove all splines that are nonzero at the entire boundary, use [[0,-1]]*topo.ndims. Example:

from nutils import mesh
import numpy

topo, geom = mesh.rectilinear([4]*2)
basis = topo.basis('spline', degree=2, removedofs=[[0,-1]]*topo.ndims)

numpy.testing.assert_almost_equal(topo.boundary.sample('gauss', 0).eval(basis), 0)

The following examples also use removedofs: drivencavity.py and co…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mcurti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants