This file is indexed.

/usr/lib/python2.7/dist-packages/PySPH-1.0a4.dev0-py2.7-linux-x86_64.egg/pysph/sph/misc/advection.py is in python-pysph 0~20160514.git91867dc-4build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
"""
Functions for advection
#######################
"""

from pysph.sph.equation import Equation
from numpy import cos, pi

class Advect(Equation):
    def loop(self, d_idx, d_ax, d_ay, d_u, d_v):
        d_ax[d_idx] = d_u[d_idx]
        d_ay[d_idx] = d_v[d_idx]

class MixingVelocityUpdate(Equation):
    def __init__(self, dest, sources, T):
        self.T = T
        super(MixingVelocityUpdate, self).__init__(dest, sources)

    def loop(self, d_idx, d_u, d_v, d_u0, d_v0, t=0.1):
        d_u[d_idx] = cos(pi*t/self.T) * d_u0[d_idx]
        d_v[d_idx] = -cos(pi*t/self.T) * d_v0[d_idx]