Re #8911. Create the multidomain function.