Skip to content
Snippets Groups Projects
Commit 7471e5e9 authored by Lars Bilke's avatar Lars Bilke
Browse files

Added CMake option OGS_EIGEN_DYNAMIC for using dyn. all. matrices.

parent defb32b5
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,7 @@ option(OGS_USE_MPI "Use MPI" OFF)
# Eigen
option(OGS_USE_EIGEN "Use EIGEN for local matrix and vector" ON)
option(OGS_EIGEN_DYNAMIC "Use dynamically allocated shape matrices" OFF)
option(EIGEN_NO_DEBUG "Disables Eigen's assertions" OFF)
# Logging
......@@ -130,6 +131,9 @@ if(OGS_USE_EIGEN)
if (EIGEN_NO_DEBUG)
add_definitions(-DEIGEN_NO_DEBUG)
endif()
if(OGS_EIGEN_DYNAMIC)
add_definitions(-DEIGEN_DYNAMIC_MATRICES)
endif()
endif()
######################
......
......@@ -107,8 +107,11 @@ struct EigenDynamicShapeMatrixPolicy
/// Default choice of the ShapeMatrixPolicy.
template <typename ShapeFunction, unsigned GlobalDim>
#if EIGEN_DYNAMIC_MATRICES
using ShapeMatrixPolicyType = EigenDynamicShapeMatrixPolicy<ShapeFunction, GlobalDim>;
#else
using ShapeMatrixPolicyType = EigenFixedShapeMatrixPolicy<ShapeFunction, GlobalDim>;
//using ShapeMatrixPolicyType = EigenDynamicShapeMatrixPolicy<ShapeFunction, GlobalDim>;
#endif
#endif // OGS_USE_EIGEN
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment