Coder Social home page Coder Social logo

woodward / integrator Goto Github PK

View Code? Open in Web Editor NEW
32.0 3.0 0.0 816 KB

A numerical integrator written in Elixir for the solution of sets of non-stiff ordinary differential equations (ODEs).

License: MIT License

Elixir 64.98% MATLAB 32.61% Mathematica 1.48% M 0.57% HTML 0.36%
elixir numerical nx ode-solver runge-kutta runge-kutta-adaptive-step-size runge-kutta-methods adaptive-stepsize bogacki-shampine dormand-prince

integrator's People

Contributors

woodward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

integrator's Issues

'argument precision error' when running interpolation_and_fixed_times.livemd -- hexdocs guide out of date?

Hi there -- I have an up-to-date local Livebook, which I frequently use for other code that requires eg. Nx and EXLA.

The first guide I tried to run from the 'Run in Livebook' button in hexdocs, interpolation and fixed times, successfully installed dependencies but then died on the first cell:

First cell:

alias Integrator.SampleEqns

t_initial = 0.0
t_final = 20.0
x_initial = Nx.tensor([2.0, 0.0])
solution = Integrator.integrate(&SampleEqns.van_der_pol_fn/2, [t_initial, t_final], x_initial)

Error:

** (Integrator.AdaptiveStepsize.ArgPrecisionError) argument precision error
    (integrator 0.1.2) lib/integrator/adaptive_stepsize.ex:835: anonymous fn/2 in Integrator.AdaptiveStepsize.check_nx_type/2
    (elixir 1.15.7) lib/enum.ex:984: Enum."-each/2-lists^foreach/1-0-"/2
    (integrator 0.1.2) lib/integrator/adaptive_stepsize.ex:831: Integrator.AdaptiveStepsize.check_nx_type/2
    (integrator 0.1.2) lib/integrator/adaptive_stepsize.ex:267: Integrator.AdaptiveStepsize.integrate/10
    /integrator.livemd#cell:fdzbnriq6d3bdjscdtpmiaylictcnm4m:6: (file)

And ... as I write this, I clicked around on Github, and I see that the last commit to that file made a change that fixes that for me!

So I think maybe all that's needed is to re-publish the guides that are up on hexdocs, as it looks like they're out of date.

For future searchers, it was a change like this:

t_initial = Nx.tensor(0.0, type: :f64)
t_final = Nx.tensor(20.0, type: :f64)
x_initial = Nx.tensor([2.0, 0.0], type: :f64)

But best to use the guides directory in github as the same commit made a few changes across guides.

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.