From: wolf Date: Tue, 16 Feb 1999 15:16:36 +0000 (+0000) Subject: Revert Guido's change to include math.h. Never include such files into .h files. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ca43744d79e0328029d425e04c442c386fa98db;p=dealii-svn.git Revert Guido's change to include math.h. Never include such files into .h files. git-svn-id: https://svn.dealii.org/trunk@816 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/tria_boundary.h b/deal.II/deal.II/include/grid/tria_boundary.h index 834991ce8c..78a3696427 100644 --- a/deal.II/deal.II/include/grid/tria_boundary.h +++ b/deal.II/deal.II/include/grid/tria_boundary.h @@ -6,8 +6,8 @@ /*---------------------------- boundary-function.h ---------------------------*/ #include +#include #include -#include @@ -87,7 +87,7 @@ struct BoundaryHelper<3> { * @author Wolfgang Bangerth, 1998 */ template -class Boundary { +class Boundary : public Subscriptor { public: /** * Typedef an array of the needed number @@ -102,7 +102,14 @@ class Boundary { // typedef const Point* PointArray[((dim==1) ? // 1 : // GeometryInfo::vertices_per_face)]; - + + /** + * Destructor. Does nothing here, but + * needs to be declared to make it + * virtual. + */ + virtual ~Boundary (); + /** * This function calculates the position * of the new vertex. @@ -131,13 +138,7 @@ class StraightBoundary : public Boundary { * This function calculates the position * of the new vertex. */ - virtual Point in_between (const PointArray &neighbors) const { - Point p; - for (int i=0; i<(1<<(dim-1)); ++i) - p += *neighbors[i]; - p /= (1<<(dim-1))*1.0; - return p; - }; + virtual Point in_between (const PointArray &neighbors) const; }; @@ -169,16 +170,7 @@ class HyperBallBoundary : public StraightBoundary { * This function calculates the position * of the new vertex. */ - virtual Point in_between (const PointArray &neighbors) const { - Point middle = StraightBoundary::in_between(neighbors); - - middle -= center; - // project to boundary - middle *= radius / sqrt(middle.square()); - - middle += center; - return middle; - }; + virtual Point in_between (const PointArray &neighbors) const; private: