Defining a solver type with macros

I will create a separate thread for this question, this post is too long already: