meshTools/algorithms/PatchEdgeFaceWave: Added point object with data
This commit is contained in:
@ -31,7 +31,7 @@ Description
|
|||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "PatchEdgeFaceWave.H"
|
#include "PatchEdgeFaceWave.H"
|
||||||
#include "patchEdgeFaceInfo.H"
|
#include "patchEdgeFacePoint.H"
|
||||||
#include "patchPatchDist.H"
|
#include "patchPatchDist.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
@ -55,12 +55,12 @@ int main(int argc, char *argv[])
|
|||||||
// 1. Walk from a single edge
|
// 1. Walk from a single edge
|
||||||
{
|
{
|
||||||
// Data on all edges and faces
|
// Data on all edges and faces
|
||||||
List<patchEdgeFaceInfo> allEdgeInfo(patch.nEdges());
|
List<patchEdgeFacePoint> allEdgeInfo(patch.nEdges());
|
||||||
List<patchEdgeFaceInfo> allFaceInfo(patch.size());
|
List<patchEdgeFacePoint> allFaceInfo(patch.size());
|
||||||
|
|
||||||
// Initial seed
|
// Initial seed
|
||||||
DynamicList<label> initialEdges;
|
DynamicList<label> initialEdges;
|
||||||
DynamicList<patchEdgeFaceInfo> initialEdgesInfo;
|
DynamicList<patchEdgeFacePoint> initialEdgesInfo;
|
||||||
|
|
||||||
|
|
||||||
// Just set an edge on the master
|
// Just set an edge on the master
|
||||||
@ -73,7 +73,7 @@ int main(int argc, char *argv[])
|
|||||||
const edge& e = patch.edges()[edgeI];
|
const edge& e = patch.edges()[edgeI];
|
||||||
initialEdgesInfo.append
|
initialEdgesInfo.append
|
||||||
(
|
(
|
||||||
patchEdgeFaceInfo
|
patchEdgeFacePoint
|
||||||
(
|
(
|
||||||
e.centre(patch.localPoints()),
|
e.centre(patch.localPoints()),
|
||||||
0.0
|
0.0
|
||||||
@ -83,11 +83,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// Walk
|
// Walk
|
||||||
PatchEdgeFaceWave
|
PatchEdgeFaceWave<primitivePatch, patchEdgeFacePoint> calc
|
||||||
<
|
|
||||||
primitivePatch,
|
|
||||||
patchEdgeFaceInfo
|
|
||||||
> calc
|
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
patch,
|
patch,
|
||||||
|
|||||||
@ -71,21 +71,10 @@ meshSearch/meshSearchMeshObject.C
|
|||||||
|
|
||||||
meshTools/meshTools.C
|
meshTools/meshTools.C
|
||||||
|
|
||||||
algorithms = algorithms
|
algorithms/FaceCellWave/FaceCellWaveName.C
|
||||||
|
algorithms/PointEdgeWave/PointEdgeWaveName.C
|
||||||
pWave = $(algorithms)/PointEdgeWave
|
algorithms/PatchEdgeFaceWave/PatchEdgeFaceWaveName.C
|
||||||
$(pWave)/PointEdgeWaveName.C
|
algorithms/PatchEdgeFaceWave/patchPatchDist.C
|
||||||
$(pWave)/pointEdgePoint.C
|
|
||||||
|
|
||||||
patchWave = $(algorithms)/PatchEdgeFaceWave
|
|
||||||
$(patchWave)/PatchEdgeFaceWaveName.C
|
|
||||||
$(patchWave)/patchEdgeFaceInfo.C
|
|
||||||
$(patchWave)/patchPatchDist.C
|
|
||||||
$(patchWave)/patchEdgeFaceRegion.C
|
|
||||||
$(patchWave)/patchEdgeFaceRegions.C
|
|
||||||
|
|
||||||
meshWave = $(algorithms)/FaceCellWave
|
|
||||||
$(meshWave)/FaceCellWaveName.C
|
|
||||||
|
|
||||||
regionSplit/regionSplit.C
|
regionSplit/regionSplit.C
|
||||||
regionSplit/localPointRegion.C
|
regionSplit/localPointRegion.C
|
||||||
|
|||||||
@ -0,0 +1,191 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::PatchEdgeFacePointData
|
||||||
|
|
||||||
|
Description
|
||||||
|
Transport of nearest point location, plus data, for use in
|
||||||
|
PatchEdgeFaceWave
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
PatchEdgeFacePointDataI.H
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef PatchEdgeFacePointData_H
|
||||||
|
#define PatchEdgeFacePointData_H
|
||||||
|
|
||||||
|
#include "patchEdgeFacePoint.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// Forward declaration of classes
|
||||||
|
class polyPatch;
|
||||||
|
class polyMesh;
|
||||||
|
|
||||||
|
// Forward declaration of friend functions and operators
|
||||||
|
template<class Type>
|
||||||
|
class PatchEdgeFacePointData;
|
||||||
|
template<class Type>
|
||||||
|
Istream& operator>>(Istream&, PatchEdgeFacePointData<Type>&);
|
||||||
|
template<class Type>
|
||||||
|
Ostream& operator<<(Ostream&, const PatchEdgeFacePointData<Type>&);
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class PatchEdgeFacePointData Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class PatchEdgeFacePointData
|
||||||
|
:
|
||||||
|
public patchEdgeFacePoint
|
||||||
|
{
|
||||||
|
// Private Data
|
||||||
|
|
||||||
|
//- Data at nearest wall centre
|
||||||
|
Type data_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null
|
||||||
|
inline PatchEdgeFacePointData();
|
||||||
|
|
||||||
|
//- Construct from data, origin, distance
|
||||||
|
inline PatchEdgeFacePointData(const Type&, const point&, const scalar);
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
inline const Type& data() const;
|
||||||
|
|
||||||
|
inline Type& data();
|
||||||
|
|
||||||
|
template<class TrackingData>
|
||||||
|
inline const Type& data(TrackingData& td) const;
|
||||||
|
|
||||||
|
|
||||||
|
// Needed by meshWave
|
||||||
|
|
||||||
|
//- Apply rotation matrix
|
||||||
|
template<class TrackingData>
|
||||||
|
inline void transform
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const primitivePatch& patch,
|
||||||
|
const tensor& rotTensor,
|
||||||
|
const scalar tol,
|
||||||
|
TrackingData& td
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Influence of face on edge
|
||||||
|
template<class TrackingData>
|
||||||
|
inline bool updateEdge
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const primitivePatch& patch,
|
||||||
|
const label edgei,
|
||||||
|
const label facei,
|
||||||
|
const PatchEdgeFacePointData<Type>& faceInfo,
|
||||||
|
const scalar tol,
|
||||||
|
TrackingData& td
|
||||||
|
);
|
||||||
|
|
||||||
|
//- New information for edge (from e.g. coupled edge)
|
||||||
|
template<class TrackingData>
|
||||||
|
inline bool updateEdge
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const primitivePatch& patch,
|
||||||
|
const PatchEdgeFacePointData<Type>& edgeInfo,
|
||||||
|
const bool sameOrientation,
|
||||||
|
const scalar tol,
|
||||||
|
TrackingData& td
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Influence of edge on face
|
||||||
|
template<class TrackingData>
|
||||||
|
inline bool updateFace
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const primitivePatch& patch,
|
||||||
|
const label facei,
|
||||||
|
const label edgei,
|
||||||
|
const PatchEdgeFacePointData<Type>& edgeInfo,
|
||||||
|
const scalar tol,
|
||||||
|
TrackingData& td
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// IOstream Operators
|
||||||
|
|
||||||
|
friend Ostream& operator<< <Type>
|
||||||
|
(
|
||||||
|
Ostream&,
|
||||||
|
const PatchEdgeFacePointData<Type>&
|
||||||
|
);
|
||||||
|
friend Istream& operator>> <Type>
|
||||||
|
(
|
||||||
|
Istream&,
|
||||||
|
PatchEdgeFacePointData<Type>&
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#define DefineContiguousPatchEdgeFacePointDataType(Type, nullArg) \
|
||||||
|
template<> \
|
||||||
|
inline bool contiguous<PatchEdgeFacePointData<Type>>() \
|
||||||
|
{ \
|
||||||
|
return true; \
|
||||||
|
}
|
||||||
|
|
||||||
|
DefineContiguousPatchEdgeFacePointDataType(bool, );
|
||||||
|
DefineContiguousPatchEdgeFacePointDataType(label, );
|
||||||
|
FOR_ALL_FIELD_TYPES(DefineContiguousPatchEdgeFacePointDataType);
|
||||||
|
|
||||||
|
#undef DefineContiguousPatchEdgeFacePointDataType
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "PatchEdgeFacePointDataI.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,223 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "PatchEdgeFacePointData.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline Foam::PatchEdgeFacePointData<Type>::PatchEdgeFacePointData()
|
||||||
|
:
|
||||||
|
patchEdgeFacePoint(),
|
||||||
|
data_()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline Foam::PatchEdgeFacePointData<Type>::PatchEdgeFacePointData
|
||||||
|
(
|
||||||
|
const Type& data,
|
||||||
|
const point& origin,
|
||||||
|
const scalar distSqr
|
||||||
|
)
|
||||||
|
:
|
||||||
|
patchEdgeFacePoint(origin, distSqr),
|
||||||
|
data_(data)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline const Type& Foam::PatchEdgeFacePointData<Type>::data() const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline Type& Foam::PatchEdgeFacePointData<Type>::data()
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
template<class TrackingData>
|
||||||
|
inline const Type& Foam::PatchEdgeFacePointData<Type>::data
|
||||||
|
(
|
||||||
|
TrackingData& td
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
template<class TrackingData>
|
||||||
|
inline void Foam::PatchEdgeFacePointData<Type>::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<class Type>
|
||||||
|
template<class TrackingData>
|
||||||
|
inline bool Foam::PatchEdgeFacePointData<Type>::updateEdge
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const primitivePatch& patch,
|
||||||
|
const label edgei,
|
||||||
|
const label facei,
|
||||||
|
const PatchEdgeFacePointData<Type>& 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<class Type>
|
||||||
|
template<class TrackingData>
|
||||||
|
inline bool Foam::PatchEdgeFacePointData<Type>::updateEdge
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const primitivePatch& patch,
|
||||||
|
const PatchEdgeFacePointData<Type>& 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<class Type>
|
||||||
|
template<class TrackingData>
|
||||||
|
inline bool Foam::PatchEdgeFacePointData<Type>::updateFace
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const primitivePatch& patch,
|
||||||
|
const label facei,
|
||||||
|
const label edgei,
|
||||||
|
const PatchEdgeFacePointData<Type>& edgeInfo,
|
||||||
|
const scalar tol,
|
||||||
|
TrackingData& td
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const bool result =
|
||||||
|
patchEdgeFacePoint::updateFace
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
patch,
|
||||||
|
edgei,
|
||||||
|
facei,
|
||||||
|
edgeInfo,
|
||||||
|
tol,
|
||||||
|
td
|
||||||
|
);
|
||||||
|
|
||||||
|
if (result)
|
||||||
|
{
|
||||||
|
data_ = edgeInfo.data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const PatchEdgeFacePointData<Type>& wDist
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
os
|
||||||
|
<< static_cast<const patchEdgeFacePoint&>(wDist)
|
||||||
|
<< token::SPACE
|
||||||
|
<< wDist.data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::Istream& Foam::operator>>
|
||||||
|
(
|
||||||
|
Istream& is,
|
||||||
|
PatchEdgeFacePointData<Type>& wDist
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return is >> static_cast<patchEdgeFacePoint&>(wDist) >> wDist.data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,7 +51,7 @@ defaultTrackingData_ = -1;
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
// Update info for edgeI, at position pt, with information from
|
// Update info for edgei, at position pt, with information from
|
||||||
// neighbouring face.
|
// neighbouring face.
|
||||||
// Updates:
|
// Updates:
|
||||||
// - changedEdge_, changedEdges_,
|
// - changedEdge_, changedEdges_,
|
||||||
@ -65,7 +65,7 @@ template
|
|||||||
bool Foam::PatchEdgeFaceWave<PrimitivePatchType, Type, TrackingData>::
|
bool Foam::PatchEdgeFaceWave<PrimitivePatchType, Type, TrackingData>::
|
||||||
updateEdge
|
updateEdge
|
||||||
(
|
(
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const label neighbourFacei,
|
const label neighbourFacei,
|
||||||
const Type& neighbourInfo,
|
const Type& neighbourInfo,
|
||||||
Type& edgeInfo
|
Type& edgeInfo
|
||||||
@ -80,7 +80,7 @@ updateEdge
|
|||||||
(
|
(
|
||||||
mesh_,
|
mesh_,
|
||||||
patch_,
|
patch_,
|
||||||
edgeI,
|
edgei,
|
||||||
neighbourFacei,
|
neighbourFacei,
|
||||||
neighbourInfo,
|
neighbourInfo,
|
||||||
propagationTol_,
|
propagationTol_,
|
||||||
@ -89,10 +89,10 @@ updateEdge
|
|||||||
|
|
||||||
if (propagate)
|
if (propagate)
|
||||||
{
|
{
|
||||||
if (!changedEdge_[edgeI])
|
if (!changedEdge_[edgei])
|
||||||
{
|
{
|
||||||
changedEdge_[edgeI] = true;
|
changedEdge_[edgei] = true;
|
||||||
changedEdges_.append(edgeI);
|
changedEdges_.append(edgei);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,25 +455,25 @@ setEdgeInfo
|
|||||||
{
|
{
|
||||||
forAll(changedEdges, changedEdgeI)
|
forAll(changedEdges, changedEdgeI)
|
||||||
{
|
{
|
||||||
label edgeI = changedEdges[changedEdgeI];
|
label edgei = changedEdges[changedEdgeI];
|
||||||
|
|
||||||
bool wasValid = allEdgeInfo_[edgeI].valid(td_);
|
bool wasValid = allEdgeInfo_[edgei].valid(td_);
|
||||||
|
|
||||||
// Copy info for edgeI
|
// Copy info for edgei
|
||||||
allEdgeInfo_[edgeI] = changedEdgesInfo[changedEdgeI];
|
allEdgeInfo_[edgei] = changedEdgesInfo[changedEdgeI];
|
||||||
|
|
||||||
// Maintain count of unset edges
|
// Maintain count of unset edges
|
||||||
if (!wasValid && allEdgeInfo_[edgeI].valid(td_))
|
if (!wasValid && allEdgeInfo_[edgei].valid(td_))
|
||||||
{
|
{
|
||||||
--nUnvisitedEdges_;
|
--nUnvisitedEdges_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark edgeI as changed, both on list and on edge itself.
|
// Mark edgei as changed, both on list and on edge itself.
|
||||||
|
|
||||||
if (!changedEdge_[edgeI])
|
if (!changedEdge_[edgei])
|
||||||
{
|
{
|
||||||
changedEdge_[edgeI] = true;
|
changedEdge_[edgei] = true;
|
||||||
changedEdges_.append(edgeI);
|
changedEdges_.append(edgei);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -512,15 +512,15 @@ faceToEdge()
|
|||||||
|
|
||||||
forAll(fEdges, fEdgeI)
|
forAll(fEdges, fEdgeI)
|
||||||
{
|
{
|
||||||
label edgeI = fEdges[fEdgeI];
|
label edgei = fEdges[fEdgeI];
|
||||||
|
|
||||||
Type& currentWallInfo = allEdgeInfo_[edgeI];
|
Type& currentWallInfo = allEdgeInfo_[edgei];
|
||||||
|
|
||||||
if (!currentWallInfo.equal(neighbourWallInfo, td_))
|
if (!currentWallInfo.equal(neighbourWallInfo, td_))
|
||||||
{
|
{
|
||||||
updateEdge
|
updateEdge
|
||||||
(
|
(
|
||||||
edgeI,
|
edgei,
|
||||||
facei,
|
facei,
|
||||||
neighbourWallInfo,
|
neighbourWallInfo,
|
||||||
currentWallInfo
|
currentWallInfo
|
||||||
@ -559,22 +559,22 @@ edgeToFace()
|
|||||||
|
|
||||||
forAll(changedEdges_, changedEdgeI)
|
forAll(changedEdges_, changedEdgeI)
|
||||||
{
|
{
|
||||||
label edgeI = changedEdges_[changedEdgeI];
|
label edgei = changedEdges_[changedEdgeI];
|
||||||
|
|
||||||
if (!changedEdge_[edgeI])
|
if (!changedEdge_[edgei])
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "edge " << edgeI
|
<< "edge " << edgei
|
||||||
<< " not marked as having been changed" << nl
|
<< " not marked as having been changed" << nl
|
||||||
<< "This might be caused by multiple occurrences of the same"
|
<< "This might be caused by multiple occurrences of the same"
|
||||||
<< " seed edge." << abort(FatalError);
|
<< " seed edge." << abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Type& neighbourWallInfo = allEdgeInfo_[edgeI];
|
const Type& neighbourWallInfo = allEdgeInfo_[edgei];
|
||||||
|
|
||||||
// Evaluate all connected faces
|
// Evaluate all connected faces
|
||||||
|
|
||||||
const labelList& eFaces = edgeFaces[edgeI];
|
const labelList& eFaces = edgeFaces[edgei];
|
||||||
forAll(eFaces, eFacei)
|
forAll(eFaces, eFacei)
|
||||||
{
|
{
|
||||||
label facei = eFaces[eFacei];
|
label facei = eFaces[eFacei];
|
||||||
@ -586,7 +586,7 @@ edgeToFace()
|
|||||||
updateFace
|
updateFace
|
||||||
(
|
(
|
||||||
facei,
|
facei,
|
||||||
edgeI,
|
edgei,
|
||||||
neighbourWallInfo,
|
neighbourWallInfo,
|
||||||
currentWallInfo
|
currentWallInfo
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -128,7 +128,7 @@ class PatchEdgeFaceWave
|
|||||||
// statistics.
|
// statistics.
|
||||||
bool updateEdge
|
bool updateEdge
|
||||||
(
|
(
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const label neighbourFacei,
|
const label neighbourFacei,
|
||||||
const Type& neighbourInfo,
|
const Type& neighbourInfo,
|
||||||
Type& edgeInfo
|
Type& edgeInfo
|
||||||
|
|||||||
@ -1,50 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2011-2018 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 "patchEdgeFaceInfo.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::Ostream& Foam::operator<<
|
|
||||||
(
|
|
||||||
Foam::Ostream& os,
|
|
||||||
const Foam::patchEdgeFaceInfo& wDist
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return os << wDist.origin() << wDist.distSqr();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::Istream& Foam::operator>>
|
|
||||||
(
|
|
||||||
Foam::Istream& is,
|
|
||||||
Foam::patchEdgeFaceInfo& wDist
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return is >> wDist.origin_ >> wDist.distSqr_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,18 +22,18 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::patchEdgeFaceInfo
|
Foam::patchEdgeFacePoint
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
Transport of nearest point location for use in PatchEdgeFaceWave.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
patchEdgeFaceInfoI.H
|
patchEdgeFacePointI.H
|
||||||
patchEdgeFaceInfo.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef patchEdgeFaceInfo_H
|
#ifndef patchEdgeFacePoint_H
|
||||||
#define patchEdgeFaceInfo_H
|
#define patchEdgeFacePoint_H
|
||||||
|
|
||||||
#include "point.H"
|
#include "point.H"
|
||||||
#include "label.H"
|
#include "label.H"
|
||||||
@ -55,17 +55,17 @@ class polyMesh;
|
|||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
class patchEdgeFaceInfo;
|
class patchEdgeFacePoint;
|
||||||
|
|
||||||
Istream& operator>>(Istream&, patchEdgeFaceInfo&);
|
Istream& operator>>(Istream&, patchEdgeFacePoint&);
|
||||||
Ostream& operator<<(Ostream&, const patchEdgeFaceInfo&);
|
Ostream& operator<<(Ostream&, const patchEdgeFacePoint&);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class patchEdgeFaceInfo Declaration
|
Class patchEdgeFacePoint Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class patchEdgeFaceInfo
|
class patchEdgeFacePoint
|
||||||
{
|
{
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class patchEdgeFaceInfo
|
|||||||
inline bool update
|
inline bool update
|
||||||
(
|
(
|
||||||
const point&,
|
const point&,
|
||||||
const patchEdgeFaceInfo& w2,
|
const patchEdgeFacePoint& w2,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
);
|
);
|
||||||
@ -95,7 +95,7 @@ class patchEdgeFaceInfo
|
|||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool update
|
inline bool update
|
||||||
(
|
(
|
||||||
const patchEdgeFaceInfo& w2,
|
const patchEdgeFacePoint& w2,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
);
|
);
|
||||||
@ -106,10 +106,10 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
//- Construct null
|
||||||
inline patchEdgeFaceInfo();
|
inline patchEdgeFacePoint();
|
||||||
|
|
||||||
//- Construct from origin, distance
|
//- Construct from origin, distance
|
||||||
inline patchEdgeFaceInfo(const point&, const scalar);
|
inline patchEdgeFacePoint(const point&, const scalar);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -145,9 +145,9 @@ public:
|
|||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const primitivePatch& patch,
|
const primitivePatch& patch,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const label facei,
|
const label facei,
|
||||||
const patchEdgeFaceInfo& faceInfo,
|
const patchEdgeFacePoint& faceInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
);
|
);
|
||||||
@ -158,7 +158,7 @@ public:
|
|||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const primitivePatch& patch,
|
const primitivePatch& patch,
|
||||||
const patchEdgeFaceInfo& edgeInfo,
|
const patchEdgeFacePoint& edgeInfo,
|
||||||
const bool sameOrientation,
|
const bool sameOrientation,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -171,34 +171,38 @@ public:
|
|||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const primitivePatch& patch,
|
const primitivePatch& patch,
|
||||||
const label facei,
|
const label facei,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const patchEdgeFaceInfo& edgeInfo,
|
const patchEdgeFacePoint& edgeInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Same (like operator==)
|
//- Same (like operator==)
|
||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool equal(const patchEdgeFaceInfo&, TrackingData& td) const;
|
inline bool equal
|
||||||
|
(
|
||||||
|
const patchEdgeFacePoint&,
|
||||||
|
TrackingData& td
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
// Needed for List IO
|
// Needed for List IO
|
||||||
inline bool operator==(const patchEdgeFaceInfo&) const;
|
inline bool operator==(const patchEdgeFacePoint&) const;
|
||||||
inline bool operator!=(const patchEdgeFaceInfo&) const;
|
inline bool operator!=(const patchEdgeFacePoint&) const;
|
||||||
|
|
||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream&, const patchEdgeFaceInfo&);
|
inline friend Ostream& operator<<(Ostream&, const patchEdgeFacePoint&);
|
||||||
friend Istream& operator>>(Istream&, patchEdgeFaceInfo&);
|
inline friend Istream& operator>>(Istream&, patchEdgeFacePoint&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//- Data associated with patchEdgeFaceInfo type are contiguous
|
//- Data associated with patchEdgeFacePoint type are contiguous
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<patchEdgeFaceInfo>()
|
inline bool contiguous<patchEdgeFacePoint>()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -210,7 +214,7 @@ inline bool contiguous<patchEdgeFaceInfo>()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "patchEdgeFaceInfoI.H"
|
#include "patchEdgeFacePointI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,10 +30,10 @@ License
|
|||||||
|
|
||||||
// Update this with w2 if w2 nearer to pt.
|
// Update this with w2 if w2 nearer to pt.
|
||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::patchEdgeFaceInfo::update
|
inline bool Foam::patchEdgeFacePoint::update
|
||||||
(
|
(
|
||||||
const point& pt,
|
const point& pt,
|
||||||
const patchEdgeFaceInfo& w2,
|
const patchEdgeFacePoint& w2,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
)
|
)
|
||||||
@ -75,9 +75,9 @@ inline bool Foam::patchEdgeFaceInfo::update
|
|||||||
|
|
||||||
// Update this with w2 (information on same edge)
|
// Update this with w2 (information on same edge)
|
||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::patchEdgeFaceInfo::update
|
inline bool Foam::patchEdgeFacePoint::update
|
||||||
(
|
(
|
||||||
const patchEdgeFaceInfo& w2,
|
const patchEdgeFacePoint& w2,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
)
|
)
|
||||||
@ -117,14 +117,14 @@ inline bool Foam::patchEdgeFaceInfo::update
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline Foam::patchEdgeFaceInfo::patchEdgeFaceInfo()
|
inline Foam::patchEdgeFacePoint::patchEdgeFacePoint()
|
||||||
:
|
:
|
||||||
origin_(point::max),
|
origin_(point::max),
|
||||||
distSqr_(sqr(great))
|
distSqr_(sqr(great))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::patchEdgeFaceInfo::patchEdgeFaceInfo
|
inline Foam::patchEdgeFacePoint::patchEdgeFacePoint
|
||||||
(
|
(
|
||||||
const point& origin,
|
const point& origin,
|
||||||
const scalar distSqr
|
const scalar distSqr
|
||||||
@ -137,27 +137,27 @@ inline Foam::patchEdgeFaceInfo::patchEdgeFaceInfo
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::point& Foam::patchEdgeFaceInfo::origin() const
|
inline const Foam::point& Foam::patchEdgeFacePoint::origin() const
|
||||||
{
|
{
|
||||||
return origin_;
|
return origin_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::scalar Foam::patchEdgeFaceInfo::distSqr() const
|
inline Foam::scalar Foam::patchEdgeFacePoint::distSqr() const
|
||||||
{
|
{
|
||||||
return distSqr_;
|
return distSqr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::patchEdgeFaceInfo::valid(TrackingData& td) const
|
inline bool Foam::patchEdgeFacePoint::valid(TrackingData& td) const
|
||||||
{
|
{
|
||||||
return origin_ != point::max;
|
return origin_ != point::max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline void Foam::patchEdgeFaceInfo::transform
|
inline void Foam::patchEdgeFacePoint::transform
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const primitivePatch& patch,
|
const primitivePatch& patch,
|
||||||
@ -171,18 +171,18 @@ inline void Foam::patchEdgeFaceInfo::transform
|
|||||||
|
|
||||||
|
|
||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::patchEdgeFaceInfo::updateEdge
|
inline bool Foam::patchEdgeFacePoint::updateEdge
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const primitivePatch& patch,
|
const primitivePatch& patch,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const label facei,
|
const label facei,
|
||||||
const patchEdgeFaceInfo& faceInfo,
|
const patchEdgeFacePoint& faceInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const edge& e = patch.edges()[edgeI];
|
const edge& e = patch.edges()[edgei];
|
||||||
point eMid =
|
point eMid =
|
||||||
0.5
|
0.5
|
||||||
* (
|
* (
|
||||||
@ -194,11 +194,11 @@ inline bool Foam::patchEdgeFaceInfo::updateEdge
|
|||||||
|
|
||||||
|
|
||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::patchEdgeFaceInfo::updateEdge
|
inline bool Foam::patchEdgeFacePoint::updateEdge
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const primitivePatch& patch,
|
const primitivePatch& patch,
|
||||||
const patchEdgeFaceInfo& edgeInfo,
|
const patchEdgeFacePoint& edgeInfo,
|
||||||
const bool sameOrientation,
|
const bool sameOrientation,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -209,13 +209,13 @@ inline bool Foam::patchEdgeFaceInfo::updateEdge
|
|||||||
|
|
||||||
|
|
||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::patchEdgeFaceInfo::updateFace
|
inline bool Foam::patchEdgeFacePoint::updateFace
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const primitivePatch& patch,
|
const primitivePatch& patch,
|
||||||
const label facei,
|
const label facei,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const patchEdgeFaceInfo& edgeInfo,
|
const patchEdgeFacePoint& edgeInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
)
|
)
|
||||||
@ -225,9 +225,9 @@ inline bool Foam::patchEdgeFaceInfo::updateFace
|
|||||||
|
|
||||||
|
|
||||||
template<class TrackingData>
|
template<class TrackingData>
|
||||||
inline bool Foam::patchEdgeFaceInfo::equal
|
inline bool Foam::patchEdgeFacePoint::equal
|
||||||
(
|
(
|
||||||
const patchEdgeFaceInfo& rhs,
|
const patchEdgeFacePoint& rhs,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
@ -237,22 +237,44 @@ inline bool Foam::patchEdgeFaceInfo::equal
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline bool Foam::patchEdgeFaceInfo::operator==
|
inline bool Foam::patchEdgeFacePoint::operator==
|
||||||
(
|
(
|
||||||
const Foam::patchEdgeFaceInfo& rhs
|
const Foam::patchEdgeFacePoint& rhs
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return origin() == rhs.origin();
|
return origin() == rhs.origin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::patchEdgeFaceInfo::operator!=
|
inline bool Foam::patchEdgeFacePoint::operator!=
|
||||||
(
|
(
|
||||||
const Foam::patchEdgeFaceInfo& rhs
|
const Foam::patchEdgeFacePoint& rhs
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return !(*this == rhs);
|
return !(*this == rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Foam::Ostream& os,
|
||||||
|
const Foam::patchEdgeFacePoint& wDist
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return os << wDist.origin() << token::SPACE << wDist.distSqr();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::Istream& Foam::operator>>
|
||||||
|
(
|
||||||
|
Foam::Istream& is,
|
||||||
|
Foam::patchEdgeFacePoint& wDist
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return is >> wDist.origin_ >> wDist.distSqr_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -1,50 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2012-2018 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 "patchEdgeFaceRegion.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::Ostream& Foam::operator<<
|
|
||||||
(
|
|
||||||
Foam::Ostream& os,
|
|
||||||
const Foam::patchEdgeFaceRegion& wDist
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return os << wDist.region_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::Istream& Foam::operator>>
|
|
||||||
(
|
|
||||||
Foam::Istream& is,
|
|
||||||
Foam::patchEdgeFaceRegion& wDist
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return is >> wDist.region_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,12 +26,10 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Transport of region for use in PatchEdgeFaceWave.
|
Transport of region for use in PatchEdgeFaceWave.
|
||||||
|
|
||||||
Set element to -2 to denote blocked.
|
Set element to -2 to denote blocked.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
patchEdgeFaceRegionI.H
|
patchEdgeFaceRegionI.H
|
||||||
patchEdgeFaceRegion.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -128,7 +126,7 @@ public:
|
|||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const indirectPrimitivePatch& patch,
|
const indirectPrimitivePatch& patch,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const label facei,
|
const label facei,
|
||||||
const patchEdgeFaceRegion& faceInfo,
|
const patchEdgeFaceRegion& faceInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
@ -154,7 +152,7 @@ public:
|
|||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const indirectPrimitivePatch& patch,
|
const indirectPrimitivePatch& patch,
|
||||||
const label facei,
|
const label facei,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const patchEdgeFaceRegion& edgeInfo,
|
const patchEdgeFaceRegion& edgeInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -174,8 +172,8 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream&, const patchEdgeFaceRegion&);
|
inline friend Ostream& operator<<(Ostream&, const patchEdgeFaceRegion&);
|
||||||
friend Istream& operator>>(Istream&, patchEdgeFaceRegion&);
|
inline friend Istream& operator>>(Istream&, patchEdgeFaceRegion&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -121,7 +121,7 @@ inline bool Foam::patchEdgeFaceRegion::updateEdge
|
|||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const indirectPrimitivePatch& patch,
|
const indirectPrimitivePatch& patch,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const label facei,
|
const label facei,
|
||||||
const patchEdgeFaceRegion& faceInfo,
|
const patchEdgeFaceRegion& faceInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
@ -153,7 +153,7 @@ inline bool Foam::patchEdgeFaceRegion::updateFace
|
|||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const indirectPrimitivePatch& patch,
|
const indirectPrimitivePatch& patch,
|
||||||
const label facei,
|
const label facei,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const patchEdgeFaceRegion& edgeInfo,
|
const patchEdgeFaceRegion& edgeInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -194,4 +194,26 @@ inline bool Foam::patchEdgeFaceRegion::operator!=
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Foam::Ostream& os,
|
||||||
|
const Foam::patchEdgeFaceRegion& wDist
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return os << wDist.region_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::Istream& Foam::operator>>
|
||||||
|
(
|
||||||
|
Foam::Istream& is,
|
||||||
|
Foam::patchEdgeFaceRegion& wDist
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return is >> wDist.region_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -1,50 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2012-2018 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 "patchEdgeFaceRegions.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::Ostream& Foam::operator<<
|
|
||||||
(
|
|
||||||
Foam::Ostream& os,
|
|
||||||
const Foam::patchEdgeFaceRegions& wDist
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return os << wDist.regions_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::Istream& Foam::operator>>
|
|
||||||
(
|
|
||||||
Foam::Istream& is,
|
|
||||||
Foam::patchEdgeFaceRegions& wDist
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return is >> wDist.regions_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,12 +26,10 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Transport of regions for use in PatchEdgeFaceWave.
|
Transport of regions for use in PatchEdgeFaceWave.
|
||||||
|
|
||||||
Set element to -1 to denote blocked.
|
Set element to -1 to denote blocked.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
patchEdgeFaceRegionsI.H
|
patchEdgeFaceRegionsI.H
|
||||||
patchEdgeFaceRegions.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -116,7 +114,7 @@ public:
|
|||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const Patch& patch,
|
const Patch& patch,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const label facei,
|
const label facei,
|
||||||
const patchEdgeFaceRegions& faceInfo,
|
const patchEdgeFaceRegions& faceInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
@ -142,7 +140,7 @@ public:
|
|||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const Patch& patch,
|
const Patch& patch,
|
||||||
const label facei,
|
const label facei,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const patchEdgeFaceRegions& edgeInfo,
|
const patchEdgeFaceRegions& edgeInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
@ -162,8 +160,16 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream&, const patchEdgeFaceRegions&);
|
inline friend Ostream& operator<<
|
||||||
friend Istream& operator>>(Istream&, patchEdgeFaceRegions&);
|
(
|
||||||
|
Ostream&,
|
||||||
|
const patchEdgeFaceRegions&
|
||||||
|
);
|
||||||
|
inline friend Istream& operator>>
|
||||||
|
(
|
||||||
|
Istream&,
|
||||||
|
patchEdgeFaceRegions&
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -84,7 +84,7 @@ inline bool Foam::patchEdgeFaceRegions::updateEdge
|
|||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const Patch& patch,
|
const Patch& patch,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const label facei,
|
const label facei,
|
||||||
const patchEdgeFaceRegions& faceInfo,
|
const patchEdgeFaceRegions& faceInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
@ -92,9 +92,9 @@ inline bool Foam::patchEdgeFaceRegions::updateEdge
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
const face& f = patch.localFaces()[facei];
|
const face& f = patch.localFaces()[facei];
|
||||||
const edge& e = patch.edges()[edgeI];
|
const edge& e = patch.edges()[edgei];
|
||||||
|
|
||||||
label index = findIndex(patch.faceEdges()[facei], edgeI);
|
label index = findIndex(patch.faceEdges()[facei], edgei);
|
||||||
bool sameOrientation = (f[index] == e.start());
|
bool sameOrientation = (f[index] == e.start());
|
||||||
|
|
||||||
// Get information in edge-order
|
// Get information in edge-order
|
||||||
@ -189,17 +189,17 @@ inline bool Foam::patchEdgeFaceRegions::updateFace
|
|||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const Patch& patch,
|
const Patch& patch,
|
||||||
const label facei,
|
const label facei,
|
||||||
const label edgeI,
|
const label edgei,
|
||||||
const patchEdgeFaceRegions& edgeInfo,
|
const patchEdgeFaceRegions& edgeInfo,
|
||||||
const scalar tol,
|
const scalar tol,
|
||||||
TrackingData& td
|
TrackingData& td
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const face& f = patch.localFaces()[facei];
|
const face& f = patch.localFaces()[facei];
|
||||||
const edge& e = patch.edges()[edgeI];
|
const edge& e = patch.edges()[edgei];
|
||||||
|
|
||||||
// Find starting point of edge on face.
|
// Find starting point of edge on face.
|
||||||
label index0 = findIndex(patch.faceEdges()[facei], edgeI);
|
label index0 = findIndex(patch.faceEdges()[facei], edgei);
|
||||||
label index1 = f.fcIndex(index0);
|
label index1 = f.fcIndex(index0);
|
||||||
bool sameOrientation = (f[index0] == e.start());
|
bool sameOrientation = (f[index0] == e.start());
|
||||||
|
|
||||||
@ -279,4 +279,26 @@ inline bool Foam::patchEdgeFaceRegions::operator!=
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Foam::Ostream& os,
|
||||||
|
const Foam::patchEdgeFaceRegions& wDist
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return os << wDist.regions_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::Istream& Foam::operator>>
|
||||||
|
(
|
||||||
|
Foam::Istream& is,
|
||||||
|
Foam::patchEdgeFaceRegions& wDist
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return is >> wDist.regions_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "PatchEdgeFaceWave.H"
|
#include "PatchEdgeFaceWave.H"
|
||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "patchEdgeFaceInfo.H"
|
#include "patchEdgeFacePoint.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -76,12 +76,12 @@ void Foam::patchPatchDist::correct()
|
|||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
label edgeI = nbrPatch.nInternalEdges();
|
label edgei = nbrPatch.nInternalEdges();
|
||||||
edgeI < nbrPatch.nEdges();
|
edgei < nbrPatch.nEdges();
|
||||||
edgeI++
|
edgei++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const edge& e = nbrPatch.edges()[edgeI];
|
const edge& e = nbrPatch.edges()[edgei];
|
||||||
const edge meshE = edge(nbrMp[e[0]], nbrMp[e[1]]);
|
const edge meshE = edge(nbrMp[e[0]], nbrMp[e[1]]);
|
||||||
nbrEdges.insert(meshE, nbrPatchi);
|
nbrEdges.insert(meshE, nbrPatchi);
|
||||||
}
|
}
|
||||||
@ -98,13 +98,13 @@ void Foam::patchPatchDist::correct()
|
|||||||
|
|
||||||
|
|
||||||
// Data on all edges and faces
|
// Data on all edges and faces
|
||||||
List<patchEdgeFaceInfo> allEdgeInfo(patch_.nEdges());
|
List<patchEdgeFacePoint> allEdgeInfo(patch_.nEdges());
|
||||||
List<patchEdgeFaceInfo> allFaceInfo(patch_.size());
|
List<patchEdgeFacePoint> allFaceInfo(patch_.size());
|
||||||
|
|
||||||
// Initial seed
|
// Initial seed
|
||||||
label nBndEdges = patch_.nEdges() - patch_.nInternalEdges();
|
label nBndEdges = patch_.nEdges() - patch_.nInternalEdges();
|
||||||
DynamicList<label> initialEdges(2*nBndEdges);
|
DynamicList<label> initialEdges(2*nBndEdges);
|
||||||
DynamicList<patchEdgeFaceInfo> initialEdgesInfo(2*nBndEdges);
|
DynamicList<patchEdgeFacePoint> initialEdgesInfo(2*nBndEdges);
|
||||||
|
|
||||||
|
|
||||||
// Seed all my edges that are also nbrEdges
|
// Seed all my edges that are also nbrEdges
|
||||||
@ -113,20 +113,20 @@ void Foam::patchPatchDist::correct()
|
|||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
label edgeI = patch_.nInternalEdges();
|
label edgei = patch_.nInternalEdges();
|
||||||
edgeI < patch_.nEdges();
|
edgei < patch_.nEdges();
|
||||||
edgeI++
|
edgei++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const edge& e = patch_.edges()[edgeI];
|
const edge& e = patch_.edges()[edgei];
|
||||||
const edge meshE = edge(mp[e[0]], mp[e[1]]);
|
const edge meshE = edge(mp[e[0]], mp[e[1]]);
|
||||||
EdgeMap<label>::const_iterator edgeFnd = nbrEdges.find(meshE);
|
EdgeMap<label>::const_iterator edgeFnd = nbrEdges.find(meshE);
|
||||||
if (edgeFnd != nbrEdges.end())
|
if (edgeFnd != nbrEdges.end())
|
||||||
{
|
{
|
||||||
initialEdges.append(edgeI);
|
initialEdges.append(edgei);
|
||||||
initialEdgesInfo.append
|
initialEdgesInfo.append
|
||||||
(
|
(
|
||||||
patchEdgeFaceInfo
|
patchEdgeFacePoint
|
||||||
(
|
(
|
||||||
e.centre(patch_.localPoints()),
|
e.centre(patch_.localPoints()),
|
||||||
0.0
|
0.0
|
||||||
@ -137,11 +137,7 @@ void Foam::patchPatchDist::correct()
|
|||||||
|
|
||||||
|
|
||||||
// Walk
|
// Walk
|
||||||
PatchEdgeFaceWave
|
PatchEdgeFaceWave<primitivePatch, patchEdgeFacePoint> calc
|
||||||
<
|
|
||||||
primitivePatch,
|
|
||||||
patchEdgeFaceInfo
|
|
||||||
> calc
|
|
||||||
(
|
(
|
||||||
patch_.boundaryMesh().mesh(),
|
patch_.boundaryMesh().mesh(),
|
||||||
patch_,
|
patch_,
|
||||||
|
|||||||
@ -1,46 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2011-2018 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 "pointEdgePoint.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::Ostream& Foam::operator<<
|
|
||||||
(
|
|
||||||
Foam::Ostream& os,
|
|
||||||
const Foam::pointEdgePoint& wDist
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return os << wDist.origin() << wDist.distSqr();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::pointEdgePoint& wDist)
|
|
||||||
{
|
|
||||||
return is >> wDist.origin_ >> wDist.distSqr_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -209,8 +209,8 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream&, const pointEdgePoint&);
|
inline friend Ostream& operator<<(Ostream&, const pointEdgePoint&);
|
||||||
friend Istream& operator>>(Istream&, pointEdgePoint&);
|
inline friend Istream& operator>>(Istream&, pointEdgePoint&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -287,4 +287,26 @@ const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Foam::Ostream& os,
|
||||||
|
const Foam::pointEdgePoint& wDist
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return os << wDist.origin() << token::SPACE << wDist.distSqr();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::Istream& Foam::operator>>
|
||||||
|
(
|
||||||
|
Foam::Istream& is,
|
||||||
|
Foam::pointEdgePoint& wDist
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return is >> wDist.origin_ >> wDist.distSqr_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user