def __init__(self, U_max, t, unit, s, K, compute_width): '''Unit and s characterize domain, t, K - time parameters, U_max is the maximal magnitude of inflow velocity.''' Expression.__init__(self) self.U_max, self.t, self.K = U_max, t, K # Channel width self.w = compute_width(unit) # Midpoint on the inflow M = [4*unit*cos(5*pi/4) + s*sin(5*pi/4) - 0.5*self.w*cos(5*pi/4), 4*unit*sin(5*pi/4) - s*cos(5*pi/4) - 0.5*self.w*sin(5*pi/4)] self.M = M
def __init__(self, U_max, t, unit, s, K, compute_width): '''Unit and s characterize domain, t, K - time parameters, U_max is the maximal magnitude of inflow velocity.''' Expression.__init__(self) self.U_max, self.t, self.K = U_max, t, K # Channel width self.w = compute_width(unit) # Midpoint on the inflow M = [ 4 * unit * cos(5 * pi / 4) + s * sin(5 * pi / 4) - 0.5 * self.w * cos(5 * pi / 4), 4 * unit * sin(5 * pi / 4) - s * cos(5 * pi / 4) - 0.5 * self.w * sin(5 * pi / 4) ] self.M = M
def __init__(self, expr): self.expr = expr self.values = None self.points = None Expression.__init__(self)