Intermediate commit

-Compiles under mingw g++
-Correct mesh adaption to follow