4 def getLagrangianMultiplicatorRatioFromWeissenbergNumber(Wi):
8 coefficients = [1, -1, 0, -Wi * Wi / 6.0]
10 roots = numpy.roots(coefficients)
13 raise RuntimeError(
"Unexpected number of roots in " + sys._getframe().f_code.co_name)
15 if not numpy.array_equal(numpy.isreal(roots), [
True,
False,
False]):
16 raise RuntimeError(
"Unexpected types of roots in " + sys._getframe().f_code.co_name)