Add combined single/double layer kernel.
Move partioning to setup.