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

Change dof_map

–1 vote

Hi folks,

Just a quick question about dof map. Is there any way to change the dof map associated with a simple rectangle mesh?

Any help is deeply appreciated.

Thanks,
Mo

asked Sep 25, 2013 by Mo FEniCS Novice (200 points)

1 Answer

+1 vote

It's not clear what you want, but you can create your own dofmap. It just needs implement the dolfin::GenericDofMap interface.

answered Sep 25, 2013 by Garth N. Wells FEniCS Expert (35,930 points)

Hi Garth,

Thank you for your comment. Creating my own dofmap is exactly what I need. Is there any example about creating my own dofmap via dolfin::GenericDofMap interface?

Thanks,
Mo

You just need to create your own C++ sub-class of dolfin::GenericDofMap that implements the pure virtual function in dolfin::GenericDofMap (see dolfin/fem/GenericDofMap.h).

Thank you so much Garth.

Mo

...