feat(KINSOL): Switch from Eigen to KINSOL
Previously QSE solving was done using Eigen. While this worked we were limited in the ability to use previous iterations to speed up later steps. We have switched to KINSOL, from SUNDIALS, for linear solving. This has drastically speed up the process of solving for QSE abundances, primarily because the jacobian matrix does not need to be generated every single time time a QSE abundance is requested.
This commit is contained in:
@@ -3,7 +3,7 @@ cmake = import('cmake')
|
||||
subdir('fourdst')
|
||||
subdir('libplugin')
|
||||
|
||||
subdir('cvode')
|
||||
subdir('sundials')
|
||||
|
||||
subdir('boost')
|
||||
subdir('cppad')
|
||||
|
||||
@@ -34,7 +34,7 @@ sundials_sunmatrixdense_dep = cvode_sp.dependency('sundials_sunmatrixdense_share
|
||||
# For the dense linear solver library
|
||||
sundials_sunlinsoldense_dep = cvode_sp.dependency('sundials_sunlinsoldense_shared')
|
||||
|
||||
sundials_dep = declare_dependency(
|
||||
cvode_dep = declare_dependency(
|
||||
dependencies: [
|
||||
sundials_core_dep,
|
||||
sundials_cvode_dep,
|
||||
29
build-config/sundials/kinsol/meson.build
Normal file
29
build-config/sundials/kinsol/meson.build
Normal file
@@ -0,0 +1,29 @@
|
||||
cmake = import('cmake')
|
||||
|
||||
kinsol_cmake_options = cmake.subproject_options()
|
||||
|
||||
kinsol_cmake_options.add_cmake_defines({
|
||||
'CMAKE_CXX_FLAGS' : '-Wno-deprecated-declarations',
|
||||
'CMAKE_C_FLAGS' : '-Wno-deprecated-declarations',
|
||||
'BUILD_SHARED_LIBS' : 'ON',
|
||||
'BUILD_STATIC_LIBS' : 'OFF',
|
||||
})
|
||||
|
||||
kinsol_cmake_options.add_cmake_defines({
|
||||
'CMAKE_INSTALL_LIBDIR': get_option('libdir'),
|
||||
'CMAKE_INSTALL_INCLUDEDIR': get_option('includedir')
|
||||
})
|
||||
|
||||
kinsol_sp = cmake.subproject(
|
||||
'kinsol',
|
||||
options: kinsol_cmake_options,
|
||||
)
|
||||
|
||||
sundials_kinsol_shared = kinsol_sp.dependency('sundials_kinsol_shared')
|
||||
|
||||
kinsol_dep = declare_dependency(
|
||||
dependencies: [
|
||||
sundials_kinsol_shared,
|
||||
]
|
||||
)
|
||||
|
||||
9
build-config/sundials/meson.build
Normal file
9
build-config/sundials/meson.build
Normal file
@@ -0,0 +1,9 @@
|
||||
subdir('cvode')
|
||||
subdir('kinsol')
|
||||
|
||||
sundials_dep = declare_dependency(
|
||||
dependencies: [
|
||||
cvode_dep,
|
||||
kinsol_dep,
|
||||
],
|
||||
)
|
||||
Reference in New Issue
Block a user