On May 9, 2014, at 3:18 PM, Zebo LI <[email protected]> wrote: > HI, > > Thank you so much for reply. BTW, is "fp.numerix" typo?
>>> import fipy as fp >>> fp.numerix is the syntax we generally use these days. I don't always remember to state the import > And for the second method, it does not works well. Because, here LVV is a > matrix depends on position, instead of a scalar. The problem comes out when > doing the product of a Matrix and a vector: When I use: > LVV*(alphaV*epsilon).faceGrad, it shows: "TypeError: unsupported operand > type(s) for *: 'binOp' and '_FaceGradVariable'". ; and If I use: > LVV*(alphaV*epsilon).grad, or LVV*v (v=the gradient of (alphaV*epsilon) by > derive it explicitly.), it shows: "IndexError: id1 does not have the same > size as b". fp.numerix.dot(LVV, (alphaV*epsilon).faceGrad) should hopefully work _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
