On Thu, Jan 07, 2010 at 03:04:35PM +0100, Marie Rognes wrote: > Anders Logg wrote: > >On Wed, Jan 06, 2010 at 04:25:30PM +0100, Marie Rognes wrote: > >>Anders Logg wrote: > >>>We've come pretty far on the rewrite of FFC and only a few functions > >>>remain. As far as I can see, it remains to implement code generation > >>>for the following functions: > >>> > >>>Kristian: > >>> > >>> code["evaluate_basis_all"] = not_implemented > >>> code["evaluate_basis_derivatives"] = not_implemented > >>> code["evaluate_basis_derivatives_all"] = not_implemented > >>> > >>>Marie: > >>> > >>> code["tabulate_entity_dofs"] = not_implemented # Marie doesn't know what > >>> this function should do > >>Evidently, my comment was unclear ;) > >> > >>Should it look like this for CG_1? > >> > >> /// Tabulate the local-to-local mapping of dofs on entity (d, i) > >> virtual void tabulate_entity_dofs(unsigned int* dofs, > >> unsigned int d, unsigned int i) const > >> { > >> dofs[0] = i } > > > >Yes, this function should return an array of the dofs (dof indices) for > >the dofs associated with entity number i of dimension d. > > > >But perhaps we should check the d and the i as well to make sure that > >d == 0 and i <= d + 1? > > > >Here's another example of what should happen for P3 in 2D. > > > > switch (d) > > { > > case 0: > > if (i > 2) > > throw std::runtime_error("Sensible error message."); > > dofs[0] = i; > > case 1: > > if (i > 2) > > throw std::runtime_error("Sensible error message."); > > dofs[0] = 3 + 2*i; > > dofs[1] = 3 + 2*i + 1; > > case 2: > > if (i > 0) > > throw std::runtime_error("Sensible error message."); > > dofs[0] = 10; > > default: > > throw std::runtime_error("Sensible error message."); > > } > > > > Ok! > > >The corresponding function num_entity_dofs should return the size of > >the dofs array for each dimension so it should return 0, 2 and 1 in > >the above case for d = 0, 1, 2. > > > > Fixed already.
Nice! :-) -- Anders > >>> code["tabulate_coordinates"] = not_implemented # Marie doesn't believe in > >>> this function > >>> > >>What should this function do for the integral moment dofs, where > >>there are more than one point per dof? > > > >I guess we need to throw an exception and think about possibly extending the > >UFC interface with this extra information. > > > > Will throw. > > -- > Marie > > > >-- > >Anders > > > > > >>>Marie or Kristian: > >>> > >>> code["interpolate_vertex_values"] = not_implemented > >>> > >>Can fix. > >> > >> >
signature.asc
Description: Digital signature
_______________________________________________ Mailing list: https://launchpad.net/~ffc Post to : ffc@lists.launchpad.net Unsubscribe : https://launchpad.net/~ffc More help : https://help.launchpad.net/ListHelp