KRATOS Multiphysics ("Kratos") is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Project description
@anchor LinearSolversApplicationMainPage
LinearSolversApplication
The LinearSolversApplication is a thin wrapper for the Eigen linear algebra library.
Direct sparse solvers
The application provides the following direct sparse solvers:
| Python class | solver_type | Matrix kind | Domain | Dependencies |
|---|---|---|---|---|
| SparseLUSolver | sparse_lu |
Square | Real | None |
| SparseQRSolver | sparse_qr |
Rectangular | Real | None |
| SparseCGSolver | sparse_cg |
SPD* | Real | None |
| PardisoLLTSolver | pardiso_llt |
SPD* | Real | Intel® MKL |
| PardisoLDLTSolver | pardiso_ldlt |
SPD* | Real | Intel® MKL |
| PardisoLUSolver | pardiso_lu |
Square | Real | Intel® MKL |
| ComplexSparseLUSolver | sparse_lu_complex |
Square | Complex | None |
| ComplexPardisoLLTSolver | pardiso_llt_complex |
SPD* | Complex | Intel® MKL |
| ComplexPardisoLDLTSolver | pardiso_ldlt_complex |
SPD* | Complex | Intel® MKL |
| ComplexPardisoLUSolver | pardiso_lu_complex |
Square | Complex | Intel® MKL |
| CholmodSolver | cholmod |
SPD* | Real | SuiteSparse |
| UmfPackSolver | umfpack |
Square | Real | SuiteSparse |
| ComplexUmfPackSolver | umfpack_complex |
Square | Complex | SuiteSparse |
| SPQRSolver | spqr |
Rectangular | Real | SuiteSparse |
| ComplexSPQRSolver | spqr_complex |
Rectangular | Complex | SuiteSparse |
*SPD = Symmetric Positive Definite
Example:
{
"solver_type": "eigen_sparse_lu"
}
Direct dense solvers
The application provides the following direct solvers for dense systems of equations:
| Python class | solver_type | Matrix requirements | Domain | Dependencies |
|---|---|---|---|---|
| DenseColPivHouseholderQRSolver** | dense_col_piv_householder_qr |
None | Real | None |
| DenseHouseholderQRSolver** | dense_householder_qr |
None | Real | None |
| DenseLLTSolver** | dense_llt |
SPD* | Real | None |
| DensePartialPivLUSolver** | dense_partial_piv_lu |
Invertible | Real | None |
| ComplexDenseColPivHouseholderQRSolver | complex_dense_col_piv_householder_qr |
None | Complex | None |
| ComplexDenseHouseholderQRSolver | complex_dense_householder_qr |
None | Complex | None |
| ComplexDensePartialPivLUSolver | complex_dense_partial_piv_lu |
Invertible | Complex | None |
*SPD = Symmetric Positive Definite
**Can also be used to solve equation systems with multiple right hand sides.
Generalized eigensystem solvers
The application provides the following generalized eigensystem Ax=λBx solver for sparse matrices.
| Python class | solver_type | Matrix kind A | Matrix kind B | Domain | Dependencies |
|---|---|---|---|---|---|
| EigensystemSolver | eigen_eigensystem |
Symmetric | SPD* | Real | None |
| SpectraSymGEigsShiftSolver | spectra_sym_g_eigs_shift |
Symmetric | SPD* | Real | None |
| FEASTGeneralEigensystemSolver** | feast |
General | General | Real | Intel® MKL |
| ComplexFEASTGeneralEigensystemSolver** | feast_complex |
General | General | Complex | Intel® MKL |
*SPD = Symmetric Positive Definite **A special version for symmetric matrices can be triggered in the solver settings.
EigensystemSolver and SpectraSymGEigsShiftSolver compute the smallest eigenvalues and corresponding eigenvectors of the system. MKL routines are used automatically if they are available.
SpectraSymGEigsShiftSolver interfaces a solver from the Spectra library, and has a shift mode that can be used to compute the smallest eigenvalues > shift.
Example:
{
"solver_type": "spectra_sym_g_eigs_shift",
"number_of_eigenvalues": 3,
"max_iteration": 1000,
"echo_level": 1
}
If the application is compiled with MKL, FEAST 4.0 can be used to solve the generalized eigenvalue problem for real and complex systems (symmetric or unsymmetric). The cmake switch USE_EIGEN_FEAST must be set to ON with
-DUSE_EIGEN_FEAST=ON \
Example:
{
"solver_type": "feast",
"symmetric": true,
"number_of_eigenvalues": 3,
"search_lowest_eigenvalues": true,
"e_min" : 0.0,
"e_max" : 0.2
}
Build instructions
-
Set the required definitions for cmake
As any other app:
Windows: in
configure.batset KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\LinearSolversApplication;
Linux: in
configure.shadd_app ${KRATOS_APP_DIR}/LinearSolversApplication -
Build Kratos
-
Setup the
ProjectParameters.json"linear_solver_settings": { "solver_type" : "LinearSolversApplication.sparse_lu" }
-
Run the simulation
Enable MKL (optional)
In case you have installed MKL (see below), you can also use the Pardiso solvers.
-
Run the MKL setup script before building Kratos:
Windows:
call "C:\Program Files (x86)\Intel\oneAPI\mkl\latest\env\vars.bat" intel64 lp64
Linux:
source /opt/intel/oneapi/setvars.sh intel64 -
Add the following flag to CMake to your configure script:
Windows:
-DUSE_EIGEN_MKL=ON ^Linux:
-DUSE_EIGEN_MKL=ON \ -
Build Kratos
-
Usage:
Windows:
call "C:\Program Files (x86)\Intel\oneAPI\mkl\latest\env\vars.bat" intel64 lp64
Linux:
Set the environment before using MKL
source /opt/intel/oneapi/setvars.sh intel64
Install MKL on Ubuntu with apt
Intel MKL can be installed with apt on Ubuntu. A guide can be found in here. For example to install the MKL 2022 version
sudo bash
# <type your user password when prompted. this will put you in a root shell>
# If they are not installed, you can install using the following command:
sudo apt update
sudo apt -y install cmake pkg-config build-essential
# use wget to fetch the Intel repository public key
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# add to your apt sources keyring so that archives signed with this key will be trusted.
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# remove the public key
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
# Configure apt client to use Intel repository
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
# Install all MKL related dependencies. You can install full HPC with: sudo apt install intel-hpckit
sudo apt install intel-oneapi-mkl-devel
# Exit
exit
To enable the MKL environment (needs to be done before build/run) use
source /opt/intel/oneapi/setvars.sh intel64
Enable SuiteSparse (optional)
SuiteSparse is a collection of open-source sparse matrix algorithms, including efficient implementations of various factorizations. Kratos currently provides wrappers for CHOLMOD, UMFPACK, and SPQR.
Install the SuiteSparse package on your system, and set the USE_EIGEN_SUITESPARSE flag in your CMake configuration to ON. One way of doing this is appending the list of arguments you pass to CMake in your configure script with:
-DUSE_EIGEN_SUITESPARSE:BOOL=ON
Installing SuiteSparse
-
Arch Linux
- SuiteSparse is available through your package manager.
sudo pacman -S suitesparse
-
Debian (and derivatives, including Ubuntu)
- SuiteSparse is available through your package manager.
sudo apt install libsuitesparse-dev
-
Fedora (and derivatives, including RHEL)
- SuiteSparse is available through your package manager.
sudo dnf install suitesparse-devel
-
MacOS
- SuiteSparse is available on Homebrew for both Intel and Apple Silicon machines.
brew install suite-sparse
-
Windows
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 936.1 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10bf448ca4046112937fb4b816f4a27214790f6a1f785da07cc5a62f8d7ee6a7
|
|
| MD5 |
d0479f39c4fcaa93833ffdac3998fff9
|
|
| BLAKE2b-256 |
b462777130b84a75ff1a15d628a3cfdcd8676d6e6b7747ab5c5bf7cbd447cad3
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp314-cp314-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp314-cp314-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.14, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b6a97622f8bfa778f358896e686705262835dc7d224d63737782a3d1ac974b6
|
|
| MD5 |
57455567ff97d50f45d06bd3fb4f1035
|
|
| BLAKE2b-256 |
edb53fa097e1afd9e0b1874c2d4118d480fda01098a17889dcb674b0fb96cd86
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 908.5 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0df04021005afc0000c5a2a275efd91a7f754baea2314bb30e21302c232fa8e
|
|
| MD5 |
6655114c78b959409bb03a7026c0ebbe
|
|
| BLAKE2b-256 |
bdb273d954dca5b96cfb975c9375ce27591bfcea9cd310a181495ead6031b1c4
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5dcacb78fef2e51140b02a0989678cec9fea0745f16b29a887a544d30a8de96
|
|
| MD5 |
0375f32a83da964d7d4c5b8cc968a233
|
|
| BLAKE2b-256 |
1e32f37d34fb97d24fcae70517bbcc0c9691934aab3451429ff3ccbbdbe71484
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 908.6 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a377cc2dfe84aeffdbe8c00aca642f0a1af7d6d8199247f83884f3536c34bf96
|
|
| MD5 |
c3ee6a7d6873cfaf4406d09859a971a2
|
|
| BLAKE2b-256 |
05cbd47651dba67086c2b6ff2d634df4defa389288c89a88a8798575bde63064
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86afbbbd9cdf51d65018599607eb9c37405157c586edcd72dd08b031aae04a7a
|
|
| MD5 |
86145ac52837035e40c26c67b9ddc226
|
|
| BLAKE2b-256 |
a168a442e52daf6b9e70a95ca8a6c16fdc42000b92c3a71fda603bb320d2e440
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 907.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35e8b8d6cce9493cb4cf5e11f1f338efc5a72929938538a9e9271164b783cfda
|
|
| MD5 |
3158fd9c517614419b954a94005d6d75
|
|
| BLAKE2b-256 |
6f592edf4668b34235c2c279f1bb278f75b427ac5803f842cef5beebe908ffb0
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25be70d92d52da22165f12639673eacd9fad2e2f14c70c309350dde0bf18d4cd
|
|
| MD5 |
ca9a544e4cf0cf0b4343ca6b926e4c71
|
|
| BLAKE2b-256 |
8a30f31b7867c621ea6d78408196d91762176684ffe535ee67e73990212d0354
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 907.1 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f5317b015541a07669921b71428ab310539ab8c2a5eefd41c314660b37d987a
|
|
| MD5 |
d4c48d73b5444e24ba3e1ced3bb8deb4
|
|
| BLAKE2b-256 |
8ac523156ae8da8fad58a4020c2e83660c173c1d4f13900549f7bc6b746ceb24
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp310-cp310-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79b75d2e9e7b88c36db3dca71afe5d2d127b1ef65967a22b8f8ab9b3a9af454b
|
|
| MD5 |
df379cb10835ca4d724f3462ba24cad1
|
|
| BLAKE2b-256 |
72e3c4c7b0897cc15db911a8a23e158e0608c1d999c24ee484740000c978d5ca
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 903.5 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b293df24fe790bfcbac26f88b7127f0fba7632386a5ce381e4f672300d484b93
|
|
| MD5 |
32f02110f30cb75d8636134e01f7ab23
|
|
| BLAKE2b-256 |
21f1c7fedbc9b608a06d4eb839575e20ef9d3709557d0f89871d5956d72090af
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp39-cp39-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
171bc56db24978d3ec5e4dacff3b2a297cc7b56142c4e901c4fd41c2d10e6428
|
|
| MD5 |
5b6dd0577d6c36048d14099864cc439c
|
|
| BLAKE2b-256 |
fcacbc004a76ec2496ae89ce2575ad4fe443b5ec811f99648407c9e9675ae263
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 907.3 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c799b8afc7c94e7bed4f8017f115f2055c54566dbdf47a235489766f96aa958e
|
|
| MD5 |
62b7d38eff2afaf884a042fe76563d3b
|
|
| BLAKE2b-256 |
fc15cf6963bfd5e35f4d96f74b5f0d686f2cae01ea34c2a0aca61de9473c6b8a
|
File details
Details for the file kratoslinearsolversapplication-10.4.0-cp38-cp38-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: kratoslinearsolversapplication-10.4.0-cp38-cp38-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef122fe8aff4ac41608f623e0d6ba92658ce478b89ec1d4975e043f2a0ea2576
|
|
| MD5 |
4b4616cc18e4cf50b8715dc2050fa7de
|
|
| BLAKE2b-256 |
528654ae2e55fd483cb7135868d6603e9bac15d15108a481db961336a1e0e6fc
|