dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #17302
Re: [Question #97807]: How to Obtain the Coordinates of the Vertices of a Mesh with P2 and Higher Elements
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;
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.