Added option for iterative resolution of optimal test functions.  (Can be expensive.)