Multiple grids in parallel
UG should allow multiple grids when build with MPI support.
The problem are global variables, in particular those used by DDD and PPIF (in parallel/). My current plan is to move them into several context classes (for PPIF, DDD and the application using DDD) which need to be passed to every function needing access to the current global variables.
An alternative is having a single global variable (possibly thread-local) for each context object that points to the current context. It would be updated when entering the UG code. That solution does have problems though (not thread-safe, even with thread-local variables), but might be useful as an intermediate solution until the context objects are passed though everywhere.
The context for PPIF should also accept a MPI communicator (currently MPI_COMM_WORLD is used always).