On 07/16/2015 05:14 PM, Jozef Vesely wrote:
On 07/16/2015 02:47 PM, Robert Cimrman wrote:
you can try [1] (use u.evaluate_at(p, mode='grad') or probe call with the same argument). Let me know if that works for you and I will then merge it into master. It passes the updated test test_invariance_qp() in in tests/test_mesh_interp.py.
Hi,
thank you for quick implementation, I did some testing:
- shape of data returned from evaluate_at changed. There is extra second axis (even without mode='grad'), this would be compatibility problem. However I might have had old version and the change happened already earlier.
I have changed it now in order to have the same number of dimensions in the output in both modes. But on second thought it might not be a good idea. What do you think? I am now inclined to revert that change.
- check attached test.py: For first order elements finite difference derivative and evaluate_at(...,mode='grad') match. For higher order elements there are discrepancies. I suppose this should not happen.
Thanks for the debugging. I have tested it with tensor-product element mesh (meshes/2d/square_quad.mesh), where your test worked. The problem was in wrong initialization of the basis gradient in simplex element case (not manifesting elsewhere, as the function had been called with arguments pre-initialized).
Your test file works now.
r.