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
a5c5972e
Commit
a5c5972e
authored
Nov 19, 2018
by
Andreas Fabri
Browse files
Suppress warnings concerning gmm.h and perform some static_cast
parent
cea5978d
Changes
21
Show whitespace changes
Inline
Side-by-side
NSolver/ConstraintTools.hh
View file @
a5c5972e
...
...
@@ -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>
...
...
NSolver/IPOPTSolver.hh
View file @
a5c5972e
...
...
@@ -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"
...
...
NSolver/IPOPTSolverLean.cc
View file @
a5c5972e
...
...
@@ -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>
...
...
NSolver/LinearConstraintHandlerElimination.hh
View file @
a5c5972e
...
...
@@ -13,7 +13,7 @@
#include
<CoMISo/Config/CoMISoDefines.hh>
#include
<iostream>
#include
<
gmm
/gmm.h>
#include
<
CoMISo/Utils
/gmm.h>
//== FORWARDDECLARATIONS ======================================================
...
...
NSolver/LinearConstraintHandlerPenalty.hh
View file @
a5c5972e
...
...
@@ -12,8 +12,8 @@
//== INCLUDES =================================================================
#include
<CoMISo/Config/CoMISoDefines.hh>
#include
<CoMISo/Utils/gmm.h>
#include
<iostream>
#include
<gmm/gmm.h>
//== FORWARDDECLARATIONS ======================================================
...
...
NSolver/NPDerivativeChecker.hh
View file @
a5c5972e
...
...
@@ -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>
...
...
NSolver/NPLinearConstraints.hh
View file @
a5c5972e
...
...
@@ -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"
...
...
NSolver/NPLinearConstraintsT.cc
View file @
a5c5972e
...
...
@@ -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"
...
...
NSolver/NPTiming.hh
View file @
a5c5972e
...
...
@@ -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>
...
...
NSolver/NProblemGmmInterface.hh
View file @
a5c5972e
...
...
@@ -11,7 +11,7 @@
//== INCLUDES =================================================================
#include
<
gmm
/gmm.h>
#include
<
CoMISo/Utils
/gmm.h>
#include
<CoMISo/Config/CoMISoDefines.hh>
#include
<Base/Debug/DebOut.hh>
...
...
NSolver/NProblemIPOPT.hh
View file @
a5c5972e
...
...
@@ -27,7 +27,7 @@
#include
<Base/Debug/DebTime.hh>
#include
<
gmm
/gmm.h>
#include
<
CoMISo/Utils
/gmm.h>
#include
<IpTNLP.hpp>
#include
<IpIpoptApplication.hpp>
...
...
NSolver/NProblemIPOPTc.cc
View file @
a5c5972e
...
...
@@ -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
;
}
}
...
...
NSolver/NewtonSolver.cc
View file @
a5c5972e
...
...
@@ -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
...
...
NSolver/TAOSolver.hh
View file @
a5c5972e
...
...
@@ -20,7 +20,7 @@
#include
<mpi.h>
#include
<tao.h>
#include
<
gmm
/gmm.h>
#include
<
CoMISo/Utils
/gmm.h>
//== FORWARDDECLARATIONS ======================================================
...
...
NSolver/TestInterface.hh
View file @
a5c5972e
...
...
@@ -12,7 +12,7 @@
//== INCLUDES =================================================================
#include
"NProblemGmmInterface.hh"
#include
<
gmm
/gmm.h>
#include
<
CoMISo/Utils
/gmm.h>
#include
<CoMISo/Config/CoMISoDefines.hh>
...
...
Solver/ConstrainedSolverT.cc
View file @
a5c5972e
...
...
@@ -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>
...
...
Solver/EigenLDLTSolverT.cc
View file @
a5c5972e
...
...
@@ -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
);
}
...
...
Solver/GMM_Tools.hh
View file @
a5c5972e
...
...
@@ -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>
...
...
Solver/IterativeSolverT.hh
View file @
a5c5972e
...
...
@@ -11,7 +11,7 @@
//== INCLUDES =================================================================
#include
<
gmm
/gmm.h>
#include
<
CoMISo/Utils
/gmm.h>
#include
<deque>
#include
<queue>
#include
<set>
...
...
Solver/MISolver.cc
View file @
a5c5972e
...
...
@@ -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
...
...
Prev
1
2
Next
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