Question #97807 on DOLFIN changed: https://answers.launchpad.net/dolfin/+question/97807
Anders Logg posted a new comment: On Fri, Jan 29, 2010 at 07:21:03PM -0000, Garth Wells wrote: > Question #97807 on DOLFIN changed: > https://answers.launchpad.net/dolfin/+question/97807 > > Garth Wells posted a new comment: > I've just added a new function to DofMap: > > /// Return the set of dof indices > Set<dolfin::uint> list(const Mesh& mesh, bool sort = false) const; > > It can be particularly useful for mixed elements, since a for 'shallow' > sub-function it will give the entries in the 'big' function vector > associated with a particular field, e.g. > > boost::shared_ptr<FunctionSpace> V_sub = V[1]; > Set<dolfin::uint> sub_dof_list = V_sub->dofmap().list(mesh, true); > for (dolfin::uint i = 0; i < sub_dof_list.size(); ++i ) > cout << "i: " << i << " " << sub_dof_list[i] << endl; list does not seem to be an optimal name for this function. Something like dof_set() or just dofs() would be better. -- Anders -- 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

