DOLFIN
DOLFIN C++ interface
Toggle main menu visibility
Loading...
Searching...
No Matches
dolfin
mesh
Facet.h
1
// Copyright (C) 2006-2015 Anders Logg
2
//
3
// This file is part of DOLFIN.
4
//
5
// DOLFIN is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU Lesser General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// DOLFIN is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU Lesser General Public License for more details.
14
//
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
17
//
18
// Modified by Garth N. Wells, 2009-2011.
19
// Modified by Martin Alnaes, 2015
20
21
#ifndef __FACET_H
22
#define __FACET_H
23
24
#include <memory>
25
26
#include <utility>
27
#include <vector>
28
#include "Cell.h"
29
#include "Mesh.h"
30
#include "MeshEntity.h"
31
#include "MeshEntityIteratorBase.h"
32
#include "MeshFunction.h"
33
34
namespace
dolfin
35
{
36
38
39
class
Facet
:
public
MeshEntity
40
{
41
public
:
42
44
Facet
(
const
Mesh
&
mesh
, std::size_t
index
)
45
:
MeshEntity
(
mesh
,
mesh
.topology().
dim
() - 1,
index
) {}
46
48
~Facet
() {}
49
51
double
normal
(std::size_t i)
const
;
52
54
Point
normal
()
const
;
55
62
double
squared_distance
(
const
Point
& point)
const
;
63
70
double
distance
(
const
Point
& point)
const
71
{
72
return
sqrt(
squared_distance
(point));
73
}
74
79
bool
exterior
()
const
;
80
81
};
82
85
typedef
MeshEntityIteratorBase<Facet>
FacetIterator
;
86
87
}
88
89
#endif
dolfin::Facet::~Facet
~Facet()
Destructor.
Definition
Facet.h:48
dolfin::Facet::squared_distance
double squared_distance(const Point &point) const
Definition
Facet.cpp:63
dolfin::Facet::normal
Point normal() const
Compute normal to the facet.
Definition
Facet.cpp:47
dolfin::Facet::Facet
Facet(const Mesh &mesh, std::size_t index)
Constructor.
Definition
Facet.h:44
dolfin::Facet::exterior
bool exterior() const
Definition
Facet.cpp:96
dolfin::Facet::distance
double distance(const Point &point) const
Definition
Facet.h:70
dolfin::MeshEntityIteratorBase
Base class for MeshEntityIterators.
Definition
MeshEntityIteratorBase.h:37
dolfin::MeshEntity::mesh
const Mesh & mesh() const
Definition
MeshEntity.h:99
dolfin::MeshEntity::dim
std::size_t dim() const
Definition
MeshEntity.h:106
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:83
dolfin::Point
Definition
Point.h:41
dolfin
Definition
adapt.h:30
dolfin::FacetIterator
MeshEntityIteratorBase< Facet > FacetIterator
Definition
Facet.h:85
Generated by
1.17.0