new function calculating A-elements by Gaussian quadrature