This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Recent Change in numbering convention for DOFs

0 votes

Dear All

Due to an upgrade of my dolfin+fenics installation last week to 1.2.0+
the numbering of degrees of freedom for a one dimensional finite element
vector space has changed in such a way, that the node at the end of
the interval has index 0 instead of index N-1 where N is the total number of DOFs.
I confirmed this, by changing my code in two places when
combining a spherical and cylindrical region and I obtained the same results as before
the upgrade.

Any explanations are welcome!

regards

Moritz

asked Oct 29, 2013 by moritzbraun FEniCS User (1,390 points)

1 Answer

+4 votes
 
Best answer

See, e.g., previous question, or search for dof numbering. If you prefer the old numbering and you're not running in parallel, then you can set parameters['reorder_dofs_serial'] = False.

answered Oct 29, 2013 by mikael-mortensen FEniCS Expert (29,340 points)
selected Nov 1, 2013 by Jan Blechta

Dear Mikael

Thanks a lot for your answer!

I would have however expected, that this change is
not done by default or only for the next version
I was very shocked, when my code produced nonsense and
it took me a few hours of debugging to find out what was going on!

regards

Moritz

Hi,
There has actually been much discussion on the dof numbering. If you follow Fenics on Google+, then a while ago there was this post. The dof numbering is important for the speed of Krylov solvers and developers have always been very clear that you cannot write applications that make any assumptions on the ordering of dofs. You have to go through the dofmaps.

...