Hi Tim,
On 4 Sep 2017, at 22:57, Dodwell, Timothy <T.Dodwell@exeter.ac.uk> wrote:
Hi all,
Sorry for simple questions again, what is the simplest way to access cell to vertex data from a mesh. I am going around in circles!
I am looking at the “pyop2” example of computing midpoints of cells
If you have a firedrake Function, or FunctionSpace, you can access the map from cells to function space nodes with the cell_node_map() method: So for cells to vertices you can do: V = FunctionSpace(mesh, "CG", 1) cell2vertex = V.cell_node_map() However, to step back a bit, what is it that you would like to achieve once you have this map? Needing to access the values in user code is often (though not always) an indicator that you've missed how to specify something symbolically (as a whole-mesh operation): most of the time doing finite elements in Firedrake you shouldn't need to know about this level of the implementation. Cheers, Lawrence