From b5e8ecd924d1a08905a9b0db39e00ef785a9d31f Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 7 Jan 2011 03:13:56 +0000 Subject: [PATCH] Add a function previously forgotten to check in. git-svn-id: https://svn.dealii.org/trunk@23149 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/grid/tria_accessor.h | 8 ++++++++ .../include/deal.II/grid/tria_accessor.templates.h | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/deal.II/include/deal.II/grid/tria_accessor.h b/deal.II/include/deal.II/grid/tria_accessor.h index 8acf9194c3..cb3b0e8148 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.h +++ b/deal.II/include/deal.II/grid/tria_accessor.h @@ -1832,6 +1832,14 @@ class TriaAccessor<0, 1, spacedim> */ Point & vertex (const unsigned int i = 0) const; + /** + * Return the center of this object, + * which of course co-incides with the + * location of the vertex this object + * refers to. + */ + Point center () const; + /** * Pointer to the @p ith line * bounding this object. Will diff --git a/deal.II/include/deal.II/grid/tria_accessor.templates.h b/deal.II/include/deal.II/grid/tria_accessor.templates.h index 952b8ea0db..eb003b6933 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.templates.h +++ b/deal.II/include/deal.II/grid/tria_accessor.templates.h @@ -2143,6 +2143,17 @@ TriaAccessor<0, 1, spacedim>::vertex (const unsigned int i) const } + +template +inline +Point +TriaAccessor<0, 1, spacedim>::center () const +{ + return this->tria->vertices[global_vertex_index]; +} + + + template inline typename internal::Triangulation::Iterators<1,spacedim>::line_iterator -- 2.39.5