2009/2/17 Anders Logg <[email protected]>: >> MyFunction f_(f); > > Here you copy the function f to f_ and since f has a zero vector, f_ > will also have a zero vector.
It seems when we create f in python, it doesn't come with a zero vector. That's why interpolate.py works. > >> f.interpolate(f_.vector(), f.function_space()); > > Here f_ already has a zero vector or would get it by the call to > vector() if it didn't so again the result will be zero. So the work-around doesn't work in c++ (but for whatever reason it works in python). I would call the zero vector problem a bug. -Ali > > -- > Anders > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAkma7PIACgkQTuwUCDsYZdG79gCfZ+G1N+fQSezvbWhePEdy8PCV > tgsAn15RLbvl/3H1CWTp7FtHQXndo4Fd > =ZOvh > -----END PGP SIGNATURE----- > > _______________________________________________ > DOLFIN-dev mailing list > [email protected] > http://www.fenics.org/mailman/listinfo/dolfin-dev > > _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
