Skip to content
Snippets Groups Projects
Commit 5056c339 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Merge branch 'develop' into feature/language

parents 37cfe13d ea0c5bad
No related branches found
No related tags found
1 merge request!37Feature/language
...@@ -112,6 +112,26 @@ if (PUGS_ENABLE_MPI MATCHES "^(AUTO|ON)$") ...@@ -112,6 +112,26 @@ if (PUGS_ENABLE_MPI MATCHES "^(AUTO|ON)$")
find_package(MPI) find_package(MPI)
endif() endif()
#------------------------------------------------------
# Search for ParMETIS
if(${MPI_FOUND})
find_package(ParMETIS)
if (NOT PARMETIS_LIBRARIES)
if(PUGS_ENABLE_MPI MATCHES "^AUTO$")
message(WARNING "MPI support deactivated: ParMETIS cannot be found!")
unset(MPI_FOUND)
unset(MPI_CXX_LINK_FLAGS)
unset(MPI_CXX_LIBRARIES)
else()
message(FATAL_ERROR "MPI support requires ParMETIS which cannot be found!")
endif()
endif()
endif()
# -----------------------------------------------------
if (${MPI_FOUND}) if (${MPI_FOUND})
set(PUGS_CXX_FLAGS "${PUGS_CXX_FLAGS} ${MPI_CXX_COMPILER_FLAGS}") set(PUGS_CXX_FLAGS "${PUGS_CXX_FLAGS} ${MPI_CXX_COMPILER_FLAGS}")
include_directories(SYSTEM ${MPI_CXX_INCLUDE_DIRS}) include_directories(SYSTEM ${MPI_CXX_INCLUDE_DIRS})
...@@ -308,13 +328,6 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Coverage") ...@@ -308,13 +328,6 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Coverage")
endif() endif()
endif() endif()
#------------------------------------------------------
# Search for ParMETIS
if(${MPI_FOUND})
find_package(ParMETIS REQUIRED)
endif()
# ----------------------------------------------------- # -----------------------------------------------------
link_libraries("-rdynamic") link_libraries("-rdynamic")
......
...@@ -20,8 +20,7 @@ class TinyMatrix ...@@ -20,8 +20,7 @@ class TinyMatrix
static_assert((N > 0), "TinyMatrix size must be strictly positive"); static_assert((N > 0), "TinyMatrix size must be strictly positive");
PUGS_FORCEINLINE PUGS_FORCEINLINE
constexpr size_t constexpr size_t _index(const size_t& i, const size_t& j) const noexcept // LCOV_EXCL_LINE (due to forced inline)
_index(const size_t& i, const size_t& j) const noexcept
{ {
return i * N + j; return i * N + j;
} }
...@@ -344,8 +343,6 @@ det(const TinyMatrix<N, T>& A) ...@@ -344,8 +343,6 @@ det(const TinyMatrix<N, T>& A)
} }
} }
const size_t I = index[i]; const size_t I = index[i];
if (M(I, i) == 0)
return 0;
const T inv_Mii = 1. / M(I, i); const T inv_Mii = 1. / M(I, i);
for (size_t k = i + 1; k < N; ++k) { for (size_t k = i + 1; k < N; ++k) {
const size_t K = index[k]; const size_t K = index[k];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment