Coder Social home page Coder Social logo

gabrielfougeron / choreo Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 899.83 MB

Finds periodic solutions to the N-body problem

Home Page: https://gabrielfougeron.github.io/choreo/

License: BSD 2-Clause "Simplified" License

Python 50.91% Cython 28.95% HTML 2.83% CSS 2.02% SCSS 0.04% JavaScript 12.72% Dockerfile 0.05% C 2.45% Shell 0.03%

choreo's Introduction

Hi, My name is Gabriel Fougeron. For the past ten years I've been working at ESI-Group as a research engineer. My work focuses on simulation and optimization topics in continuum mechanics. Lately, I've mainly been working on applications of optimal transport to reduced order modelling of the simulation of manufacturing processes.

I’ve also invested unreasonable amounts of time in small pet projects across the years. The latest of them is an open-source python library for the computation of periodic N-body gravitational orbits. You can experiment with the web-app demo at this address, no installation required!

choreo's People

Contributors

gabrielfougeron avatar ivanosevitch avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ivanosevitch

choreo's Issues

Change FFT definition

Check sign in FFT definition.
IS this the correct normalization / sign convention ?

==> performance and availability of drop-in replacements

Convergence Issues for complex systems

Some complex systems have trouble converging. By that I mean that sometimes, the system is far away from singular solutions and the discrétisation level is correct (no need for refinement) and yet, convergence is very slow. This is especially the case for Target init states.

I suspect the linear solvers in the Newton Krylov loop to not be robust enough to handle these complex cases.

  • Lgmres seems to perform better in these cases, but it is crashing in pyodide. Raise the issue with the pyodide team.

  • How can I help the linear solver? How to design a good preconditionner? Where should the preconditionner act (change of variables?)? Can the preconditionner be adaptive?

Weird behavior of async loads

Talk with Ivan of the behavior of the following lines :

		AllPos = new Array(n_init_gallery_orbits);
		AllPlotInfo = new Array(n_init_gallery_orbits);

		// Load all files asynchronously, keeping promises

		for (var i = 0; i < n_init_gallery_orbits; i++) {
			
			let npyjs_obj = new npyjs();
			let finished_npy = 
				npyjs_obj.load(AllPosFilenames[i])
				.then((res) => {
					AllPos[i] = res;
				});

			let finished_json = 
				fetch(AllPlotInfoFilenames[i],Gallery_cache_behavior)
				.then(response => response.text())
				.then(data => {
					AllPlotInfo[i] = JSON.parse(data);
				});

			await Promise.all([finished_npy ,finished_json ])

			if (i==0) {

				// await Promise.all([finished_npy ,finished_json ])

				$('label:first', "#orbitRadio").removeClass('w3-light-grey').addClass('w3-red');
				setOrbit(0);
				
				startAnimation();

			}
		}

Speed and loading from gallery

Problems:

  • Switching between different solutions, especially in the gallery gives the impression of VERY different speeds.
  • Overall shape of the solution is not given immediately. Especially when the player is in pause.

Check whether a given solution has symmetries

Given a loop's Fourrier coefficients, decide whether the loop has a given symmetry or not.

This would be fairly straightforward if not for the global translation and rotation invariance.

Then, classify and sort already found solutions in terms of their a posteriori symmetries (and not a priori).

Save GUI state as cookie

Opt in feature to save current state as cookie

Load cookie at startup

What are the legal consequeces / requirements ?

Python worker info not reliable

Python worker info are not very reliable. The associated code is scattered and hard to read/maintain.
The functionnality is great, so this is a shame.

Needs increased reliability and code refactoring.

Web version / local version

The web version of the GUI allows to run some python code with pyodide. This comes with a lot of performance drop.

=> Expert GUI to run python natively ? How to connect the two ?
=> Ask Ivan !

Local gallery creation

  • Allow the user to generate multiple solutions, with pictures and movies.

  • #52

  • Put the found solutions in an interactive gallery

Implement cubic spline interpolation

Goal : better smoothness impression at low speed and low number of interpolation points
Should be rather straightforward, once the formulas are in place

Index Theory

Investigate.
What does it have to do with periodic solutions ?
Compute index ?
Reduce indices too large ?
Link with orbits that loop many times ?

Rethink default gallery

  • Add a tree structure, identical (at least visually) to the workspace gallery.

  • Load files lazily ! I.e. only actually fetch when the button is clicked (for the first time ?)

  • #75

Now Playing tab

Desing a "Now Playing" tab giving information about currently displayed choreo.

==> What to display during search ?

Implement GUI Rotation

Rotate displayed image at will ?

=> What happens to min/max ? Out of screen ? Safe distance ? User zoom ?

Several UI changes

  • Display particle movement during search ?
  • Forbid second search to launch
  • Divide "Hide" button into two toggles : trail and bodies.

GUI speed meaning

Relate the GUI speed slider position with the time it takes for 1 body to go round a loop and display the information.

Stability investigation

Goal : Reliable and efficient computation of monodromy matrix.

  • First order symplectic integrator of the nonautonomous tangent linear system
  • Second order symplectic integrator of the nonautonomous tangent linear system
  • #96
  • Error estimator ==> Check error on init state = known eigenvector with eigenvalue 1
  • Video of symplectic integration of perturbed system, along "most unstable" directions (SVD V cols)

Check consistency of symmetries

Create an automatic check to answer the question

$$ \nabla_p S = 0 \Rightarrow \nabla_c S = 0 $$

cf lemma 4.2 p 88 of G Minton's thesis.

restart search without killing worker

As a GUI user, it is sometimes easy to see that the optimizer will not converge (for isntance when a loop escaped).

Add a button to start next optimization attempt without killing worker.

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.