Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
386cafd8
Commit
386cafd8
authored
Oct 03, 2019
by
mattijs
Committed by
Andrew Heather
Oct 03, 2019
Browse files
ENH: patchSet: merge collocated points. Fixes #1453.
parent
a563db32
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/sampling/sampledSet/patchEdge/patchEdgeSet.C
View file @
386cafd8
...
...
@@ -28,6 +28,7 @@ License
#include
"addToRunTimeSelectionTable.H"
#include
"searchableSurface.H"
#include
"Time.H"
#include
"mergePoints.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...
...
@@ -126,15 +127,58 @@ void Foam::patchEdgeSet::genSamples()
samplingSegments
.
shrink
();
samplingCurveDist
.
shrink
();
setSamples
labelList
pointMap
;
const
label
nMerged
=
mergePoints
(
samplingPts
,
samplingCells
,
samplingFaces
,
samplingSegments
,
samplingCurveDist
SMALL
,
//const scalar mergeTol
,
false
,
//const bool verbose
,
pointMap
,
origin_
);
if
(
nMerged
==
0
)
{
setSamples
(
samplingPts
,
samplingCells
,
samplingFaces
,
samplingSegments
,
samplingCurveDist
);
}
else
{
// Compress out duplicates
List
<
point
>
newSamplingPts
(
nMerged
);
List
<
label
>
newSamplingCells
(
nMerged
);
List
<
label
>
newSamplingFaces
(
nMerged
);
List
<
label
>
newSamplingSegments
(
nMerged
);
List
<
scalar
>
newSamplingCurveDist
(
nMerged
);
forAll
(
pointMap
,
i
)
{
const
label
newi
=
pointMap
[
i
];
newSamplingPts
[
newi
]
=
samplingPts
[
i
];
newSamplingCells
[
newi
]
=
samplingCells
[
i
];
newSamplingFaces
[
newi
]
=
samplingFaces
[
i
];
newSamplingSegments
[
newi
]
=
samplingSegments
[
i
];
newSamplingCurveDist
[
newi
]
=
samplingCurveDist
[
i
];
}
setSamples
(
newSamplingPts
,
newSamplingCells
,
newSamplingFaces
,
newSamplingSegments
,
newSamplingCurveDist
);
}
if
(
debug
)
{
write
(
Info
);
...
...
src/sampling/sampledSet/patchEdge/patchEdgeSet.H
View file @
386cafd8
...
...
@@ -49,6 +49,8 @@ Usage
type patchEdge;
axis x;
// List of patches to sample (into single file). Note: supports
// wildcards.
patches (movingWall);
// Surface type
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment