Use CovarianceAssemblyFunction when dimension is 1, CovarianceBlockAssemblyFunction otherwise