Lines Matching refs:u
25 def initialCondition(self, u): argument
26 u[0] = np.sqrt(2.0)
27 u[1] = np.sqrt(3.0)
28 u.assemble()
30 def evalRHSFunction(self, ts, t, u, f): argument
32 -2.0 * (-1.0 + u[0] * u[0] - np.cos(t)) / (2.0 * u[0])
33 + 0.05 * (-2.0 + u[1] * u[1] - np.cos(5.0 * t)) / (2.0 * u[1])
34 - np.sin(t) / (2.0 * u[0])
37 0.05 * (-1.0 + u[0] * u[0] - np.cos(t)) / (2.0 * u[0])
38 - (-2.0 + u[1] * u[1] - np.cos(5.0 * t)) / (2.0 * u[1])
39 - 5.0 * np.sin(5.0 * t) / (2.0 * u[1])
43 def evalRHSFunctionSlow(self, ts, t, u, f): argument
45 -2.0 * (-1.0 + u[0] * u[0] - np.cos(t)) / (2.0 * u[0])
46 + 0.05 * (-2.0 + u[1] * u[1] - np.cos(5.0 * t)) / (2.0 * u[1])
47 - np.sin(t) / (2.0 * u[0])
51 def evalRHSFunctionFast(self, ts, t, u, f): argument
52 f[0] = 0.05 * (-1.0 + u[0] * u[0] - np.cos(t)) / (2.0 * u[0]) - 5.0 * np.sin(
54 ) / (2.0 * u[1])
57 def evalIFunctionFast(self, ts, t, u, udot, f): argument
58 f[0] = udot[0] + (-2.0 + u[1] * u[1] - np.cos(5.0 * t)) / (2.0 * u[1])
61 def evalIJacobianFast(self, ts, t, u, udot, a, A, B): argument
62 A[0, 0] = a + (2.0 + np.cos(5.0 * t)) / (2.0 * u[1] * u[1]) + 0.5
76 u = PETSc.Vec().createSeq(ode.n, comm=ode.comm) variable
93 f = u.duplicate()
102 ode.initialCondition(u)
103 ts.solve(u)
104 u.view()
106 del ode, Jim, u, ts