/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
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 "PatchEdgeFacePointData.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
inline Foam::PatchEdgeFacePointData::PatchEdgeFacePointData()
:
patchEdgeFacePoint(),
data_()
{}
template
inline Foam::PatchEdgeFacePointData::PatchEdgeFacePointData
(
const Type& data,
const point& origin,
const scalar distSqr
)
:
patchEdgeFacePoint(origin, distSqr),
data_(data)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
inline const Type& Foam::PatchEdgeFacePointData::data() const
{
return data_;
}
template
inline Type& Foam::PatchEdgeFacePointData::data()
{
return data_;
}
template
template
inline const Type& Foam::PatchEdgeFacePointData::data
(
TrackingData& td
) const
{
return data_;
}
template
template
inline void Foam::PatchEdgeFacePointData::transform
(
const polyMesh& mesh,
const primitivePatch& patch,
const tensor& rotTensor,
const scalar tol,
TrackingData& td
)
{
patchEdgeFacePoint::transform(mesh, patch, rotTensor, tol, td);
data_ = Foam::transform(rotTensor, data_);
}
template
template
inline bool Foam::PatchEdgeFacePointData::updateEdge
(
const polyMesh& mesh,
const primitivePatch& patch,
const label edgei,
const label facei,
const PatchEdgeFacePointData& faceInfo,
const scalar tol,
TrackingData& td
)
{
const bool result =
patchEdgeFacePoint::updateEdge
(
mesh,
patch,
edgei,
facei,
faceInfo,
tol,
td
);
if (result)
{
data_ = faceInfo.data_;
}
return result;
}
template
template
inline bool Foam::PatchEdgeFacePointData::updateEdge
(
const polyMesh& mesh,
const primitivePatch& patch,
const PatchEdgeFacePointData& edgeInfo,
const bool sameOrientation,
const scalar tol,
TrackingData& td
)
{
const bool result =
patchEdgeFacePoint::updateEdge
(
mesh,
patch,
edgeInfo,
sameOrientation,
tol,
td
);
if (result)
{
data_ = edgeInfo.data_;
}
return result;
}
template
template
inline bool Foam::PatchEdgeFacePointData::updateFace
(
const polyMesh& mesh,
const primitivePatch& patch,
const label facei,
const label edgei,
const PatchEdgeFacePointData& edgeInfo,
const scalar tol,
TrackingData& td
)
{
const bool result =
patchEdgeFacePoint::updateFace
(
mesh,
patch,
facei,
edgei,
edgeInfo,
tol,
td
);
if (result)
{
data_ = edgeInfo.data_;
}
return result;
}
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
template
Foam::Ostream& Foam::operator<<
(
Ostream& os,
const PatchEdgeFacePointData& wDist
)
{
return
os
<< static_cast(wDist)
<< token::SPACE
<< wDist.data_;
}
template
Foam::Istream& Foam::operator>>
(
Istream& is,
PatchEdgeFacePointData& wDist
)
{
return is >> static_cast(wDist) >> wDist.data_;
}
// ************************************************************************* //