Commit a5c5972e authored by Andreas Fabri's avatar Andreas Fabri
Browse files

Suppress warnings concerning gmm.h and perform some static_cast

parent cea5978d
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <iostream> #include <iostream>
#include <vector> #include <vector>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include <CoMISo/Config/CoMISoDefines.hh> #include <CoMISo/Config/CoMISoDefines.hh>
#include <CoMISo/NSolver/NConstraintInterface.hh> #include <CoMISo/NSolver/NConstraintInterface.hh>
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
#include <CoMISo/Config/CoMISoDefines.hh> #include <CoMISo/Config/CoMISoDefines.hh>
#include <CoMISo/Utils/StopWatch.hh> #include <CoMISo/Utils/StopWatch.hh>
#include <CoMISo/Utils/gmm.h>
#include <vector> #include <vector>
#include <cstddef> #include <cstddef>
#include <gmm/gmm.h>
#include "NProblemGmmInterface.hh" #include "NProblemGmmInterface.hh"
#include "NProblemInterface.hh" #include "NProblemInterface.hh"
#include "NProblemIPOPT.hh" #include "NProblemIPOPT.hh"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <Base/Debug/DebConfig.hh> #include <Base/Debug/DebConfig.hh>
#include <Base/Debug/DebTime.hh> #include <Base/Debug/DebTime.hh>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include <IpTNLP.hpp> #include <IpTNLP.hpp>
#include <IpIpoptApplication.hpp> #include <IpIpoptApplication.hpp>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <CoMISo/Config/CoMISoDefines.hh> #include <CoMISo/Config/CoMISoDefines.hh>
#include <iostream> #include <iostream>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
//== FORWARDDECLARATIONS ====================================================== //== FORWARDDECLARATIONS ======================================================
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
//== INCLUDES ================================================================= //== INCLUDES =================================================================
#include <CoMISo/Config/CoMISoDefines.hh> #include <CoMISo/Config/CoMISoDefines.hh>
#include <CoMISo/Utils/gmm.h>
#include <iostream> #include <iostream>
#include <gmm/gmm.h>
//== FORWARDDECLARATIONS ====================================================== //== FORWARDDECLARATIONS ======================================================
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <climits> #include <climits>
#include <CoMISo/Utils/VSToolsT.hh> #include <CoMISo/Utils/VSToolsT.hh>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include <CoMISo/Config/CoMISoDefines.hh> #include <CoMISo/Config/CoMISoDefines.hh>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
//== INCLUDES ================================================================= //== INCLUDES =================================================================
#include <CoMISo/Config/CoMISoDefines.hh> #include <CoMISo/Config/CoMISoDefines.hh>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include "NProblemGmmInterface.hh" #include "NProblemGmmInterface.hh"
#include "LinearConstraintHandlerElimination.hh" #include "LinearConstraintHandlerElimination.hh"
#include "LinearConstraintHandlerPenalty.hh" #include "LinearConstraintHandlerPenalty.hh"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
//== INCLUDES ================================================================= //== INCLUDES =================================================================
#include <CoMISo/Config/CoMISoDefines.hh> #include <CoMISo/Config/CoMISoDefines.hh>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include "NProblemGmmInterface.hh" #include "NProblemGmmInterface.hh"
#include "LinearConstraintHandlerElimination.hh" #include "LinearConstraintHandlerElimination.hh"
#include "LinearConstraintHandlerPenalty.hh" #include "LinearConstraintHandlerPenalty.hh"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
//== INCLUDES ================================================================= //== INCLUDES =================================================================
#include <Base/Utils/StopWatch.hh> #include <Base/Utils/StopWatch.hh>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include "NProblemInterface.hh" #include "NProblemInterface.hh"
#include <CoMISo/Config/CoMISoDefines.hh> #include <CoMISo/Config/CoMISoDefines.hh>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
//== INCLUDES ================================================================= //== INCLUDES =================================================================
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include <CoMISo/Config/CoMISoDefines.hh> #include <CoMISo/Config/CoMISoDefines.hh>
#include <Base/Debug/DebOut.hh> #include <Base/Debug/DebOut.hh>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <Base/Debug/DebTime.hh> #include <Base/Debug/DebTime.hh>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include <IpTNLP.hpp> #include <IpTNLP.hpp>
#include <IpIpoptApplication.hpp> #include <IpIpoptApplication.hpp>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <Base/Debug/DebTime.hh> #include <Base/Debug/DebTime.hh>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include <IpTNLP.hpp> #include <IpTNLP.hpp>
#include <IpIpoptApplication.hpp> #include <IpIpoptApplication.hpp>
...@@ -137,7 +137,7 @@ bool NProblemIPOPT::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g, ...@@ -137,7 +137,7 @@ bool NProblemIPOPT::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
{ {
constraints_[i]->eval_gradient(P(x),g); constraints_[i]->eval_gradient(P(x),g);
nnz_jac_g += g.nonZeros(); nnz_jac_g += static_cast<Index>(g.nonZeros());
if(!hessian_approximation_) if(!hessian_approximation_)
{ {
...@@ -368,8 +368,8 @@ bool NProblemIPOPT::eval_h(Index n, const Number* x, bool new_x, ...@@ -368,8 +368,8 @@ bool NProblemIPOPT::eval_h(Index n, const Number* x, bool new_x,
if(it.row() >= it.col()) if(it.row() >= it.col())
{ {
// it.value(); // it.value();
iRow[gi] = it.row(); iRow[gi] = static_cast<Index>(it.row());
jCol[gi] = it.col(); jCol[gi] = static_cast<Index>(it.col());
++gi; ++gi;
} }
} }
......
...@@ -273,7 +273,7 @@ bool NewtonSolver::factorize(NProblemInterface* _problem, ...@@ -273,7 +273,7 @@ bool NewtonSolver::factorize(NProblemInterface* _problem,
{ {
DEB_enter_func; DEB_enter_func;
const int n = _problem->n_unknowns(); const int n = _problem->n_unknowns();
const int m = _A.rows(); const int m = static_cast<int>(_A.rows());
const int nf = n+m; const int nf = n+m;
// get hessian of quadratic problem // get hessian of quadratic problem
...@@ -288,17 +288,17 @@ bool NewtonSolver::factorize(NProblemInterface* _problem, ...@@ -288,17 +288,17 @@ bool NewtonSolver::factorize(NProblemInterface* _problem,
// add elements of H // add elements of H
for (int k=0; k<H.outerSize(); ++k) for (int k=0; k<H.outerSize(); ++k)
for (SMatrixD::InnerIterator it(H,k); it; ++it) for (SMatrixD::InnerIterator it(H,k); it; ++it)
trips.push_back(Triplet(it.row(),it.col(),it.value())); trips.push_back(Triplet(static_cast<int>(it.row()),static_cast<int>(it.col()),it.value()));
// add elements of _A // add elements of _A
for (int k=0; k<_A.outerSize(); ++k) for (int k=0; k<_A.outerSize(); ++k)
for (SMatrixD::InnerIterator it(_A,k); it; ++it) for (SMatrixD::InnerIterator it(_A,k); it; ++it)
{ {
// insert _A block below // insert _A block below
trips.push_back(Triplet(it.row()+n,it.col(),it.value())); trips.push_back(Triplet(static_cast<int>(it.row())+n,static_cast<int>(it.col()),it.value()));
// insert _A^T block right // insert _A^T block right
trips.push_back(Triplet(it.col(),it.row()+n,it.value())); trips.push_back(Triplet(static_cast<int>(it.col()),static_cast<int>(it.row())+n,it.value()));
} }
// regularize constraints // regularize constraints
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <mpi.h> #include <mpi.h>
#include <tao.h> #include <tao.h>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
//== FORWARDDECLARATIONS ====================================================== //== FORWARDDECLARATIONS ======================================================
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
//== INCLUDES ================================================================= //== INCLUDES =================================================================
#include "NProblemGmmInterface.hh" #include "NProblemGmmInterface.hh"
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include <CoMISo/Config/CoMISoDefines.hh> #include <CoMISo/Config/CoMISoDefines.hh>
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
//== INCLUDES ================================================================= //== INCLUDES =================================================================
#include "ConstrainedSolver.hh" #include "ConstrainedSolver.hh"
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include "GMM_Tools.hh" #include "GMM_Tools.hh"
#include <float.h> #include <float.h>
#include <CoMISo/Utils/MutablePriorityQueueT.hh> #include <CoMISo/Utils/MutablePriorityQueueT.hh>
......
...@@ -72,7 +72,7 @@ bool EigenLDLTSolver::calc_system_eigen( const Eigen_MatrixT& _mat) ...@@ -72,7 +72,7 @@ bool EigenLDLTSolver::calc_system_eigen( const Eigen_MatrixT& _mat)
{ {
DEB_time_func_def; DEB_time_func_def;
n_ = _mat.rows(); n_ = static_cast<unsigned int>(_mat.rows());
ldlt_.compute(_mat); ldlt_.compute(_mat);
return (ldlt_.info()==Eigen::Success); return (ldlt_.info()==Eigen::Success);
} }
......
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
#include <iostream> #include <iostream>
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include <gmm/gmm.h>
#include <CoMISo/Utils/gmm.h>
#if COMISO_SUITESPARSE_AVAILABLE #if COMISO_SUITESPARSE_AVAILABLE
#include <cholmod.h> #include <cholmod.h>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
//== INCLUDES ================================================================= //== INCLUDES =================================================================
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include <deque> #include <deque>
#include <queue> #include <queue>
#include <set> #include <set>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include <Base/Debug/DebOut.hh> #include <Base/Debug/DebOut.hh>
#include <Base/Utils/StopWatch.hh> #include <Base/Utils/StopWatch.hh>
#include <gmm/gmm.h> #include <CoMISo/Utils/gmm.h>
#include <float.h> #include <float.h>
// hack for testing only // hack for testing only
......
Markdown is supported
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