Lawrence and David--

The answer below was what I was missing.  I use the ipython tab-completion so the _plex member was missing from my view of mesh, which is where I looked first.  (Does that make sense?)

And the firedrake mailing list digest feature was not helping me communicate, so I turned it off.  (Sorry, I did not get Lawrence's answer before replying to David.)

Thanks!

Ed

Hi Ed,
On 26/07/18 09:24, Ham, David A wrote:
> The DM is the one you found. The rest of this is more a PETSc4py
> question than a Firedrake question and I have to say that I?m not the
> PETSc4py expert. However I note that the DM you get from the
> FunctionSpace has a viewFromOptions method. I think that?s what you?re
> after.
As well as what David says here, you can also get at the DMPlex object.
A little explanation.
The DM attached to every FunctionSpace (W.dm in your code) is a
DMShell that describes the dof layout (as well as having a global
vector, it also has a default section (W.dm.getDefaultSection()).
It also has the relevant callback hooks attached to it to do
fieldsplitting, as well as coarsen/refine (if you built with a
MeshHierarchy).
As well as this DMShell, there is also a DMPlex hanging around, that
describes the mesh topology.  But this is attached to the mesh object
you made, rather than the FunctionSpace.  You can get at it via
mesh._plex:
So:
from firedrake import *
mesh = UnitSquareMesh(...)
V = FunctionSpace(mesh, "Lagrange", 2)
V.dm.view() # DMShell describing dof layout
topology = mesh._plex
# or
topology = V.ufl_domain()._plex
topology.view() # DMPlex describing topology
Thanks,
Lawrence

--
Ed Bueler
Dept of Math and Stat and Geophysical Institute
University of Alaska Fairbanks
Fairbanks, AK 99775-6660
301C Chapman