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

How to make sense of dofmap printout in c++

0 votes

Using the .str(true) method of the DofMap class I am able to print out the map. This appears to provide a local to global mapping of the dofs, but why are there global indices of 18169152 and 9374992? and why are there two local indices mapping to the same global indices with in the same cell?

Process 0: Number of global vertices: 9
Process 0: Number of global cells: 8
Process 0: Number of global vertices: 6
Process 0: Number of global cells: 4

Local cell index, cell dofmap dimension: 0, 3
Local, global dof indices: 0, 2
Local, global dof indices: 1, 3
Local, global dof indices: 2, 4
Local cell index, cell dofmap dimension: 3, 3
Local, global dof indices: 0, 1
Local, global dof indices: 1, 0
Local, global dof indices: 2, 5
Local cell index, cell dofmap dimension: 6, 3
Local, global dof indices: 0, 1
Local, global dof indices: 1, 1
Local, global dof indices: 2, 18169152
Local cell index, cell dofmap dimension: 9, 3
Local, global dof indices: 0, 0
Local, global dof indices: 1, 0
Local, global dof indices: 2, 0


Local cell index, cell dofmap dimension: 0, 3
Local, global dof indices: 0, 1
Local, global dof indices: 1, 0
Local, global dof indices: 2, 2
Local cell index, cell dofmap dimension: 3, 3
Local, global dof indices: 0, 3
Local, global dof indices: 1, 5
Local, global dof indices: 2, 4
Local cell index, cell dofmap dimension: 6, 3
Local, global dof indices: 0, 9374992
Local, global dof indices: 1, 0
Local, global dof indices: 2, 0
Local cell index, cell dofmap dimension: 9, 3
Local, global dof indices: 0, 0
Local, global dof indices: 1, 0
Local, global dof indices: 2, 0

Thank You,

Ben

asked Sep 3, 2015 by brk888 FEniCS Novice (990 points)

Which version of dolfin are you using?

I am using version 1.6

1 Answer

0 votes

This is a bug in DofMap.cpp line 518, should be:

++i

not

i += _cell_dimension.

I'll fix it. You can always use dofmap.cell_dofs(i) to get the same information.

answered Sep 4, 2015 by chris_richardson FEniCS Expert (31,740 points)

Thank You. I saw that the bug was fixed, but I installed the latest dev build through the ubuntu ppa and I'm getting the same behaviour.

Download dev version from bitbucket to get latest fixes, or wait for a release. you can still use dofmap::cell_dofs to get same information

...