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
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 |
*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.bat
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\LinearSolversApplication;
Linux: in
configure.sh
add_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
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
Hashes for KratosLinearSolversApplication-10.0.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f94dd6a9ef2db6cbc19db1b20ae732c7ba313856cc36efa4a608faa68593927 |
|
MD5 | 9f990520e88e0b6061b0bab9757b5051 |
|
BLAKE2b-256 | d56be5e33bd22c0e275b3f5309e1522002d316cdc9d700891dfa18da5aa12700 |
Hashes for KratosLinearSolversApplication-10.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70e03ca3c6659f472fc85fad0fc5a9cab244436b7aea6bcb0384b30491ab6106 |
|
MD5 | d0e76cf45047dd2fffabcbad2422746e |
|
BLAKE2b-256 | 4742af965c9453c93176b56a91de29aff360a36ba667aa222a473d1516691cf6 |
Hashes for KratosLinearSolversApplication-10.0.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2eaef6a66e915e148291b29bfa99a202d3e0929c4cc005c85be442726d604a9 |
|
MD5 | c2c811defff4a50817149dbaa8ae3217 |
|
BLAKE2b-256 | 42c9ab86d48b3662c1f88945150f4a72a212711a40886ef8bfb73f50d75e3b38 |
Hashes for KratosLinearSolversApplication-10.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb8436af688b851c454ad2f02925e99c2ba7153e94fa792f1e863bc9087be3e8 |
|
MD5 | 3d593c254551e195c90d5181bd0707fe |
|
BLAKE2b-256 | 060d91f1a7dfd8dfc22bd6a46f6e2eb30c1721803843e4f8cd87f3b2d8551a40 |
Hashes for KratosLinearSolversApplication-10.0.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d808761dfaeff5741d5a5a4e54fbcf8faa0fdf0005ff31c3227248cd27e2415 |
|
MD5 | 00ec1ea40b34c61fa3cac3163b86080f |
|
BLAKE2b-256 | 51ec152a8b5f6f3db093a9baacd4f4b5cefc3f698189cdc15bb19efd1e178341 |
Hashes for KratosLinearSolversApplication-10.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd6955d7abb3da30455f4eace65b5772aeb323989971fe447b64aa7ec9d32159 |
|
MD5 | 9e7096fa5c497948b02191f8df687956 |
|
BLAKE2b-256 | 564479cbb725b44675a4751844371cbd73cc0b74918ca02af28c7617fcff57be |
Hashes for KratosLinearSolversApplication-10.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07766c36b7678af590412252364ee489439f12b0b9da7326008b7072851bb248 |
|
MD5 | 4049ebb15e7a2cc8b89b419a2839ccad |
|
BLAKE2b-256 | 96fd49e1636061ea2b613c494b74a62aac77ebf9472a70574eb65655a7c93910 |
Hashes for KratosLinearSolversApplication-10.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3de7a39faf565ddcd2b6b17ac4f91c1e5c87dab96d2858769db6e91d5dd4dc7 |
|
MD5 | 2356c3a3f054eb80571be697d2639b2f |
|
BLAKE2b-256 | 0ccdec92b0b340adee771ce064aa16bf517fa8c897e9027b04918397c3b8ce10 |
Hashes for KratosLinearSolversApplication-10.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6f65f2396379c6421653e52b3a23e3f1262eb122e5869df5782ef7f9254f3d7 |
|
MD5 | 84d594aac46d329cc254dc95a0890a4b |
|
BLAKE2b-256 | 84e1b8d50f876ddfa8ad1ddae5eb7577475fcfbe04b0c471c4fc56cfae08d011 |
Hashes for KratosLinearSolversApplication-10.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39281a58f6a3667a9fb0d0311ee48f12dbdccb79e394c8e31a36298c1992ac3d |
|
MD5 | 7add31aeb8ba585888ecb6db31853293 |
|
BLAKE2b-256 | 219bba2b6e6a376251f690e81741b89947fcd33698d9ba2fdfce7e4902b4d7af |