Showing 1 of 1 files from the diff.

@@ -18,8 +18,7 @@
 18 18 def threebody(t0=0.0, tmax=17.0652165601579625588917206249, y0=None): 19 19  r"""Initial value problem (IVP) based on a three-body problem. 20 20 21 -  Let the initial conditions be :math:y = (y_1, y_2, \dot{y}_1, \dot{y}_2)^T. 22 -  This function implements the second-order three-body problem as a system of 21 +  For the initial conditions :math:y = (y_1, y_2, \dot{y}_1, \dot{y}_2)^T, this function implements the second-order three-body problem as a system of 23 22  first-order ODEs, which is defined as follows: [1]_ 24 23 25 24  .. math::
@@ -45,7 +44,7 @@
 45 44  Parameters 46 45  ---------- 47 46  t0 48 -  Initial time. Default is 0.0. 47 +  Initial time. 49 48  tmax 50 49  Final time. Default is 17.0652165601579625588917206249 which is the period of the solution. 51 50  y0
@@ -54,8 +53,7 @@
 54 53  Returns 55 54  ------- 56 55  InitialValueProblem 57 -  InitialValueProblem object describing a three-body problem IVP with the prescribed 58 -  configuration. 56 +  InitialValueProblem object describing a three-body problem IVP with the prescribed configuration. 59 57 60 58  References 61 59  ----------
@@ -65,7 +63,7 @@
 65 63  """ 66 64 67 65  def rhs(t, y): 68 -  mu = 0.012277471 # a constant (standardised moon mass) 66 +  mu = 0.012277471 # a constant (standardized moon mass) 69 67  mp = 1 - mu 70 68  D1 = ((y[0] + mu) ** 2 + y[1] ** 2) ** (3 / 2) 71 69  D2 = ((y[0] - mp) ** 2 + y[1] ** 2) ** (3 / 2)
@@ -80,11 +78,10 @@
 80 78 81 79 82 80 def vanderpol(t0=0.0, tmax=30, y0=None, params=1e1): 83 -  r"""Initial value problem (IVP) based on the Van der Pol Oscillator, implemented in jax. 81 +  r"""Initial value problem (IVP) based on the Van der Pol Oscillator. 84 82 85 83  This function implements the second-order Van-der-Pol Oscillator as a system 86 -  of first-order ODEs. 87 -  The Van der Pol Oscillator is defined as 84 +  of first-order ODEs. The Van der Pol Oscillator is defined as 88 85 89 86  .. math:: 90 87
@@ -107,10 +104,9 @@
 107 104  tmax : float 108 105  Final time point. Rightmost point of the integration domain. 109 106  y0 : np.ndarray, 110 -  *(shape=(2, ))* -- Initial value of the problem. 107 +  *(shape=(2, ))* -- Initial value of the problem. Defaults to [2.0, 0.0]. 111 108  params : (float), optional 112 -  Parameter :math:\mu for the Van der Pol Equations 113 -  Default is :math:\mu=0.1. 109 +  Parameter :math:\mu for the Van der Pol equations. 114 110 115 111  Returns 116 112  -------
@@ -144,7 +140,7 @@
 144 140 145 141 146 142 def rigidbody(t0=0.0, tmax=20.0, y0=None, params=(-2.0, 1.25, -0.5)): 147 -  r"""Initial value problem (IVP) for rigid body dynamics without external forces 143 +  r"""Initial value problem (IVP) for rigid body dynamics without external forces. 148 144 149 145  The rigid body dynamics without external forces is defined through 150 146
@@ -152,24 +148,24 @@
 152 148 153 149  f(t, y) = 154 150  \begin{pmatrix} 155 -  y_2 y_3 \\ 156 -  -y_1 y_3 \\ 157 -  -0.51 \cdot y_1 y_2 151 +  a y_2 y_3 \\ 152 +  b y_1 y_3 \\ 153 +  c y_1 y_2 158 154  \end{pmatrix} 159 155 160 -  The ODE system has no parameters. 156 +  for parameters :math:(a, b, c). 161 157  This implementation includes the Jacobian :math:J_f of :math:f. 162 158 163 159  Parameters 164 160  ---------- 165 161  t0 166 -  Initial time. Default is 0.0 162 +  Initial time. 167 163  tmax 168 -  Final time. Default is 20.0 164 +  Final time. 169 165  y0 170 -  *(shape=(3, ))* -- Initial value. Default is [1., 0., 0.9]. 166 +  *(shape=(3, ))* -- Initial value. Defaults to [1., 0., 0.9]. 171 167  params 172 -  Parameter of the rigid body problem. Default is (-2.0, 1.25, -0.5). 168 +  Parameters (a, b, c) of the rigid body problem. 173 169 174 170  Returns 175 171  -------
@@ -205,7 +201,7 @@
 205 201 206 202  f(t, y) = a y \left( 1 - \frac{y}{b} \right) 207 203 208 -  for some parameters :math:(a, b). 204 +  for parameters :math:(a, b). 209 205  Default is :math:(a, b)=(3.0, 1.0). This implementation includes 210 206  the Jacobian :math:J_f of :math:f as well as a closed form 211 207  solution given by
