Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
097e54a7
Commit
097e54a7
authored
Nov 01, 2018
by
mattijs
Browse files
BUG: isoSurfaceCell: pre-filtering of cells misses lopping off a corner. Fixes
#1062
.
parent
bde7d4bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sampling/surface/isoSurface/isoSurfaceCell.C
View file @
097e54a7
...
...
@@ -120,10 +120,10 @@ Foam::isoSurfaceCell::cellCutType Foam::isoSurfaceCell::calcCutType
{
const
face
&
f
=
mesh_
.
faces
()[
facei
];
// Check pyramid
s cut
for
(
const
label
lab
i
:
f
)
// Check pyramid
edges (corner point to cell centre)
for
(
const
label
point
i
:
f
)
{
if
(
cellLower
!=
(
pointValues
[
lab
i
]
<
iso_
))
if
(
cellLower
!=
(
pointValues
[
point
i
]
<
iso_
))
{
edgeCut
=
true
;
break
;
...
...
@@ -135,6 +135,7 @@ Foam::isoSurfaceCell::cellCutType Foam::isoSurfaceCell::calcCutType
break
;
}
// Check (triangulated) face edges
const
label
fp0
=
mesh_
.
tetBasePtIs
()[
facei
];
label
fp
=
f
.
fcIndex
(
fp0
);
for
(
label
i
=
2
;
i
<
f
.
size
();
++
i
)
...
...
@@ -165,23 +166,23 @@ Foam::isoSurfaceCell::cellCutType Foam::isoSurfaceCell::calcCutType
const
labelList
&
cPoints
=
mesh_
.
cellPoints
(
celli
);
label
nCuts
=
0
;
label
n
PyrEdge
Cuts
=
0
;
for
(
const
label
pointi
:
cPoints
)
{
if
(
cellLower
!=
(
pointValues
[
pointi
]
<
iso_
))
{
++
nCuts
;
++
n
PyrEdge
Cuts
;
}
}
if
(
nCuts
==
cPoints
.
size
())
if
(
n
PyrEdge
Cuts
==
cPoints
.
size
())
{
return
SPHERE
;
}
else
if
(
nCuts
>
1
)
else
if
(
n
PyrEdge
Cuts
)
{
//
Need at least two edge cuts, otherwise this is a spurious cut
//
There is a pyramid edge cut. E.g. lopping off a tet from a corner
return
CUT
;
}
}
...
...
Write
Preview
Markdown
is supported
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