On May 3, 2008, at 8:28 PM, fred2 wrote:

previously i sent in some test/validation cases for the linear burgers eqn, etc.. those cases were implicitly for fipy v. 1.2 (CURRENT tag). attached are versions that will run under fipy 1.2 or 2.0 (trunk). there is also a new test case (requires v. 2.0) for the nonlinear burgers eqn (thanks much, Daniel). results look good.

Thanks very much for all of this. Any chance we could get you to write up some descriptive text and math to go along with it? These would make nice additions to the user guide.


for the nonlinear case, i have tried to add a source term involving a gradient to the equation, but sweep throws an exception. the source term does not involve the dep var, so it is explicitly coded. not sure whether this may be a feature which is not (re)implemented in trunk, or just a user error. (other forms of source terms work well, as expected. attempts to use getFaceGrad, etc., cause problems in the eqn definition itself, as might be expected).

Even in 1D, vectors have an orientation in FiPy (actually, in numpy).

eqsrc = sv.getGrad().dot([1,])

Try

  eqsrc = sv.getGrad().dot([[1]])

instead.


Reply via email to