Skip to content
GitLab
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
7493d1ca
Commit
7493d1ca
authored
Nov 26, 2008
by
mattijs
Browse files
handling of empty
parent
05fc4832
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/sampling/sampledSurface/isoSurface/isoSurface.C
View file @
7493d1ca
...
...
@@ -108,17 +108,15 @@ void Foam::isoSurface::calcCutTypes
const
polyPatch
&
pp
=
patches
[
patchI
];
label
faceI
=
pp
.
start
();
forAll
(
pp
,
i
)
if
(
isA
<
emptyPolyPatch
>
(
pp
))
{
bool
ownLower
=
(
cVals
[
own
[
faceI
]]
<
iso_
);
bool
neiLower
=
(
cVals
.
boundaryField
()[
patchI
][
i
]
<
iso_
);
// Assume zero gradient so owner and neighbour/boundary value equal
if
(
ownLower
!=
neiLower
)
{
faceCutType_
[
faceI
]
=
CUT
;
}
else
forAll
(
pp
,
i
)
{
bool
ownLower
=
(
cVals
[
own
[
faceI
]]
<
iso_
);
// Mesh edge.
const
face
f
=
mesh_
.
faces
()[
faceI
];
...
...
@@ -129,15 +127,48 @@ void Foam::isoSurface::calcCutTypes
(
(
fpLower
!=
(
pVals
[
f
[
f
.
fcIndex
(
fp
)]]
<
iso_
))
||
(
fpLower
!=
ownLower
)
||
(
fpLower
!=
neiLower
)
)
{
faceCutType_
[
faceI
]
=
CUT
;
break
;
}
}
faceI
++
;
}
}
else
{
forAll
(
pp
,
i
)
{
bool
ownLower
=
(
cVals
[
own
[
faceI
]]
<
iso_
);
bool
neiLower
=
(
cVals
.
boundaryField
()[
patchI
][
i
]
<
iso_
);
if
(
ownLower
!=
neiLower
)
{
faceCutType_
[
faceI
]
=
CUT
;
}
else
{
// Mesh edge.
const
face
f
=
mesh_
.
faces
()[
faceI
];
forAll
(
f
,
fp
)
{
bool
fpLower
=
(
pVals
[
f
[
fp
]]
<
iso_
);
if
(
(
fpLower
!=
(
pVals
[
f
[
f
.
fcIndex
(
fp
)]]
<
iso_
))
||
(
fpLower
!=
ownLower
)
||
(
fpLower
!=
neiLower
)
)
{
faceCutType_
[
faceI
]
=
CUT
;
break
;
}
}
}
faceI
++
;
}
faceI
++
;
}
}
...
...
@@ -328,8 +359,17 @@ void Foam::isoSurface::getNeighbour
label
patchI
=
boundaryRegion
[
bFaceI
];
label
patchFaceI
=
faceI
-
mesh_
.
boundaryMesh
()[
patchI
].
start
();
nbrValue
=
cVals
.
boundaryField
()[
patchI
][
patchFaceI
];
nbrPoint
=
mesh_
.
C
().
boundaryField
()[
patchI
][
patchFaceI
];
if
(
isA
<
emptyPolyPatch
>
(
mesh_
.
boundaryMesh
()[
patchI
]))
{
// Assume zero gradient
nbrValue
=
cVals
[
own
[
faceI
]];
nbrPoint
=
mesh_
.
C
().
boundaryField
()[
patchI
][
patchFaceI
];
}
else
{
nbrValue
=
cVals
.
boundaryField
()[
patchI
][
patchFaceI
];
nbrPoint
=
mesh_
.
C
().
boundaryField
()[
patchI
][
patchFaceI
];
}
}
}
...
...
src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C
View file @
7493d1ca
...
...
@@ -382,6 +382,39 @@ void Foam::isoSurface::generateTriPoints
}
}
}
else
if
(
isA
<
emptyPolyPatch
>
(
pp
))
{
// Assume zero-gradient.
label
faceI
=
pp
.
start
();
forAll
(
pp
,
i
)
{
if
(
faceCutType_
[
faceI
]
!=
NOTCUT
)
{
generateTriPoints
(
cVals
,
pVals
,
cCoords
,
pCoords
,
snappedPoints
,
snappedCc
,
snappedPoint
,
faceI
,
cVals
[
own
[
faceI
]],
cCoords
.
boundaryField
()[
patchI
][
i
],
-
1
,
// fc not snapped
triPoints
,
triMeshCells
);
}
faceI
++
;
}
}
else
{
label
faceI
=
pp
.
start
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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