On Mar 22, 2012, at 2:40 AM, wang yunbo wrote: > gradient = phi.getGrad > print gradient > print gradient.shape > > > > The output is: > > <bound method CellVariable.getGrad of distance function> > > File "PVD.py", line 51, in <module> > print gradient.shape > AttributeError: 'function' object has no attribute 'shape' > > What leads to this error and How can I get a (2, N) matrix of normal vector > fields in this case?
As the error message says, .getGrad is a function. .getGrad() is the value. _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
