Created
October 3, 2017 10:11
-
-
Save TheBB/62ce0707c266adbcd6674e4c54284270 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nutils import mesh, function as fn, plot | |
import numpy as np | |
xpts = np.linspace(0, 4, 5) | |
domain, geom = mesh.rectilinear([xpts]) | |
basis = domain.basis('spline', 3, knotmultiplicities=[[4, 1, 3, 1, 4]]) | |
dofs = [0, 0, 0, .5, 1, .5, 0, 0, 0] | |
func = basis.dot(dofs) | |
x, y = domain.elem_eval([geom, func], separate=True, ischeme='bezier40') | |
with plot.PyPlot('test', index=0) as plt: | |
plt.mesh(x, y) | |
plt.xlim(0, 4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment