mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: pointData: unused files
This commit is contained in:
@ -1,53 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "pointData.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const pointData& wDist)
|
||||
{
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
return os
|
||||
<< static_cast<const pointEdgePoint&>(wDist)
|
||||
<< token::SPACE << wDist.s() << token::SPACE << wDist.v();
|
||||
}
|
||||
else
|
||||
{
|
||||
return os
|
||||
<< static_cast<const pointEdgePoint&>(wDist)
|
||||
<< wDist.s() << wDist.v();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, pointData& wDist)
|
||||
{
|
||||
return is >> static_cast<pointEdgePoint&>(wDist) >> wDist.s_ >> wDist.v_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,193 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::pointData
|
||||
|
||||
Description
|
||||
Variant of pointEdgePoint with some transported additional data.
|
||||
WIP - should be templated on data like wallDistData.
|
||||
Passive vector v_ is not a coordinate (so no enterDomain/leaveDomain
|
||||
transformation needed)
|
||||
|
||||
SourceFiles
|
||||
pointDataI.H
|
||||
pointData.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef pointData_H
|
||||
#define pointData_H
|
||||
|
||||
#include "pointEdgePoint.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
class pointData;
|
||||
|
||||
Istream& operator>>(Istream&, pointData&);
|
||||
Ostream& operator<<(Ostream&, const pointData&);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class pointData Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class pointData
|
||||
:
|
||||
public pointEdgePoint
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Additional information.
|
||||
scalar s_;
|
||||
|
||||
//- Additional information.
|
||||
vector v_;
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
inline pointData();
|
||||
|
||||
//- Construct from origin, distance
|
||||
inline pointData
|
||||
(
|
||||
const point& origin,
|
||||
const scalar distSqr,
|
||||
const scalar s,
|
||||
const vector& v
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
inline pointData(const pointData&);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
inline scalar s() const;
|
||||
|
||||
inline const vector& v() const;
|
||||
|
||||
|
||||
// Needed by meshWave
|
||||
|
||||
//- Apply rotation matrix to origin
|
||||
template<class TrackingData>
|
||||
inline void transform
|
||||
(
|
||||
const tensor& rotTensor,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of edge on point
|
||||
template<class TrackingData>
|
||||
inline bool updatePoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label pointi,
|
||||
const label edgeI,
|
||||
const pointData& edgeInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of different value on same point.
|
||||
// Merge new and old info.
|
||||
template<class TrackingData>
|
||||
inline bool updatePoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label pointi,
|
||||
const pointData& newPointInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of different value on same point.
|
||||
// No information about current position whatsoever.
|
||||
template<class TrackingData>
|
||||
inline bool updatePoint
|
||||
(
|
||||
const pointData& newPointInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of point on edge.
|
||||
template<class TrackingData>
|
||||
inline bool updateEdge
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label edgeI,
|
||||
const label pointi,
|
||||
const pointData& pointInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
// Member Operators
|
||||
|
||||
// Needed for List IO
|
||||
inline bool operator==(const pointData&) const;
|
||||
inline bool operator!=(const pointData&) const;
|
||||
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Ostream& operator<<(Ostream&, const pointData&);
|
||||
friend Istream& operator>>(Istream&, pointData&);
|
||||
};
|
||||
|
||||
|
||||
//- Data associated with pointData as contiguous as pointEdgePoint
|
||||
template<>
|
||||
inline bool contiguous<pointData>()
|
||||
{
|
||||
return contiguous<pointEdgePoint>();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "pointDataI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,237 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "polyMesh.H"
|
||||
#include "transform.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Null constructor
|
||||
inline Foam::pointData::pointData()
|
||||
:
|
||||
pointEdgePoint(),
|
||||
s_(GREAT),
|
||||
v_(point::max)
|
||||
{}
|
||||
|
||||
|
||||
// Construct from origin, distance
|
||||
inline Foam::pointData::pointData
|
||||
(
|
||||
const point& origin,
|
||||
const scalar distSqr,
|
||||
const scalar s,
|
||||
const vector& v
|
||||
)
|
||||
:
|
||||
pointEdgePoint(origin, distSqr),
|
||||
s_(s),
|
||||
v_(v)
|
||||
{}
|
||||
|
||||
|
||||
// Construct as copy
|
||||
inline Foam::pointData::pointData(const pointData& wpt)
|
||||
:
|
||||
pointEdgePoint(wpt),
|
||||
s_(wpt.s()),
|
||||
v_(wpt.v())
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::scalar Foam::pointData::s() const
|
||||
{
|
||||
return s_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::vector& Foam::pointData::v() const
|
||||
{
|
||||
return v_;
|
||||
}
|
||||
|
||||
|
||||
template<class TrackingData>
|
||||
inline void Foam::pointData::transform
|
||||
(
|
||||
const tensor& rotTensor,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
pointEdgePoint::transform(rotTensor, td);
|
||||
v_ = Foam::transform(rotTensor, v_);
|
||||
}
|
||||
|
||||
|
||||
// Update this with information from connected edge
|
||||
template<class TrackingData>
|
||||
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
|
||||
)
|
||||
)
|
||||
{
|
||||
s_ = edgeInfo.s_;
|
||||
v_ = edgeInfo.v_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Update this with new information on same point
|
||||
template<class TrackingData>
|
||||
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
|
||||
)
|
||||
)
|
||||
{
|
||||
s_ = newPointInfo.s_;
|
||||
v_ = newPointInfo.v_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Update this with new information on same point. No extra information.
|
||||
template<class TrackingData>
|
||||
inline bool Foam::pointData::updatePoint
|
||||
(
|
||||
const pointData& newPointInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
if (pointEdgePoint::updatePoint(newPointInfo, tol, td))
|
||||
{
|
||||
s_ = newPointInfo.s_;
|
||||
v_ = newPointInfo.v_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Update this with information from connected point
|
||||
template<class TrackingData>
|
||||
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
|
||||
)
|
||||
)
|
||||
{
|
||||
s_ = pointInfo.s_;
|
||||
v_ = pointInfo.v_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline bool Foam::pointData::operator==(const Foam::pointData& rhs)
|
||||
const
|
||||
{
|
||||
return
|
||||
pointEdgePoint::operator==(rhs)
|
||||
&& (s() == rhs.s())
|
||||
&& (v() == rhs.v());
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::pointData::operator!=(const Foam::pointData& rhs)
|
||||
const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user