Currently there are two of the core libraries:
- NBody.DomainModel.Common – The core types and interfaces upon which the system is build.
There’s not much to see here although it does include a reusable Vector T4 template which will allow you to generate a Vector class for different numeric types. This is a brute force approach to get around the problems you run into when trying to create Vector<T> where T is a numeric type (see Generic Operators and Generic Numerics). The advantage of T4 templates is there’s no performance hit associated with the other approaches. It’s also not nearly as clever of course.
- NBody.DomainModel.FSharp – Two integrators written in F#.
A Forward Euler integrator and a wrapper for it which implements a Barnes-Hut tree code. I’ve blogged about this before. It’s an Octree implementation in F# which uses the asynchronous computations feature to scale across multiple cores.
Currently this code runs against Visual Studio 2008 SP1 and the F# October 2009 CTP. As soon as VS 2010 ships I’ll be upgrading to that.