@@ -219,14 +215,13 @@
 219 215  Parameters 220 216  ---------- 221 217  t0 222 -  Initial time. Default is 0.0 218 +  Initial time. 223 219  tmax 224 -  Final time. Default is 2.0 220 +  Final time. 225 221  y0 226 222  *(shape=(1, ))* -- Initial value. Default is [0.1]. 227 223  params 228 -  Parameters :math:(a, b) for the logistic IVP. 229 -  Default is :math:(a, b) = (3.0, 1.0). 224 +  Parameters :math:(a, b) of the logistic IVP. 230 225 231 226  Returns 232 227  -------
@@ -273,26 +268,25 @@
 273 268  \frac{1}{d} (y_1 + b - c y_2) 274 269  \end{pmatrix} 275 270 276 -  for some parameters :math:(a, b, c, d). 271 +  for parameters :math:(a, b, c, d). 277 272  Default is :math:(a, b)=(0.2, 0.2, 3.0). 278 273  This implementation includes the Jacobian :math:J_f of :math:f. 279 274 280 275  Parameters 281 276  ---------- 282 277  t0 283 -  Initial time. Default is 0.0 278 +  Initial time. 284 279  tmax 285 -  Final time. Default is 20.0 280 +  Final time. 286 281  y0 287 -  *(shape=(2, ))* -- Initial value. Default is [1., -1.]. 282 +  *(shape=(2, ))* -- Initial value. Defaults to [1., -1.]. 288 283  params 289 -  Parameter of the FitzHugh-Nagumo model. Default is (0.2, 0.2, 3.0, 1.0). 284 +  Parameters (a, b, c, d) of the FitzHugh-Nagumo model. 290 285 291 286  Returns 292 287  ------- 293 288  InitialValueProblem 294 -  InitialValueProblem object describing the FitzHugh-Nagumo model with the prescribed 295 -  configuration. 289 +  InitialValueProblem object describing the FitzHugh-Nagumo model with the prescribed configuration. 296 290  """ 297 291  if y0 is None: 298 292  y0 = np.array([1.0, -1.0])
@@ -323,26 +317,25 @@
 323 317  -c y_2 + d y_1 y_2 324 318  \end{pmatrix} 325 319 326 -  for some parameters :math:(a, b, c, d). 320 +  for parameters :math:(a, b, c, d). 327 321  Default is :math:(a, b)=(0.5, 0.05, 0.5, 0.05). 328 322  This implementation includes the Jacobian :math:J_f of :math:f. 329 323 330 324  Parameters 331 325  ---------- 332 326  t0 333 -  Initial time. Default is 0.0 327 +  Initial time. 334 328  tmax 335 -  Final time. Default is 20.0 329 +  Final time. 336 330  y0 337 -  *(shape=(2, ))* -- Initial value. Default is [1., -1.]. 331 +  *(shape=(2, ))* -- Initial value. Defaults to [20., 20.]. 338 332  params 339 -  Parameter of the Lotka-Volterra model. Default is (0.2, 0.2, 3.0). 333 +  Parameters (a, b, c, d) of the Lotka-Volterra model. 340 334 341 335  Returns 342 336  ------- 343 337  InitialValueProblem 344 -  InitialValueProblem object describing the Lotka-Volterra system with the prescribed 345 -  configuration. 338 +  InitialValueProblem object describing the Lotka-Volterra system with the prescribed configuration. 346 339  """ 347 340  if y0 is None: 348 341  y0 = np.array([20.0, 20.0])
@@ -392,13 +385,13 @@
 392 385  Parameters 393 386  ---------- 394 387  t0 395 -  Initial time. Default is 0.0 388 +  Initial time. 396 389  tmax 397 -  Final time. Default is 200.0 390 +  Final time. 398 391  y0 399 -  *(shape=(4, ))* -- Initial value. Default is [998, 1, 1, 0]. 392 +  *(shape=(4, ))* -- Initial value. Defaults to [998, 1, 1, 0]. 400 393  params 401 -  Parameter of the SEIR model. Default is (0.3, 0.3, 0.1). 394 +  Parameters :math:(\alpha, \beta, \gamma) of the SEIR model. 402 395 403 396  Returns 404 397  -------
@@ -458,13 +451,13 @@
 458 451  Parameters 459 452  ---------- 460 453  t0 461 -  Initial time. Default is 0.0 454 +  Initial time. 462 455  tmax 463 -  Final time. Default is 20.0 456 +  Final time. 464 457  y0 465 -  *(shape=(3, ))* -- Initial value. Default is [0., 1., 1.05]. 458 +  *(shape=(3, ))* -- Initial value. Defaults to [0., 1., 1.05]. 466 459  params 467 -  Parameter of the Lorenz63 model. Default is (10.0, 28.0, 8.0 / 3.0). 460 +  Parameters (a, b, c) of the Lorenz63 model. 468 461 469 462  Returns 470 463  -------
@@ -502,9 +495,9 @@
 502 495  Parameters 503 496  ---------- 504 497  t0 505 -  Initial time. Default is 0.0 498 +  Initial time. 506 499  tmax 507 -  Final time. Default is 20.0 500 +  Final time. 508 501  y0 509 502  *(shape=(N, ))* -- Initial value. Default is [1/F, ..., 1/F]. N is the number of variables in the model. 510 503  num_variables
 1 coverage:  2  precision: 2  3  status:  4  project:  5  default:  6  target: auto  7  threshold: 1%  8  patch:  9  default:  10  target: 90%  11  threshold: 1%  12 13 comment:  14  layout: "reach, diff, files"  15  behavior: default  16  require_changes: true