Code Monkey home page Code Monkey logo

fast-spatial-interpolation-for-irregular-grid's People

Contributors

kallemov avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

kikuznetsov

fast-spatial-interpolation-for-irregular-grid's Issues

some numerical issues

I'm finding the interpolation gives unexpected results when the points form a box that gets progressively larger. Ugly test code snippet follows...

#define qqa (360.)
#define zzi (7.)
double sbf[4] = {100.,102,103.,104.};
double sbxa[4] = {qqa-120.-zzi,qqa-120.-zzi,360. -119.5,360. -119.5};
double sbya[4] = {38.+zzi,38.25+zzi,38.25,38. };
double sbx = qqa-119.85;
double sby = 38.18;
double sbv = 0;
// sb_init(sbf, sbxa, sbya);
// sbv = sb_interp(sbx, sby);
// when qqa = 0
// zzi of 7 returns +99
// zzi of 5 returns +135
// zzi of 2 returns -442
// zzi of 1 returns -4208
// zzi of 0 returns +810576
// when qqa = 360
// zzi of 7 returns -786
// zzi of 5 returns +2900
// zzi of 2 returns +3605
// zzi of 1 returns +225578
// zzi of 0 returns -93498082
``

Can the interpolation routines be formulated slightly differently so as to provide more numerical stability?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.