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
9be1772e
Commit
9be1772e
authored
Feb 19, 2020
by
Kutalmış Berçin
Committed by
Mark OLESEN
Feb 19, 2020
Browse files
BUG: surfaceInertia analytic eigendecomposition (fixes #1599)
- was missing cast to symmTensor
parent
e3f681fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/test/momentOfInertia/Test-momentOfInertia.C
View file @
9be1772e
...
...
@@ -82,9 +82,9 @@ int main(int argc, char *argv[])
J
=
f
.
inertia
(
pts
,
Cf
,
density
);
vector
eVal
=
eigenValues
(
J
);
vector
eVal
=
eigenValues
(
symm
(
J
)
);
tensor
eVec
=
eigenVectors
(
J
);
tensor
eVec
=
eigenVectors
(
symm
(
J
)
);
Info
<<
nl
<<
"Inertia tensor of test face "
<<
J
<<
nl
<<
"eigenValues (principal moments) "
<<
eVal
<<
nl
...
...
@@ -148,9 +148,9 @@ int main(int argc, char *argv[])
momentOfInertia
::
massPropertiesSolid
(
pts
,
tetFaces
,
density
,
m
,
cM
,
J
);
vector
eVal
=
eigenValues
(
J
);
vector
eVal
=
eigenValues
(
symm
(
J
)
);
tensor
eVec
=
eigenVectors
(
J
);
tensor
eVec
=
eigenVectors
(
symm
(
J
)
);
Info
<<
nl
<<
"Mass of tetrahedron "
<<
m
<<
nl
...
...
@@ -204,7 +204,7 @@ int main(int argc, char *argv[])
tensor
&
J
=
mI
[
celli
];
vector
eVal
=
eigenValues
(
J
);
vector
eVal
=
eigenValues
(
symm
(
J
)
);
Info
<<
nl
<<
"Inertia tensor of cell "
<<
celli
<<
" "
<<
J
<<
nl
...
...
@@ -212,7 +212,7 @@ int main(int argc, char *argv[])
J
/=
cmptMax
(
eVal
);
tensor
eVec
=
eigenVectors
(
J
);
tensor
eVec
=
eigenVectors
(
symm
(
J
)
);
Info
<<
"eigenVectors (principal axes, from normalised inertia) "
<<
eVec
<<
endl
;
...
...
applications/utilities/surface/surfaceInertia/surfaceInertia.C
View file @
9be1772e
...
...
@@ -115,9 +115,9 @@ int main(int argc, char *argv[])
<<
"Negative mass detected, the surface may be inside-out."
<<
endl
;
}
vector
eVal
=
eigenValues
(
J
);
vector
eVal
=
eigenValues
(
symm
(
J
)
);
tensor
eVec
=
eigenVectors
(
J
);
tensor
eVec
=
eigenVectors
(
symm
(
J
)
);
label
pertI
=
0
;
...
...
@@ -133,9 +133,9 @@ int main(int argc, char *argv[])
J
.
yy
()
*=
1
.
0
+
SMALL
*
rand
.
sample01
<
scalar
>
();
J
.
zz
()
*=
1
.
0
+
SMALL
*
rand
.
sample01
<
scalar
>
();
eVal
=
eigenValues
(
J
);
eVal
=
eigenValues
(
symm
(
J
)
);
eVec
=
eigenVectors
(
J
);
eVec
=
eigenVectors
(
symm
(
J
)
);
pertI
++
;
}
...
...
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