replacement for boost::unordered_set<std::size_t> DofMap::dofs()?

Asked by Cian Wilson

Hi,

Just upgrading my code to the latest dolfin trunk after a few weeks. It looks like r7455.1.1 ("Some dofmap simplifications") removed boost::unordered_set<std::size_t> DofMap::dofs() const. Is there a new recommended way of getting something similar or should I just implement a loop over the cells and construct the set myself?

Many thanks,
Cian

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Garth Wells (garth-wells) said :
#1

On 6 March 2013 20:11, Cian Wilson <email address hidden> wrote:
> New question #223595 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/223595
>
> Hi,
>
> Just upgrading my code to the latest dolfin trunk after a few weeks. It looks like r7455.1.1 ("Some dofmap simplifications") removed boost::unordered_set<std::size_t> DofMap::dofs() const. Is there a new recommended way of getting something similar or should I just implement a loop over the cells and construct the set myself?
>

You can use

    GenericDofMap::ownership_range()

to get the range for the 'owned' dofs, and

    Generic::off_process_owner

to get the dofs that appear in the local dofmap but are not owned.

Using these two functions will be much more efficient than the old
GenericDofMap::dofs().

Garth

> Many thanks,
> Cian
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.

Can you help with this problem?

Provide an answer of your own, or ask Cian Wilson for more information if necessary.

To post a message you must log in.