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
593db180
Commit
593db180
authored
16 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
added verbosity option
parent
99500b1f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/utilities/surface/surfaceCheck/surfaceCheck.C
+19
-15
19 additions, 15 deletions
applications/utilities/surface/surfaceCheck/surfaceCheck.C
with
19 additions
and
15 deletions
applications/utilities/surface/surfaceCheck/surfaceCheck.C
+
19
−
15
View file @
593db180
...
@@ -36,7 +36,7 @@ License
...
@@ -36,7 +36,7 @@ License
using
namespace
Foam
;
using
namespace
Foam
;
// Does face use valid vertices?
// Does face use valid vertices?
bool
validTri
(
const
triSurface
&
surf
,
const
label
faceI
)
bool
validTri
(
const
bool
verbose
,
const
triSurface
&
surf
,
const
label
faceI
)
{
{
// Simple check on indices ok.
// Simple check on indices ok.
...
@@ -49,20 +49,21 @@ bool validTri(const triSurface& surf, const label faceI)
...
@@ -49,20 +49,21 @@ bool validTri(const triSurface& surf, const label faceI)
||
(
f
[
2
]
<
0
)
||
(
f
[
2
]
>=
surf
.
points
().
size
())
||
(
f
[
2
]
<
0
)
||
(
f
[
2
]
>=
surf
.
points
().
size
())
)
)
{
{
//
WarningIn("validTri(const triSurface&, const label)")
WarningIn
(
"validTri(const triSurface&, const label)"
)
//
<< "triangle " << faceI << " vertices " << f
<<
"triangle "
<<
faceI
<<
" vertices "
<<
f
//
<< " uses point indices outside point range 0.."
<<
" uses point indices outside point range 0.."
//
<< surf.points().size()-1 << endl;
<<
surf
.
points
().
size
()
-
1
<<
endl
;
return
false
;
return
false
;
}
}
if
((
f
[
0
]
==
f
[
1
])
||
(
f
[
0
]
==
f
[
2
])
||
(
f
[
1
]
==
f
[
2
]))
if
((
f
[
0
]
==
f
[
1
])
||
(
f
[
0
]
==
f
[
2
])
||
(
f
[
1
]
==
f
[
2
]))
{
{
//WarningIn("validTri(const triSurface&, const label)")
WarningIn
(
"validTri(const triSurface&, const label)"
)
// << "triangle " << faceI
<<
"triangle "
<<
faceI
// << " uses non-unique vertices " << f
<<
" uses non-unique vertices "
<<
f
// << endl;
<<
" coords:"
<<
f
.
points
(
surf
.
points
())
<<
endl
;
return
false
;
return
false
;
}
}
...
@@ -91,11 +92,12 @@ bool validTri(const triSurface& surf, const label faceI)
...
@@ -91,11 +92,12 @@ bool validTri(const triSurface& surf, const label faceI)
&&
((
f
[
2
]
==
nbrF
[
0
])
||
(
f
[
2
]
==
nbrF
[
1
])
||
(
f
[
2
]
==
nbrF
[
2
]))
&&
((
f
[
2
]
==
nbrF
[
0
])
||
(
f
[
2
]
==
nbrF
[
1
])
||
(
f
[
2
]
==
nbrF
[
2
]))
)
)
{
{
//WarningIn("validTri(const triSurface&, const label)")
WarningIn
(
"validTri(const triSurface&, const label)"
)
// << "triangle " << faceI << " vertices " << f
<<
"triangle "
<<
faceI
<<
" vertices "
<<
f
// << " has the same vertices as triangle " << nbrFaceI
<<
" has the same vertices as triangle "
<<
nbrFaceI
// << " vertices " << nbrF
<<
" vertices "
<<
nbrF
// << endl;
<<
" coords:"
<<
f
.
points
(
surf
.
points
())
<<
endl
;
return
false
;
return
false
;
}
}
...
@@ -170,9 +172,11 @@ int main(int argc, char *argv[])
...
@@ -170,9 +172,11 @@ int main(int argc, char *argv[])
argList
::
validArgs
.
clear
();
argList
::
validArgs
.
clear
();
argList
::
validArgs
.
append
(
"surface file"
);
argList
::
validArgs
.
append
(
"surface file"
);
argList
::
validOptions
.
insert
(
"noSelfIntersection"
,
""
);
argList
::
validOptions
.
insert
(
"noSelfIntersection"
,
""
);
argList
::
validOptions
.
insert
(
"verbose"
,
""
);
argList
args
(
argc
,
argv
);
argList
args
(
argc
,
argv
);
bool
checkSelfIntersection
=
!
args
.
options
().
found
(
"noSelfIntersection"
);
bool
checkSelfIntersection
=
!
args
.
options
().
found
(
"noSelfIntersection"
);
bool
verbose
=
args
.
options
().
found
(
"verbose"
);
fileName
surfFileName
(
args
.
additionalArgs
()[
0
]);
fileName
surfFileName
(
args
.
additionalArgs
()[
0
]);
Pout
<<
"Reading surface from "
<<
surfFileName
<<
" ..."
<<
nl
<<
endl
;
Pout
<<
"Reading surface from "
<<
surfFileName
<<
" ..."
<<
nl
<<
endl
;
...
@@ -232,7 +236,7 @@ int main(int argc, char *argv[])
...
@@ -232,7 +236,7 @@ int main(int argc, char *argv[])
forAll
(
surf
,
faceI
)
forAll
(
surf
,
faceI
)
{
{
if
(
!
validTri
(
surf
,
faceI
))
if
(
!
validTri
(
verbose
,
surf
,
faceI
))
{
{
illegalFaces
.
append
(
faceI
);
illegalFaces
.
append
(
faceI
);
}
}
...
...
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