switching to direct solver. fixing the post_process function