On Thursday April 21 2011 00:51:55 Neilen Marais wrote: > Hi Johan, > > On Thu, Apr 21, 2011 at 1:23 AM, Johan Hake <[email protected]> wrote: > > Update your repo and try! > > > > The ufc::cell version of evaluate_basis_all is not usable in Python. You > > need a dolfin::Cell version, which I just added ;) > > Thanks, works now if I use finite_element = V.dolfin_element() rather > than finite_element = V.element().
When I tested it it worked with V.element(). Not sure why we have V.dolfin_element(), as it should return the same thing as V.element()... > > We should probably ignore all the ufc::cell versions, and add unit test > > for the one we do expose... > > Please excuse my naivete, but what is the essential difficulty in > exposing the functions to the python side? We have not paid too much attention making methods taking generated code, ufc objects, available from Python. This is too low level, and some of the ufc objects gets reordered when the dolfin objects gets instantitated. This is mostly the case when run in parrallel. > Or at least, why when two > functions have essentially identical C++ function signatures does the > one work in python and not the other? One is ufc based, which is used in the library, or by more advanced C++ users. > I ask since from a perspective of both testability of my own code and > of learning what FEniCS does it is quite usefull to be able to call > the lower level functions from python. For instance, I also want to > use finite_element.map_to_reference_cell(), but it seems to give the > same error that evaluate_basis_all() did before you fixed it :) Yes, this would be the same case here. We also need to consider the interface. It would clutter the interface to duplicate too many functions. But if Garth or Anders is not opposed to it we could expose that one too. > If it is not to difficult you could teach me how to fix such problems. > Then I could go fishing rather than asking for fish periodically :) We need more fishermen! Just look at the last commit, where i added the dolfin version. It should be pretty straight forward to implement a similar method for the other methods which takes a ufc::cell. Johan > Cheers > Neilen > > _______________________________________________ > Mailing list: https://launchpad.net/~dolfin > Post to : [email protected] > Unsubscribe : https://launchpad.net/~dolfin > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

