class dolfin.cpp.mesh.Edge(*args)

Bases: dolfin.cpp.mesh.MeshEntity

An Edge is a MeshEntity of topological dimension 1.

Create edge from mesh entity

Parameters:& entity (MeshEntity) – (MeshEntity ) The mesh entity to create an edge from.

Compute dot product between edge and other edge

UnitSquare mesh(2, 2);
Edge edge1(mesh, 0);
Edge edge2(mesh, 1);
info("%g", edge1.dot(edge2));
Parameters:Edge & edge (const) – (Edge ) Another edge.
Return type:double
Returns:double The dot product.

Compute Euclidean length of edge

UnitSquare mesh(2, 2);
Edge edge(mesh, 0);
info("%g", edge.length());
Return type:double
Returns:double Euclidean length of edge.

The membership flag