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
1c646e21
Commit
1c646e21
authored
Jan 19, 2011
by
graham
Browse files
ENH: Using triangle quality without checking - check is now in triangle class.
parent
b1c7bcee
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/utilities/surface/surfaceCheck/surfaceCheck.C
View file @
1c646e21
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-201
0
OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-201
1
OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -315,32 +315,12 @@ int main(int argc, char *argv[])
}
else
{
triPointRef
tri
triQ
[
faceI
]
=
triPointRef
(
surf
.
points
()[
f
[
0
]],
surf
.
points
()[
f
[
1
]],
surf
.
points
()[
f
[
2
]]
);
vector
ba
(
tri
.
b
()
-
tri
.
a
());
ba
/=
mag
(
ba
)
+
VSMALL
;
vector
ca
(
tri
.
c
()
-
tri
.
a
());
ca
/=
mag
(
ca
)
+
VSMALL
;
if
(
mag
(
ba
&
ca
)
>
1
-
1E-3
)
{
triQ
[
faceI
]
=
SMALL
;
}
else
{
triQ
[
faceI
]
=
triPointRef
(
surf
.
points
()[
f
[
0
]],
surf
.
points
()[
f
[
1
]],
surf
.
points
()[
f
[
2
]]
).
quality
();
}
).
quality
();
}
}
...
...
src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H
View file @
1c646e21
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-201
0
OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-201
1
OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -160,7 +160,15 @@ inline Foam::scalar Foam::triangle<Point, PointRef>::circumRadius() const
template
<
class
Point
,
class
PointRef
>
inline
Foam
::
scalar
Foam
::
triangle
<
Point
,
PointRef
>::
quality
()
const
{
return
mag
()
/
(
Foam
::
sqr
(
circumRadius
())
*
3.0
*
sqrt
(
3.0
)
/
4.0
+
VSMALL
);
scalar
c
=
circumRadius
();
if
(
c
<
ROOTVSMALL
)
{
// zero circumRadius, something has gone wrong.
return
SMALL
;
}
return
mag
()
/
(
Foam
::
sqr
(
c
)
*
3.0
*
sqrt
(
3.0
)
/
4.0
);
}
...
...
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