1
// Copyright (C) 2006-2007 Anders Logg.
2
// Licensed under the GNU LGPL Version 2.1.
4
// Modified by Johan Hoffman 2006.
6
// First added: 2006-01-01
7
// Last changed: 2007-04-16
9
#include <dolfin/Cell.h>
10
#include <dolfin/Vertex.h>
12
using namespace dolfin;
14
//-----------------------------------------------------------------------------
15
Point Cell::midpoint()
17
uint num_vertices = 0;
23
for (VertexIterator v(*this); !v.end(); ++v)
32
x /= real(num_vertices);
33
y /= real(num_vertices);
34
z /= real(num_vertices);
39
//-----------------------------------------------------------------------------