dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #17304
Re: [Question #97807]: How to Obtain the Coordinates of the Vertices of a Mesh with P2 and Higher Elements
Anders Logg wrote:
> 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.
>
I can call it 'set' or 'dofs'. dof_set is redundant.
Garth
> --
> Anders
>
Follow ups
References