Do not use deprecated variable d in quadrature rule but dim instead.