Evaluate basis at given points #882
-
Hi, Is there a way to evaluate a This is a MWE of what I would like to do: from nutils import mesh
import numpy as np
domain, geom = mesh.rectilinear([np.linspace(0, 1, 10), np.linspace(0, 1, 10)])
basis = domain.basis("spline", degree=2)
# Evaluation with Bezier sample is easy
bezier = domain.sample('bezier', 2)
evaluations = bezier.eval(basis[1])
# But what if want to evaluate basis[1] at the points (0.5, 0.5) and (0.25, 0.25)? Is there any easy way to obtain this? Thank you for your help, |
Beta Was this translation helpful? Give feedback.
Answered by
joostvanzwieten
Jul 31, 2024
Replies: 1 comment 2 replies
-
You can create a sample with the desired points using smpl = domain.locate(geom, [[0.5, 0.5], [0.25, 0.25]], tol=1e-10)
smpl.eval(basis[1]) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
joostvanzwieten
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can create a sample with the desired points using
Topology.locate()
. Continuing your example: