-
Notifications
You must be signed in to change notification settings - Fork 1
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
Request for using my own computed derivatives in NaturalNeighbor.jl #23
Comments
Hi @WillingWeiling , thanks for your interest. The using NaturalNeighbours
f = (x, y) -> x^2 + y^2
df = (x, y) -> (2x, 2y)
x = rand(100)
y = rand(100)
z = f.(x, y)
∇z = df.(x, y)
itp = interpolate(x, y, z; gradient=∇z) julia> itp
Natural Neighbour Interpolant
z: [0.34236037959410437, 0.6409391417100012, 0.2792694577044466, 0.40633019736493853, 0.0014825003910995446, 1.8705036885166058, 0.2833796685769481, 1.4593246638262931, 0.21883478954176305, 0.7157193513420117 … 1.0233750284009104, 0.5668896793818932, 0.7024901459842816, 1.7006307147816409, 0.7477708129900137, 1.09722701646297, 0.21527150358380945, 1.2723403302477225, 0.28273056436535154, 1.281013490332372]
∇: [(0.8350983284258899, 0.8197879605341261), (1.6006824475600536, 0.03965184627682539), (0.9765198636683925, 0.4043349931416407), (0.7002460373519068, 1.0653526536470006), (0.07126290698397475, 0.029182180394746737), (1.9119086977347501, 1.9561748095690823), (1.0644855459563665, 0.01972807030017587), (1.5441834861498966, 1.858170071981336), (0.6009112957223604, 0.7171086199735199), (0.8953492854012941, 1.4356974132801934) … (0.854979376605338, 1.833714912188694), (1.4897516651971912, 0.21954200866751927), (0.4152962082594305, 1.6240349883369096), (1.6916324673982732, 1.985170636084111), (0.028283158342867543, 1.7292435672611903), (1.6686166433054623, 1.2667385537418099), (0.8963693911208481, 0.24001651817505776), (1.1382351633665064, 1.9477633413397308), (1.0622364857876907, 0.050753381393001895), (1.8755837106400375, 1.267375124306626)]
H: nothing See that the gradient is now in the interpolant, so you can now use e.g. |
Hi@DanielVandH |
Dear DanielVandH,
I have been exploring the capabilities of NaturalNeighbor.jl and I was wondering if it would be feasible to utilize custom derivatives as additional known information during the interpolation process. Specifically, I would like to provide my own computed derivatives to enhance the accuracy of the interpolation.
Thank you for your attention to my inquiry. I appreciate the work you have done on NaturalNeighbor.jl and I look forward to hearing your insights on this matter.
Best regards,
Weiling H
The text was updated successfully, but these errors were encountered: