Updated simplified problem
Working code directory contains runFlexPDE which writes sigma to file and calls flexpde