
Halo orbit solver with modern Fortran
This application can be used to generate long-duration Earth-Moon halo orbits in the ephemeris model. A work in progress.
The application is built using the Fortran Package Manager (FPM). FPM will download all the required dependencies and compile the program, and can also be used to run the tests.
fpm build --profile release
To run an example:
fpm run halo_solver --profile release -- examples/example.json
OpenMP can also be employed to speed up the process. Another example, using the Intel Fortran Compiler with OpenMP:
fpm run halo_solver --profile release --compiler ifort --flag "-qopenmp" -- examples/example.json
Or with Gfortran:
fpm run halo_solver --profile release --flag "-fopenmp" -- examples/example.json
The qr_mumps solver can also be used, which will run much faster than the default LAPACK solver for very large problems. For this, the code must be compiled with the WITH_QRMUMPS preprocessor directive. See the build.sh and run.sh scripts for details.
Work in progress....
Example:
"<intel install dir>\windows\bin\ifortvars.bat" intel64
"<intel install dir>\windows\mkl\bin\mklvars.bat" intel64
set OMP_NUM_THREADS=12
fpm run halo_solver --profile release --compiler ifort --flag "/fpp /Qmkl:parallel /Qopenmp" -- examples/example.json
Result is:
LINK : fatal error LNK1181: cannot open input file 'lapack.lib'
It's because fmin and nlsolver-fortran both have explicit lapack and blas dependencies specified in their fpm.toml files (link = ["lapack", "blas"]). If i delete those it compiles.
Another source of CR3BP halos that can be used as initial guesses for this tool can be found here: https://ssd.jpl.nasa.gov/tools/periodic_orbits.html
The latest API documentation can be found here. This was generated from the source code using FORD.