surface meshes: Renamed movePoints -> setPoints for consistency with polyMesh
The surface mesh setPoints function resets the points without caching the old points or swept areas so is the equivalent of the polyMesh::setPoints rather than movePoints.
This commit is contained in:
@ -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-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -61,7 +61,7 @@ Foam::fvMesh::readUpdateState Foam::vtkMesh::readUpdate()
|
|||||||
|
|
||||||
if (meshState != fvMesh::UNCHANGED)
|
if (meshState != fvMesh::UNCHANGED)
|
||||||
{
|
{
|
||||||
// Note: since fvMeshSubset has no movePoints() functionality,
|
// Note: since fvMeshSubset has no setPoints() functionality,
|
||||||
// reconstruct the subset even if only movement.
|
// reconstruct the subset even if only movement.
|
||||||
|
|
||||||
topoPtr_.clear();
|
topoPtr_.clear();
|
||||||
|
|||||||
@ -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-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -133,7 +133,7 @@ bool intersectSurfaces
|
|||||||
if (nIters != 0)
|
if (nIters != 0)
|
||||||
{
|
{
|
||||||
// Update geometric quantities
|
// Update geometric quantities
|
||||||
surf.movePoints(points);
|
surf.setPoints(points);
|
||||||
hasMoved = true;
|
hasMoved = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -206,7 +206,7 @@ bool intersectSurfaces
|
|||||||
if (nIters1 != 0)
|
if (nIters1 != 0)
|
||||||
{
|
{
|
||||||
// Update geometric quantities
|
// Update geometric quantities
|
||||||
surf1.movePoints(points1);
|
surf1.setPoints(points1);
|
||||||
hasMoved1 = true;
|
hasMoved1 = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ bool intersectSurfaces
|
|||||||
if (nIters2 != 0)
|
if (nIters2 != 0)
|
||||||
{
|
{
|
||||||
// Update geometric quantities
|
// Update geometric quantities
|
||||||
surf2.movePoints(points2);
|
surf2.setPoints(points2);
|
||||||
hasMoved2 = true;
|
hasMoved2 = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -206,7 +206,7 @@ int main(int argc, char *argv[])
|
|||||||
UIndirectList<point>(newPoints, surf1.meshPoints()) =
|
UIndirectList<point>(newPoints, surf1.meshPoints()) =
|
||||||
newLocalPoints;
|
newLocalPoints;
|
||||||
|
|
||||||
surf1.movePoints(newPoints);
|
surf1.setPoints(newPoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mu
|
// Mu
|
||||||
@ -222,7 +222,7 @@ int main(int argc, char *argv[])
|
|||||||
UIndirectList<point>(newPoints, surf1.meshPoints()) =
|
UIndirectList<point>(newPoints, surf1.meshPoints()) =
|
||||||
newLocalPoints;
|
newLocalPoints;
|
||||||
|
|
||||||
surf1.movePoints(newPoints);
|
surf1.setPoints(newPoints);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -182,14 +182,14 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< " -from " << fromCsys().name() << endl;
|
Info<< " -from " << fromCsys().name() << endl;
|
||||||
tmp<pointField> tpf = fromCsys().localPosition(surf.points());
|
tmp<pointField> tpf = fromCsys().localPosition(surf.points());
|
||||||
surf.movePoints(tpf());
|
surf.setPoints(tpf());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toCsys.valid())
|
if (toCsys.valid())
|
||||||
{
|
{
|
||||||
Info<< " -to " << toCsys().name() << endl;
|
Info<< " -to " << toCsys().name() << endl;
|
||||||
tmp<pointField> tpf = toCsys().globalPosition(surf.points());
|
tmp<pointField> tpf = toCsys().globalPosition(surf.points());
|
||||||
surf.movePoints(tpf());
|
surf.setPoints(tpf());
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleOut = 0;
|
scalar scaleOut = 0;
|
||||||
|
|||||||
@ -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-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -186,14 +186,14 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< " -from " << fromCsys().name() << endl;
|
Info<< " -from " << fromCsys().name() << endl;
|
||||||
tmp<pointField> tpf = fromCsys().localPosition(surf.points());
|
tmp<pointField> tpf = fromCsys().localPosition(surf.points());
|
||||||
surf.movePoints(tpf());
|
surf.setPoints(tpf());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toCsys.valid())
|
if (toCsys.valid())
|
||||||
{
|
{
|
||||||
Info<< " -to " << toCsys().name() << endl;
|
Info<< " -to " << toCsys().name() << endl;
|
||||||
tmp<pointField> tpf = toCsys().globalPosition(surf.points());
|
tmp<pointField> tpf = toCsys().globalPosition(surf.points());
|
||||||
surf.movePoints(tpf());
|
surf.setPoints(tpf());
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleOut = 0;
|
scalar scaleOut = 0;
|
||||||
|
|||||||
@ -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-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -183,14 +183,14 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< " -from " << fromCsys().name() << endl;
|
Info<< " -from " << fromCsys().name() << endl;
|
||||||
tmp<pointField> tpf = fromCsys().localPosition(surf.points());
|
tmp<pointField> tpf = fromCsys().localPosition(surf.points());
|
||||||
surf.movePoints(tpf());
|
surf.setPoints(tpf());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toCsys.valid())
|
if (toCsys.valid())
|
||||||
{
|
{
|
||||||
Info<< " -to " << toCsys().name() << endl;
|
Info<< " -to " << toCsys().name() << endl;
|
||||||
tmp<pointField> tpf = toCsys().globalPosition(surf.points());
|
tmp<pointField> tpf = toCsys().globalPosition(surf.points());
|
||||||
surf.movePoints(tpf());
|
surf.setPoints(tpf());
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar scaleOut = 0;
|
scalar scaleOut = 0;
|
||||||
|
|||||||
@ -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-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -118,7 +118,7 @@ int main(int argc, char *argv[])
|
|||||||
meshedSurface surf1(surfFileName);
|
meshedSurface surf1(surfFileName);
|
||||||
pointField points(surf1.points());
|
pointField points(surf1.points());
|
||||||
transforms.transformPosition(points, points);
|
transforms.transformPosition(points, points);
|
||||||
surf1.movePoints(points);
|
surf1.setPoints(points);
|
||||||
surf1.write(outFileName);
|
surf1.write(outFileName);
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|||||||
@ -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-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -518,11 +518,11 @@ bool Foam::triSurfaceMesh::overlaps(const boundBox& bb) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::triSurfaceMesh::movePoints(const pointField& newPoints)
|
void Foam::triSurfaceMesh::setPoints(const pointField& newPoints)
|
||||||
{
|
{
|
||||||
triSurfaceRegionSearch::clearOut();
|
triSurfaceRegionSearch::clearOut();
|
||||||
edgeTree_.clear();
|
edgeTree_.clear();
|
||||||
triSurface::movePoints(newPoints);
|
triSurface::setPoints(newPoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -220,7 +220,7 @@ public:
|
|||||||
void clearOut();
|
void clearOut();
|
||||||
|
|
||||||
//- Move points
|
//- Move points
|
||||||
virtual void movePoints(const pointField&);
|
virtual void setPoints(const pointField&);
|
||||||
|
|
||||||
//- Demand driven construction of octree for boundary edges
|
//- Demand driven construction of octree for boundary edges
|
||||||
const indexedOctree<treeDataEdge>& edgeTree() const;
|
const indexedOctree<treeDataEdge>& edgeTree() const;
|
||||||
|
|||||||
@ -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-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -458,7 +458,7 @@ void Foam::MeshedSurface<Face>::clear()
|
|||||||
|
|
||||||
|
|
||||||
template<class Face>
|
template<class Face>
|
||||||
void Foam::MeshedSurface<Face>::movePoints(const pointField& newPoints)
|
void Foam::MeshedSurface<Face>::setPoints(const pointField& newPoints)
|
||||||
{
|
{
|
||||||
// Adapt for new point position
|
// Adapt for new point position
|
||||||
ParentType::clearGeom();
|
ParentType::clearGeom();
|
||||||
|
|||||||
@ -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-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -333,8 +333,8 @@ public:
|
|||||||
//- Clear all storage
|
//- Clear all storage
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
|
|
||||||
//- Move points
|
//- Reset the points
|
||||||
virtual void movePoints(const pointField&);
|
virtual void setPoints(const pointField&);
|
||||||
|
|
||||||
//- Scale points. A non-positive factor is ignored
|
//- Scale points. A non-positive factor is ignored
|
||||||
virtual void scalePoints(const scalar);
|
virtual void scalePoints(const scalar);
|
||||||
|
|||||||
@ -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-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -734,7 +734,7 @@ const Foam::labelList& Foam::triSurface::edgeOwner() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::triSurface::movePoints(const pointField& newPoints)
|
void Foam::triSurface::setPoints(const pointField& newPoints)
|
||||||
{
|
{
|
||||||
// Remove all geometry dependent data
|
// Remove all geometry dependent data
|
||||||
deleteDemandDrivenData(sortedEdgeFacesPtr_);
|
deleteDemandDrivenData(sortedEdgeFacesPtr_);
|
||||||
|
|||||||
@ -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-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -346,7 +346,7 @@ public:
|
|||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
//- Move points
|
//- Move points
|
||||||
virtual void movePoints(const pointField&);
|
virtual void setPoints(const pointField&);
|
||||||
|
|
||||||
//- Scale points. A non-positive factor is ignored
|
//- Scale points. A non-positive factor is ignored
|
||||||
virtual void scalePoints(const scalar);
|
virtual void scalePoints(const scalar);
|
||||||
|
|||||||
Reference in New Issue
Block a user