Calculates flux from vectors.