Loading...
Searching...
No Matches
Edge.h
// Copyright (C) 2006-2010 Anders Logg
//
// This file is part of DOLFIN.
//
// DOLFIN is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// DOLFIN is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
//
// Modified by Johan Hoffman 2006.
// Modified by Kristoffer Selim 2009.
//
// First added: 2006-06-02
// Last changed: 2011-02-08
#ifndef __EDGE_H
#define __EDGE_H
#include <memory>
#include "Mesh.h"
#include "MeshEntity.h"
#include "MeshEntityIteratorBase.h"
#include "MeshFunction.h"
namespace dolfin
{
class Edge : public MeshEntity
{
public:
Edge(const Mesh& mesh, std::size_t index) : MeshEntity(mesh, 1, index) {}
Edge(MeshEntity& entity) : MeshEntity(entity.mesh(), 1, entity.index()) {}
~Edge() {}
double length() const;
double dot(const Edge& edge) const;
};
typedef MeshEntityIteratorBase<Edge> EdgeIterator;
}
#endif
dolfin::Edge
An Edge is a MeshEntity of topological dimension 1.
Definition Edge.h:40
dolfin::Edge::~Edge
~Edge()
Destructor.
Definition Edge.h:58
dolfin::Edge::Edge
Edge(MeshEntity &entity)
Definition Edge.h:55
dolfin::Edge::length
double length() const
Definition Edge.cpp:30
dolfin::Edge::dot
double dot(const Edge &edge) const
Definition Edge.cpp:48
dolfin::Edge::Edge
Edge(const Mesh &mesh, std::size_t index)
Definition Edge.h:49
dolfin::MeshEntityIteratorBase
Base class for MeshEntityIterators.
Definition MeshEntityIteratorBase.h:37
dolfin::MeshEntity::mesh
const Mesh & mesh() const
Definition MeshEntity.h:99
dolfin::MeshEntity::MeshEntity
MeshEntity()
Default Constructor.
Definition MeshEntity.h:47
dolfin::MeshEntity::index
std::size_t index() const
Definition MeshEntity.h:113
dolfin::Mesh
Definition Mesh.h:84
dolfin
Definition adapt.h:30
dolfin::EdgeIterator
MeshEntityIteratorBase< Edge > EdgeIterator
An EdgeIterator is a MeshEntityIterator of topological dimension 1.
Definition Edge.h:95