Skip to main content

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

  1. 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
    
  2. Build Kratos

  3. Setup the ProjectParameters.json

    "linear_solver_settings": {
        "solver_type" : "LinearSolversApplication.sparse_lu"
    }
    
  4. Run the simulation

Enable MKL (optional)

In case you have installed MKL (see below), you can also use the Pardiso solvers.

  1. 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
    
  2. Add the following flag to CMake to your configure script:

    Windows:

    -DUSE_EIGEN_MKL=ON ^
    

    Linux:

    -DUSE_EIGEN_MKL=ON \
    
  3. Build Kratos

  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

KratosLinearSolversApplication-10.1.0-cp312-cp312-win_amd64.whl (899.1 kB view details)

Uploaded CPython 3.12 Windows x86-64

KratosLinearSolversApplication-10.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

KratosLinearSolversApplication-10.1.0-cp311-cp311-win_amd64.whl (897.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

KratosLinearSolversApplication-10.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

KratosLinearSolversApplication-10.1.0-cp310-cp310-win_amd64.whl (897.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

KratosLinearSolversApplication-10.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

KratosLinearSolversApplication-10.1.0-cp39-cp39-win_amd64.whl (893.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

KratosLinearSolversApplication-10.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

KratosLinearSolversApplication-10.1.0-cp38-cp38-win_amd64.whl (897.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

KratosLinearSolversApplication-10.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

File details

Details for the file KratosLinearSolversApplication-10.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: KratosLinearSolversApplication-10.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 899.1 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.31.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/6.8.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for KratosLinearSolversApplication-10.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5afe8521aadd89fcf83ad8f70ec5e990e3ada32778da46b131b8c8d186ce925b
MD5 009e06a7732ac174b2713605862a9b0c
BLAKE2b-256 3174fa94359c579237bd205e2f8a1f8ba050961df376b3028970be342fe2b07d

See more details on using hashes here.

File details

Details for the file KratosLinearSolversApplication-10.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for KratosLinearSolversApplication-10.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be007464988a7135a5d785a1a766146ff9329a376b86365a03ba710b2bfeac7f
MD5 451d69ccf2f8cdc926736c301a1efd66
BLAKE2b-256 57f4b1bde40d35da26898f10997f32fe30b61571faca5feb7d45be7bc1dc21f8

See more details on using hashes here.

File details

Details for the file KratosLinearSolversApplication-10.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: KratosLinearSolversApplication-10.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 897.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.31.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/6.8.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for KratosLinearSolversApplication-10.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 93ce2815801094ba748b6622e141b3f7b983f8524c399910ea93cf14856391d7
MD5 65c8753a906096b413a669806f8de317
BLAKE2b-256 b18532d92f0310acd7f62fe04b0ea86aae4ee1232fd3acb90274e0a27802489c

See more details on using hashes here.

File details

Details for the file KratosLinearSolversApplication-10.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for KratosLinearSolversApplication-10.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d5ff0adfa7d536858eac4ca64353645d7d78ccaaa61180ef468aca00da1c0b5
MD5 7d9ab5f4fce097f32ae518a494fd3bf1
BLAKE2b-256 ae2895f025c8496d6d8e9d150d593d288e9db5eaafc28d0c2b2c9ed8f03ac6a3

See more details on using hashes here.

File details

Details for the file KratosLinearSolversApplication-10.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: KratosLinearSolversApplication-10.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 897.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.31.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/6.8.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for KratosLinearSolversApplication-10.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 05adf2395882a92e1ace935bcc2afed53d87b5f0d5a68a4f5890be1b17aaa301
MD5 54c036de60ee08185ae5ba98749d4dc8
BLAKE2b-256 578b870c2d4811ba029d5284c182cd3aab6c86a5f96eafcb98375c7944c9e124

See more details on using hashes here.

File details

Details for the file KratosLinearSolversApplication-10.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for KratosLinearSolversApplication-10.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 482a4d556358ca2e0df441df7b22d3790d8cdf3d2cf936ae7ed7c4fa21260abb
MD5 d17e6579050d97ee4a56c6f545c0f33a
BLAKE2b-256 55b7392082a51488f2384f55da34afc274e81c777251330886c99ac70085a107

See more details on using hashes here.

File details

Details for the file KratosLinearSolversApplication-10.1.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: KratosLinearSolversApplication-10.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 893.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.31.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/6.8.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for KratosLinearSolversApplication-10.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4661f673309ae2fc44c63b2ae6e64bc77f1b03bcf1f5a0ac99ab403b4afeccb9
MD5 c736be05d776d6eecebab544ff5d39d0
BLAKE2b-256 3da42620d3035b84526aeee54e4fec1639fca46911173eac968546cc6c41c4d1

See more details on using hashes here.

File details

Details for the file KratosLinearSolversApplication-10.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for KratosLinearSolversApplication-10.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 869843daf9adb2cfc3f0ee27f94a5fa74a35bd14dd8618ead906c9c8f6390eeb
MD5 851731cc5d9eb76e1fa326f7eaacd903
BLAKE2b-256 75400de30da6c96ca4d38b9e1ad37d880619fe90ef1df11fd9ead3633719615d

See more details on using hashes here.

File details

Details for the file KratosLinearSolversApplication-10.1.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: KratosLinearSolversApplication-10.1.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 897.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.31.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/6.8.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11

File hashes

Hashes for KratosLinearSolversApplication-10.1.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 10375e16d7ead4dd84c86fd3d671d2a0efc4b5f9c686c938e75a20b741181689
MD5 e966eee32c2339219cee52d4f6768f74
BLAKE2b-256 f02d7cea52299a6441652a6e19fcb40eb3fee09f40c9e6bac1261ded9141b2eb

See more details on using hashes here.

File details

Details for the file KratosLinearSolversApplication-10.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for KratosLinearSolversApplication-10.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25bee2ecbb0d83f9513e0febbeef35a9d141869ceb0cbd5c06f2091e62d78b03
MD5 4d1e85230f5e9f8d5ddb45bf1fa3286c
BLAKE2b-256 ab61e530ffbcffc3c5089dffbb767e840663a1ee64f575a5c07b12b5dccb4dfd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page