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
41880c27
Commit
41880c27
authored
Nov 21, 2008
by
Mark Olesen
Browse files
added triFace::reverseFace() for symmetry with face class
parent
fa69fd66
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/meshShapes/triFace/triFace.H
View file @
41880c27
...
...
@@ -124,6 +124,9 @@ public:
//- Return vector normal
inline
vector
normal
(
const
pointField
&
)
const
;
//- Return face with reverse direction
inline
triFace
reverseFace
()
const
;
//- Return swept-volume
inline
scalar
sweptVol
(
...
...
src/OpenFOAM/meshes/meshShapes/triFace/triFaceI.H
View file @
41880c27
...
...
@@ -78,9 +78,9 @@ inline Foam::triFace::triFace
}
inline
Foam
::
triFace
::
triFace
(
const
UList
<
label
>&
l
)
inline
Foam
::
triFace
::
triFace
(
const
UList
<
label
>&
l
st
)
:
FixedList
<
label
,
3
>
(
l
)
FixedList
<
label
,
3
>
(
l
st
)
{}
...
...
@@ -96,7 +96,7 @@ inline Foam::label Foam::triFace::collapse()
{
// we cannot resize a FixedList, so mark duplicates with '-1'
// (the lower vertex is retained)
// catch any '-1'
- ie
, if called twice
// catch any '-1'
(eg
, if called twice
)
label
n
=
3
;
if
(
operator
[](
0
)
==
operator
[](
1
)
||
operator
[](
1
)
==
-
1
)
...
...
@@ -154,13 +154,13 @@ inline Foam::edgeList Foam::triFace::edges() const
edgeList
e
(
3
);
e
[
0
].
start
()
=
operator
[](
0
);
e
[
0
].
end
()
=
operator
[](
1
);
e
[
0
].
end
()
=
operator
[](
1
);
e
[
1
].
start
()
=
operator
[](
1
);
e
[
1
].
end
()
=
operator
[](
2
);
e
[
1
].
end
()
=
operator
[](
2
);
e
[
2
].
start
()
=
operator
[](
2
);
e
[
2
].
end
()
=
operator
[](
0
);
e
[
2
].
end
()
=
operator
[](
0
);
return
e
;
}
...
...
@@ -213,7 +213,7 @@ inline Foam::scalar Foam::triFace::mag(const pointField& points) const
return
::
Foam
::
mag
(
normal
(
points
));
}
// could also delegate to triPointRef(...).normal()
inline
Foam
::
vector
Foam
::
triFace
::
normal
(
const
pointField
&
points
)
const
{
return
0
.
5
*
...
...
@@ -224,6 +224,13 @@ inline Foam::vector Foam::triFace::normal(const pointField& points) const
}
inline
Foam
::
triFace
Foam
::
triFace
::
reverseFace
()
const
{
// The starting points of the original and reverse face are identical.
return
triFace
(
operator
[](
0
),
operator
[](
2
),
operator
[](
1
));
}
inline
Foam
::
scalar
Foam
::
triFace
::
sweptVol
(
const
pointField
&
opts
,
...
...
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