Skip to content

The software is an implementation of the enriched subspace iteration method for solving the generalized eigenvalue problems.

License

Notifications You must be signed in to change notification settings

ktkimit/esubspace

Repository files navigation

The enriched subspace iteration method

Introduction

The enriched subspace iteration method is to find the smallest $p$ eigenvalues $(\lambda_i; i = 1, \ldots, p)$ and the corresponding eigenvectors $(\boldsymbol{\phi}_i; i = 1, \ldots, p)$ that satisfy

$$ \mathbf{K} \boldsymbol{\phi}_i = \lambda_i \mathbf{M} \boldsymbol{\phi}_i; \quad i = 1, \ldots, p $$

and

$$ \begin{align*} \boldsymbol{\phi}_i^T \mathbf{M} \boldsymbol{\phi}j &= \delta{ij}, \ \boldsymbol{\phi}_i^T \mathbf{K} \boldsymbol{\phi}j &= \lambda_i \delta{ij} \end{align*} $$

where $\mathbf{K} \in \mathbb{R}^{n \times n}$ and $\mathbf{M} \in \mathbb{R}^{n \times n}$ are real symmetric sparse matrices (usually obtained after discretization like finite elements), and $\delta_{ij}$ is the Kronecker delta.

There are two widely used methods for solving the above eigenvalue problems: the Lanczos method (link) and the subspace iteration method (Bathe 2014). While in general the subspace iteration method is slower than the Lanczos method, the subspace iteration method is particularly more amenable to parallel implementations. The enriched subspace iteration method is a novel extension of the subspace iteration method, and the improvement is achieved without deteriorating its favorable feature of being suitable to parallel processing.

A significant speed-up compared to the subspace iteration method can be achieved. Speed-ups observed from some example problems are a factor of 3-5. Please see Kim and Bathe 2017 and Bathe 2014 for the detail of the enriched subspace iteration method.

Installation

Requirements

To build the enriched subspace iteration library you need to have:

  • a Fortran 2008 compliant compiler or newer (GCC Fortran or Intel Fortran compilers)
  • CMake version 3.13+

Installation on Linux

Clone this repository

git clone https://github.com/ktkimit/esubspace.git
cd esubspace

Configure the build and build it with

cmake -B build -DCMAKE_INSTALL_PREFIX=/to/your/preferred/install/location
cmake --build build

Install the library with

cmake --install build

Then the library will be installed into the location you specified with DCMAKE_INSTALL_PREFIX option in the configuration step.

Usage of the library

The library exports CMake package files to easily find and use it in other projects. The CMake files are located in the library directory in the installation directory you specified with the installation prefix.

You can find and use the installed enriched subspace iteration library by simply putting the following in your CMake configuration

find_package(Esspace REQUIRED)
...

target_link_libraries(${PROJECT_NAME} PRIVATE Esspace::Esspace)

When configuring your project, don't forget to make the installed enriched subspace iteration library discoverable by adding its installation directory to CMAKE_PREFIX_PATH.

Please look at the CMake configuration of the example (CMakeLists) given in this repository.

Example

An example use of the library is given in example_frame2d. The example problem is a plane frame structure given below: all the frame members have the same material properties as described in the figure ($E$: Young's modulus, $A$: sectional area, $I$: second moment of area, and $\rho$: mass density).

We provide a driving source code esspace_main.f90 with some input data files. The binary files frame2d.stiff and frame2d.mass are the corresponding stiffness matrix data and mass matrix data, respectively, and the formatted file frame2d.in provides required input arguments. In each binary file, the matrix data is stored sequentially as follows: the order of the matrix in single precision, the number of elements below skyline of the matrix in single precision, array storing the addresses of diagonal elements of the matrix in single precision, and array storing the elements of the matrix in compacted form in double precision.

To build the example type the following at its directory

cmake -B build -DCMAKE_PREFIX_PATH=/to/your/preferred/install/location/lib/cmake

Then you will get an executable file named Example_frame2d. After running it the results will be stored in a text file frame2d.log.

References

License

The software is licensed under the MIT License.

About

The software is an implementation of the enriched subspace iteration method for solving the generalized eigenvalue problems.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published