On Feb 8, 2014, at 11:25 AM, yuan wang <[email protected]> wrote: > I found that if b and c are cellvariables, the command a = b*c will make a an > operator variable. If I use a = (b * c).copy(), a becomes a cellvariable. > Would this be a good command to use to assign b*c values to cellvariable a?
Not really. .copy() ought to produce another operator variable. I would not rely on the fact that it doesn't. What are you trying to do? Set an initial condition? a = CellVariable(..., value=(b * c).value) would be a good way, or a.value = (b * c).value after a has been declared. > A general question is why we need the operator variables, if all we care is > numpy array operations and value assignment? Who said all we care about is numpy array operations and value assignment? The coefficients of PDEs often depend on the fields being solved for. Operator values allow these coefficients to evolve as the fields evolve. What are you actually trying to do? _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
