Loading...
Searching...
No Matches
dolfin::Edge Class Reference

An Edge is a MeshEntity of topological dimension 1. More...

`#include <Edge.h>`

Inheritance diagram for dolfin::Edge:
[legend]
Collaboration diagram for dolfin::Edge:
[legend]

## Public Member Functions

| Edge (const Mesh &mesh, std::size_t index)
| Edge (MeshEntity &entity)
| ~Edge ()
| Destructor.
double | length () const
double | dot (const Edge &edge) const
Public Member Functions inherited from dolfin::MeshEntity
| MeshEntity ()
| Default Constructor.
| MeshEntity (const Mesh &mesh, std::size_t dim, std::size_t index)
virtual | ~MeshEntity ()
| Destructor.
void | init (const Mesh &mesh, std::size_t dim, std::size_t index)
bool | operator== (const MeshEntity &e) const
bool | operator!= (const MeshEntity &e) const
const Mesh & | mesh () const
std::size_t | dim () const
std::size_t | index () const
std::int64_t | global_index () const
std::size_t | num_entities (std::size_t dim) const
std::size_t | num_global_entities (std::size_t dim) const
const unsigned int * | entities (std::size_t dim) const
std::size_t | mesh_id () const
bool | incident (const MeshEntity &entity) const
std::size_t | index (const MeshEntity &entity) const
Point | midpoint () const
bool | is_ghost () const
std::set< unsigned int > | sharing_processes () const
bool | is_shared () const
unsigned int | owner () const
std::string | str (bool verbose) const

## Additional Inherited Members

Protected Attributes inherited from dolfin::MeshEntity
Mesh const * | _mesh
std::size_t | _dim
std::size_t | _local_index

## Detailed Description

An Edge is a MeshEntity of topological dimension 1.

## Constructor & Destructor Documentation

## Edge() [1/2]

dolfin::Edge::Edge | ( | const Mesh & | mesh,
|  | std::size_t | index )

inline

Create edge on given mesh

Parameters

  mesh | (Mesh) The mesh.
  index | (std::size_t) Index of the edge.

## Edge() [2/2]

dolfin::Edge::Edge | ( | MeshEntity & | entity | ) |

inline

Create edge from mesh entity

Parameters

  entity | (MeshEntity) The mesh entity to create an edge from.

## Member Function Documentation

## dot()

double Edge::dot | ( | const Edge & | edge | ) | const

Compute dot product between edge and other edge

Parameters

  edge | (Edge) Another edge.

Returns
  double The dot product.

UnitSquare mesh(2, 2);
Edge edge1(mesh, 0);
Edge edge2(mesh, 1);
info("%g", edge1.dot(edge2));
dolfin::Edge::Edge
Edge(const Mesh &mesh, std::size_t index)
Definition Edge.h:49
dolfin::MeshEntity::mesh
const Mesh & mesh() const
Definition MeshEntity.h:99
dolfin::info
void info(std::string msg,...)
Print message.
Definition log.cpp:72

## length()

double Edge::length | ( |  | ) | const

Compute Euclidean length of edge

Returns
  double Euclidean length of edge.

UnitSquare mesh(2, 2);
Edge edge(mesh, 0);
info("%g", edge.length());

The documentation for this class was generated from the following files:

- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/mesh/Edge.h
- /build/dolfin-wwk1CC/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/mesh/Edge.cpp