1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
27 #include "transform.H"
29 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32 inline Foam::pointData::pointData()
40 // Construct from origin, distance
41 inline Foam::pointData::pointData
49 pointEdgePoint(origin, distSqr),
56 inline Foam::pointData::pointData(const pointData& wpt)
64 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
66 inline Foam::scalar Foam::pointData::s() const
72 inline const Foam::vector& Foam::pointData::v() const
78 template <class TrackingData>
79 inline void Foam::pointData::transform
81 const tensor& rotTensor,
85 pointEdgePoint::transform(rotTensor, td);
86 v_ = Foam::transform(rotTensor, v_);
90 // Update this with information from connected edge
91 template <class TrackingData>
92 inline bool Foam::pointData::updatePoint
97 const pointData& edgeInfo,
104 pointEdgePoint::updatePoint
125 // Update this with new information on same point
126 template <class TrackingData>
127 inline bool Foam::pointData::updatePoint
129 const polyMesh& mesh,
131 const pointData& newPointInfo,
138 pointEdgePoint::updatePoint
148 s_ = newPointInfo.s_;
149 v_ = newPointInfo.v_;
159 // Update this with new information on same point. No extra information.
160 template <class TrackingData>
161 inline bool Foam::pointData::updatePoint
163 const pointData& newPointInfo,
168 if (pointEdgePoint::updatePoint(newPointInfo, tol, td))
170 s_ = newPointInfo.s_;
171 v_ = newPointInfo.v_;
181 // Update this with information from connected point
182 template <class TrackingData>
183 inline bool Foam::pointData::updateEdge
185 const polyMesh& mesh,
188 const pointData& pointInfo,
196 pointEdgePoint::updateEdge
218 // ************************************************************************* //