determine coordinates of edges in mesh

Asked by Martin Hess

Hello,

I am using edge-based Nedelec elements in a 3D mesh and I try to retrieve the relation between dofs
in the assembled matrix and the coordinates of the respective edges.

I can use EdgeIterator to move through all edges, however the edge.h does not provide a method to
access the coordinates of start- and endvertex.

How can I access the coordinates?

Best,
Martin Hess

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
Anders Logg
Solved:
Last query:
Last reply:
Revision history for this message
Best Anders Logg (logg) said :
#1

On Thu, Feb 14, 2013 at 12:45:58PM -0000, Martin Hess wrote:
> New question #221872 on FEniCS Project:
> https://answers.launchpad.net/fenics/+question/221872
> I am using edge-based Nedelec elements in a 3D mesh and I try to retrieve the relation between dofs
> in the assembled matrix and the coordinates of the respective edges.
> I can use EdgeIterator to move through all edges, however the edge.h does not provide a method to
> access the coordinates of start- and endvertex.
> How can I access the coordinates?

Use edge.entities(0) to get the indices of the two vertices:

v0 = Vertex(mesh, edge.entities(0)[0])
v1 = Vertex(mesh, edge.entities(0)[1])

--
Anders

Revision history for this message
Martin Hess (hessm) said :
#2

Thanks Anders Logg, that solved my question.