Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
0008052e
Commit
0008052e
authored
14 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: triSurface.C: avoid faceFaces() since not valid for non-manifold
parent
1b5de71f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/triSurface/triSurface/triSurface.C
+37
-33
37 additions, 33 deletions
src/triSurface/triSurface/triSurface.C
with
37 additions
and
33 deletions
src/triSurface/triSurface/triSurface.C
+
37
−
33
View file @
0008052e
...
...
@@ -211,8 +211,6 @@ void Foam::triSurface::checkTriangles(const bool verbose)
boolList
valid
(
size
(),
true
);
bool
hasInvalid
=
false
;
const
labelListList
&
fFaces
=
faceFaces
();
forAll
(
*
this
,
faceI
)
{
const
labelledTri
&
f
=
(
*
this
)[
faceI
];
...
...
@@ -236,47 +234,53 @@ void Foam::triSurface::checkTriangles(const bool verbose)
else
{
// duplicate triangle check
const
labelList
&
neighbour
s
=
f
F
ace
s
[
faceI
];
const
labelList
&
fEdge
s
=
face
Edges
()
[
faceI
];
// Check if faceNeighbours use same points as this face.
// Note: discards normal information - sides of baffle are merged.
forAll
(
neighbours
,
neighbourI
)
{
if
(
neighbours
[
neighbourI
]
<=
faceI
)
{
// lower numbered faces already checked
continue
;
}
const
labelledTri
&
n
=
(
*
this
)[
neighbours
[
neighbourI
]];
forAll
(
fEdges
,
fp
)
{
const
labelList
&
eFaces
=
edgeFaces
()[
fEdges
[
fp
]];
if
(
((
f
[
0
]
==
n
[
0
])
||
(
f
[
0
]
==
n
[
1
])
||
(
f
[
0
]
==
n
[
2
]))
&&
((
f
[
1
]
==
n
[
0
])
||
(
f
[
1
]
==
n
[
1
])
||
(
f
[
1
]
==
n
[
2
]))
&&
((
f
[
2
]
==
n
[
0
])
||
(
f
[
2
]
==
n
[
1
])
||
(
f
[
2
]
==
n
[
2
]))
)
forAll
(
eFaces
,
i
)
{
valid
[
faceI
]
=
false
;
hasInvalid
=
true
;
label
neighbour
=
eFaces
[
i
];
if
(
verbose
)
if
(
neighbour
>
faceI
)
{
WarningIn
// lower numbered faces already checked
const
labelledTri
&
n
=
(
*
this
)[
neighbour
];
if
(
"triSurface::checkTriangles(bool verbose)"
)
<<
"triangles share the same vertices:
\n
"
<<
" face 1 :"
<<
faceI
<<
endl
;
printTriangle
(
Warning
,
" "
,
f
,
points
());
Warning
<<
endl
<<
" face 2 :"
<<
neighbours
[
neighbourI
]
<<
endl
;
printTriangle
(
Warning
,
" "
,
n
,
points
());
((
f
[
0
]
==
n
[
0
])
||
(
f
[
0
]
==
n
[
1
])
||
(
f
[
0
]
==
n
[
2
]))
&&
((
f
[
1
]
==
n
[
0
])
||
(
f
[
1
]
==
n
[
1
])
||
(
f
[
1
]
==
n
[
2
]))
&&
((
f
[
2
]
==
n
[
0
])
||
(
f
[
2
]
==
n
[
1
])
||
(
f
[
2
]
==
n
[
2
]))
)
{
valid
[
faceI
]
=
false
;
hasInvalid
=
true
;
if
(
verbose
)
{
WarningIn
(
"triSurface::checkTriangles(bool verbose)"
)
<<
"triangles share the same vertices:
\n
"
<<
" face 1 :"
<<
faceI
<<
endl
;
printTriangle
(
Warning
,
" "
,
f
,
points
());
Warning
<<
endl
<<
" face 2 :"
<<
neighbour
<<
endl
;
printTriangle
(
Warning
,
" "
,
n
,
points
());
}
break
;
}
}
break
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment