aepsil0n/triton — pull request #1 by aepsil0n (2014-02-17 19:42:38+00:00)
Title: Draft for handling different types of fluids

A first draft for abstracting and implementing a type of fluid (typically represented by some equation of state).

I've been refactoring, renaming and extending a couple of things here (still your branch though @Antharion). However, I think it makes sense to merge this into master, and reiterate from there.

Some issues that still need to be addressed:

- Fluid trait needs to be more generic in at least two regards:
- Accept more general type than f64
- Different quantities may have different types. First of all, there is a vector vs. scalar differentiation (vanishes only for 1D) and then using physical units will make the whole thing a little bit more complicated, too
- How do we deal with something like the Boltzmann constant? Having this as a global static is definitely not a long-term solution. This is, of course, an implementation detail but a good solution would be nice.
- Saving the adiabatic coefficient one per cell is something that might come in handy but should not be our only way of doing it

Just a thought: I think the last two points could be solved by associating a reference to some (implementation-specific) meta-object. This object could handle these constants without putting them into a global. It should probably be simulation- and task-local.