mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: edgeIntersections: added subset manipulation
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 |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -700,4 +700,38 @@ Foam::label Foam::edgeIntersections::removeDegenerates
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::edgeIntersections::replace
|
||||||
|
(
|
||||||
|
const edgeIntersections& subInfo,
|
||||||
|
const labelList& edgeMap,
|
||||||
|
const labelList& faceMap
|
||||||
|
)
|
||||||
|
{
|
||||||
|
forAll(subInfo, subI)
|
||||||
|
{
|
||||||
|
const List<pointIndexHit>& subHits = subInfo[subI];
|
||||||
|
const labelList& subClass = subInfo.classification()[subI];
|
||||||
|
|
||||||
|
label edgeI = edgeMap[subI];
|
||||||
|
List<pointIndexHit>& intersections = operator[](edgeI);
|
||||||
|
labelList& intersectionTypes = classification_[edgeI];
|
||||||
|
|
||||||
|
intersections.setSize(subHits.size());
|
||||||
|
intersectionTypes.setSize(subHits.size());
|
||||||
|
|
||||||
|
forAll(subHits, i)
|
||||||
|
{
|
||||||
|
const pointIndexHit& subHit = subHits[i];
|
||||||
|
intersections[i] = pointIndexHit
|
||||||
|
(
|
||||||
|
subHit.hit(),
|
||||||
|
subHit.rawPoint(),
|
||||||
|
faceMap[subHit.index()]
|
||||||
|
);
|
||||||
|
intersectionTypes[i] = subClass[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -197,6 +197,15 @@ public:
|
|||||||
const scalarField& surf1PointTol,
|
const scalarField& surf1PointTol,
|
||||||
pointField& points1
|
pointField& points1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Replace edge intersection for a subset (given as edge map and
|
||||||
|
// face map - for face indices stored in pointIndexHit.index())
|
||||||
|
void replace
|
||||||
|
(
|
||||||
|
const edgeIntersections&,
|
||||||
|
const labelList& edgeMap,
|
||||||
|
const labelList& faceMap
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user