diff --git a/src/include/serif/utils/checks/finite.hpp b/src/include/serif/utils/checks/finite.hpp index 940b745a..f1e63cca 100644 --- a/src/include/serif/utils/checks/finite.hpp +++ b/src/include/serif/utils/checks/finite.hpp @@ -2,35 +2,10 @@ #include -#include "mfem/linalg/vector.hpp" -#include "mfem/linalg/densemat.hpp" #include "serif/utils/misc/concepts/numeric.hpp" namespace serif::utils::checks { - // If we have a new backend / new vector and matrix type in the future we can add new overloads - inline bool is_finite(const mfem::Vector& vector) { - for (int i = 0; i < vector.Size(); ++i) { - if (!std::isfinite(vector(i))) { - return false; - } - } - - return true; - } - - inline bool is_finite(const mfem::DenseMatrix& matrix) { - for (int i = 0; i < matrix.Height(); ++i) { - for (int j = 0; j < matrix.Width(); ++j) { - if (!std::isfinite(matrix(i, j))) { - return false; - } - } - } - - return true; - } - template requires requires (Scalar x) {{std::isfinite(x)} -> std::convertible_to; } bool is_finite(const Scalar scalar) {