Utils: Miscellaneous function¶
-
utils.
irreducibleTensors
()¶ Uniaxial paramterization of the tensorial harmonics (Yl) of order l …
Parameters: - l (int) – Tensorial Harmonics of order l
- p (np.rrray) – An array of size 3 Axis along which the mode is paramterized
- Y0 (float) – Strength of the mode
- returns (Yl - tensorialHarmonics of rank l) –
-
utils.
gridXY
()¶ Returns the grid in XY direction centered around zero …
Parameters: - L (float) – Length of the grid
- Ng (int) – Number of grid points
Examples
An example of creating grid
>>> import numpy as np, pystokes >>> dim, L, Ng = 3, 10, 32 >>> rr, vv = pystokes.utils.gridXY(dim, L, Ng)
-
utils.
gridYZ
()¶ Returns the grid in YZ direction centered around zero …
Parameters: - L (float) – Length of the grid
- Ng (int) – Number of grid points
Examples
An example of creating grid
>>> import numpy as np, pystokes >>> dim, L, Ng = 3, 10, 32 >>> rr, vv = pystokes.utils.gridYZ(dim, L, Ng)
-
utils.
simulate
()¶ Simulates using choice of integrator
…
Parameters: - rp0 (np.array) – Initial condition
- Tf (int) – Final time
- Npts (int) – Number of points to return data
- rhs (Python Function) – Right hand side to integrate
- integrator (string) – Default is ‘odeint’ of scipy
- filename (string) – filename to write the data. Deafult is ‘this.mat’