Ejemplo n.º 1
0
 def draw_bd_displacement(self, dt, D):
     r = math.sqrt(2.0 * D * dt)
     # Draw 2 numbers from normal distribution.
     x, y = myrandom.normal(0.0, r, 2)
     return x * self.shape.unit_x + y * self.shape.unit_y
Ejemplo n.º 2
0
 def draw_bd_displacement(self, dt, D):
     r = math.sqrt(2.0 * D * dt)
     # Draw 3 numbers from normal distribution.
     return myrandom.normal(0.0, r, 3)
Ejemplo n.º 3
0
 def draw_bd_displacement(self, dt, D):
     r = math.sqrt(2.0 * D * dt)
     # Draw 1 number from normal distribution.
     z = myrandom.normal(0.0, r, 1)
     return z * self.shape.unit_z
Ejemplo n.º 4
0
 def draw_bd_displacement(self, dt, D):
     r = math.sqrt(2.0 * D * dt)
     # Draw 2 numbers from normal distribution.
     x, y = myrandom.normal(0.0, r, 2)
     return x * self.shape.unit_x + y * self.shape.unit_y
Ejemplo n.º 5
0
 def draw_bd_displacement(self, dt, D):
     r = math.sqrt(2.0 * D * dt)
     # Draw 3 numbers from normal distribution.
     return myrandom.normal(0.0, r, 3)
Ejemplo n.º 6
0
 def draw_bd_displacement(self, dt, D):
     r = math.sqrt(2.0 * D * dt)
     # Draw 1 number from normal distribution.
     z = myrandom.normal(0.0, r, 1)
     return z * self.shape.unit_z