New question #154697 on DOLFIN: https://answers.launchpad.net/dolfin/+question/154697
Hello, I am working with FEnics on C++. I want to take the values of basis function at each vertex directly. I read BasisFunction.h online but I don't know how to use this one. Finally, I found in "Poisson.h" (created from "Poisson.ufl" in dolfin/demo/pde/poisson/cpp) class "poisson_finite_element_0" in which there is function "evaluate_basis(unsigned int i, double* values, double* coordinates, const ufc::cell& c)". In "main.cpp" (in the same directory), I wrote: unsigned int i; double* values; double* coordinates; ufc::cell c; poisson_finite_element_0 finite_element; finite_element.evaluate_basis(i,values,coordinates,c); I compiled it without any errors. The problem is that how to input the value for c? In fact, I have read the paper "efficient representation of computational meshes" of A. Logg and I could make a loop for all cells as well as vertices. However, the cell in this loop doesn't match with c anymore (because they have different type). Moreover, it is difficult to initialize the cell data structure: c.entity_indices = new unsigned int [...]; c.coordinates = new double[..]; ..... Is there any simple way to do this? Do you have any examples working on basis functions? Please help me! Thanks in advance -- You received this question notification because you are a member of DOLFIN Team, which is an answer contact for DOLFIN. _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

