woodward / integrator Goto Github PK
View Code? Open in Web Editor NEWA numerical integrator written in Elixir for the solution of sets of non-stiff ordinary differential equations (ODEs).
License: MIT License
A numerical integrator written in Elixir for the solution of sets of non-stiff ordinary differential equations (ODEs).
License: MIT License
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.