/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2015 OpenFOAM Foundation ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ #include "polyMesh.H" #include "transform.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::PointData::PointData() : pointEdgePoint() {} template inline Foam::PointData::PointData ( const point& origin, const scalar distSqr, const DataType& data ) : pointEdgePoint(origin, distSqr), data_(data) {} template inline Foam::PointData::PointData(const PointData& wpt) : pointEdgePoint(wpt), data_(wpt.data()) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template inline const DataType& Foam::PointData::data() const { return data_; } template template inline void Foam::PointData::transform ( const tensor& rotTensor, TrackingData& td ) { pointEdgePoint::transform(rotTensor, td); data_ = Foam::transform(rotTensor, data_); } template template inline bool Foam::PointData::updatePoint ( const polyMesh& mesh, const label pointI, const label edgeI, const PointData& edgeInfo, const scalar tol, TrackingData& td ) { if ( pointEdgePoint::updatePoint ( mesh, pointI, edgeI, edgeInfo, tol, td ) ) { data_ = edgeInfo.data_; return true; } return false; } template template inline bool Foam::PointData::updatePoint ( const polyMesh& mesh, const label pointI, const PointData& newPointInfo, const scalar tol, TrackingData& td ) { if ( pointEdgePoint::updatePoint ( mesh, pointI, newPointInfo, tol, td ) ) { data_ = newPointInfo.data_; return true; } return false; } template template inline bool Foam::PointData::updatePoint ( const PointData& newPointInfo, const scalar tol, TrackingData& td ) { if (pointEdgePoint::updatePoint(newPointInfo, tol, td)) { data_ = newPointInfo.data_; return true; } return false; } template template inline bool Foam::PointData::updateEdge ( const polyMesh& mesh, const label edgeI, const label pointI, const PointData& pointInfo, const scalar tol, TrackingData& td ) { if ( pointEdgePoint::updateEdge ( mesh, edgeI, pointI, pointInfo, tol, td ) ) { data_ = pointInfo.data_; return true; } return false; } // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // template inline bool Foam::PointData::operator== ( const Foam::PointData& rhs ) const { return pointEdgePoint::operator==(rhs) && (data() == rhs.data()); } template inline bool Foam::PointData::operator!= ( const Foam::PointData& rhs ) const { return !(*this == rhs); } // ************************************************************************* //