Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
CoMISo
Commits
613e3acd
Commit
613e3acd
authored
Jan 04, 2022
by
David Bommes
Browse files
update to latest TinyAD
parent
d5fb562e
Pipeline
#19867
failed with stages
in 12 minutes and 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
NSolver/FiniteElementHessianProjection.hh
View file @
613e3acd
...
...
@@ -67,7 +67,7 @@ public:
H
(
t
.
row
(),
t
.
col
())
+=
t
.
value
();
// make s.p.d. if necessary
if
(
!
diagonal
ly
_dominant
(
H
))
if
(
!
weakly_
diagonal_dominant
(
H
))
{
project_to_positive_semidefinite
(
H
);
...
...
@@ -84,7 +84,7 @@ public:
}
template
<
class
MatT
>
inline
bool
diagonal
ly
_dominant
(
const
MatT
&
_A
)
const
inline
bool
weakly_
diagonal_dominant
(
const
MatT
&
_A
)
const
{
// only works for square matrices
assert
(
_A
.
cols
()
==
_A
.
rows
());
...
...
@@ -95,7 +95,7 @@ public:
for
(
unsigned
int
j
=
0
;
j
<
_A
.
cols
();
++
j
)
asum
+=
std
::
abs
(
_A
(
i
,
j
));
double
d
=
std
::
abs
(
_A
(
i
,
i
)
)
;
double
d
=
_A
(
i
,
i
);
if
(
2
*
d
<
asum
)
return
false
;
...
...
NSolver/FiniteElementTinyAD.hh
View file @
613e3acd
...
...
@@ -19,7 +19,7 @@
#include
<Eigen/Dense>
#include
<Eigen/Sparse>
#include
<TinyAD/
TinyAD
.hh>
#include
<TinyAD/
Scalar
.hh>
//== FORWARDDECLARATIONS ======================================================
...
...
@@ -75,7 +75,8 @@ public:
auto
f
=
ElementT
::
eval_f
(
x_ad
,
_c
);
auto
H
=
f
.
Hess
.
template
selfadjointView
<
Eigen
::
Lower
>();
// auto H = f.Hess.template selfadjointView<Eigen::Lower>();
auto
H
=
f
.
Hess
;
_triplets
.
clear
();
for
(
unsigned
int
i
=
0
;
i
<
H
.
rows
();
++
i
)
...
...
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