diff --git a/src/meshTools/cellDist/wallPoint/wallPoint.H b/src/meshTools/cellDist/wallPoint/wallPoint.H index d9bd5af06affde9ad83f59fb401d456cdb4d9da3..95cfdd41417b118781165ed9b541f3f1ddc3b637 100644 --- a/src/meshTools/cellDist/wallPoint/wallPoint.H +++ b/src/meshTools/cellDist/wallPoint/wallPoint.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,7 @@ Istream& operator>>(Istream&, wallPoint&); /*---------------------------------------------------------------------------*\ - Class wallPoint Declaration + Class wallPoint Declaration \*---------------------------------------------------------------------------*/ class wallPoint @@ -71,6 +71,7 @@ class wallPoint //- normal distance (squared) from cellcenter to origin scalar distSqr_; + // Private Member Functions //- Evaluate distance to point. Update distSqr, origin from whomever @@ -94,17 +95,10 @@ public: inline wallPoint(); //- Construct from origin, distance - inline wallPoint - ( - const point& origin, - const scalar distSqr - ); + inline wallPoint(const point& origin, const scalar distSqr); //- Construct as copy - inline wallPoint - ( - const wallPoint& - ); + inline wallPoint(const wallPoint&); // Member Functions diff --git a/src/meshTools/cellDist/wallPoint/wallPointI.H b/src/meshTools/cellDist/wallPoint/wallPointI.H index 6c7428bf90b7fe80071b7529f3a16364cad3eee5..f013664849f8b956911ae590486d3d70e50c956b 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointI.H +++ b/src/meshTools/cellDist/wallPoint/wallPointI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,7 +82,6 @@ inline bool Foam::wallPoint::update // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Null constructor inline Foam::wallPoint::wallPoint() : origin_(point::max), @@ -90,17 +89,17 @@ inline Foam::wallPoint::wallPoint() {} -// Construct from origin, distance inline Foam::wallPoint::wallPoint(const point& origin, const scalar distSqr) : - origin_(origin), distSqr_(distSqr) + origin_(origin), + distSqr_(distSqr) {} -// Construct as copy inline Foam::wallPoint::wallPoint(const wallPoint& wpt) : - origin_(wpt.origin()), distSqr_(wpt.distSqr()) + origin_(wpt.origin()), + distSqr_(wpt.distSqr()) {} @@ -133,7 +132,7 @@ inline Foam::scalar& Foam::wallPoint::distSqr() template<class TrackingData> inline bool Foam::wallPoint::valid(TrackingData& td) const { - return origin_ != point::max; + return distSqr_ > -SMALL; }