Bases that vanish at the boundary #702
-
Dear all, I have a rather simple question or request for an example Considering a unit square or a line with structured elements (for now), do you have an example where the basis functions, which could be Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can remove specific dofs from a basis (on a structured topology!) using parameter 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 |
Beta Was this translation helpful? Give feedback.
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:The following examples also use
removedofs
: drivencavity.py and co…