Commit 613e3acd authored by David Bommes's avatar David Bommes
Browse files

update to latest TinyAD

parent d5fb562e
Pipeline #19867 failed with stages
in 12 minutes and 25 seconds
......@@ -67,7 +67,7 @@ public:
H(t.row(), t.col()) += t.value();
// make s.p.d. if necessary
if(!diagonally_dominant(H))
if(!weakly_diagonal_dominant(H))
{
project_to_positive_semidefinite(H);
......@@ -84,7 +84,7 @@ public:
}
template <class MatT>
inline bool diagonally_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;
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment