From 539186253be74e309ede0a43579e611832353739 Mon Sep 17 00:00:00 2001 From: Charlie Vanaret Date: Wed, 16 Oct 2024 23:46:37 +0200 Subject: [PATCH] Added missing includes (for some compilers) and fixed implicit type conversion --- uno/linear_algebra/COOSparseStorage.hpp | 1 + uno/linear_algebra/CSCSparseStorage.hpp | 1 + uno/solvers/MUMPS/MUMPSSolver.cpp | 2 +- uno/tools/Statistics.cpp | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/uno/linear_algebra/COOSparseStorage.hpp b/uno/linear_algebra/COOSparseStorage.hpp index e04b8aa7..02f9cf5c 100644 --- a/uno/linear_algebra/COOSparseStorage.hpp +++ b/uno/linear_algebra/COOSparseStorage.hpp @@ -5,6 +5,7 @@ #define UNO_COOSPARSESTORAGE_H #include +#include #include "SparseStorage.hpp" #include "symbolic/Range.hpp" diff --git a/uno/linear_algebra/CSCSparseStorage.hpp b/uno/linear_algebra/CSCSparseStorage.hpp index 324ca412..6d974d02 100644 --- a/uno/linear_algebra/CSCSparseStorage.hpp +++ b/uno/linear_algebra/CSCSparseStorage.hpp @@ -5,6 +5,7 @@ #define UNO_CSCSPARSESTORAGE_H #include +#include #include "SparseStorage.hpp" #include "linear_algebra/Vector.hpp" #include "tools/Infinity.hpp" diff --git a/uno/solvers/MUMPS/MUMPSSolver.cpp b/uno/solvers/MUMPS/MUMPSSolver.cpp index 827b8654..1a7fc5ed 100644 --- a/uno/solvers/MUMPS/MUMPSSolver.cpp +++ b/uno/solvers/MUMPS/MUMPSSolver.cpp @@ -68,7 +68,7 @@ namespace uno { std::tuple MUMPSSolver::get_inertia() const { const size_t number_negative_eigenvalues = this->number_negative_eigenvalues(); const size_t number_zero_eigenvalues = this->number_zero_eigenvalues(); - const size_t number_positive_eigenvalues = this->mumps_structure.n - (number_negative_eigenvalues + number_zero_eigenvalues); + const size_t number_positive_eigenvalues = static_cast(this->mumps_structure.n) - (number_negative_eigenvalues + number_zero_eigenvalues); return std::make_tuple(number_positive_eigenvalues, number_negative_eigenvalues, number_zero_eigenvalues); } diff --git a/uno/tools/Statistics.cpp b/uno/tools/Statistics.cpp index 1745b1c4..ee1a4f8b 100644 --- a/uno/tools/Statistics.cpp +++ b/uno/tools/Statistics.cpp @@ -1,6 +1,7 @@ // Copyright (c) 2018-2024 Charlie Vanaret // Licensed under the MIT license. See LICENSE file in the project directory for details. +#include #include #include #include "Statistics.hpp"