Loading...
Searching...
No Matches
Face.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 Garth N. Wells, 2011
//
// First added: 2006-06-02
// Last changed: 2011-02-22
#ifndef __FACE_H
#define __FACE_H
#include <memory>
#include "MeshEntity.h"
#include "MeshEntityIteratorBase.h"
#include "MeshFunction.h"
namespace dolfin
{
class Mesh;
class Point;
class Face : public MeshEntity
{
public:
Face(const Mesh& mesh, std::size_t index) : MeshEntity(mesh, 2, index) {}
~Face() {}
double area() const;
double normal(std::size_t i) const;
Point normal() const;
};
typedef MeshEntityIteratorBase<Face> FaceIterator;
}
#endif
dolfin::Face::normal
Point normal() const
Compute normal to the face.
Definition Face.cpp:97
dolfin::Face::Face
Face(const Mesh &mesh, std::size_t index)
Constructor.
Definition Face.h:45
dolfin::Face::area
double area() const
Calculate the area of the face (triangle).
Definition Face.cpp:30
dolfin::Face::~Face
~Face()
Destructor.
Definition Face.h:48
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::Point
Definition Point.h:41
dolfin
Definition adapt.h:30
dolfin::FaceIterator
MeshEntityIteratorBase< Face > FaceIterator
A FaceIterator is a MeshEntityIterator of topological dimension 2.
Definition Face.h:62