ENH: edgeIntersections: added subset manipulation
This commit is contained in:
parent
736b551ae2
commit
df9ae1d07f
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
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
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -197,6 +197,15 @@ public:
|
||||
const scalarField& surf1PointTol,
|
||||
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
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user