Commit a5c5972e authored by Andreas Fabri's avatar Andreas Fabri

Suppress warnings concerning gmm.h and perform some static_cast

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