Skip to content

marcinlos/iga-ads

Repository files navigation

IGA-ADS

Build status Codecov Codacy Coverity License Language Latest release

IGA-ADS is a C++ framework designed to facilitate creating parallel numerical simulations for time-dependent and stationary PDEs using isogeometric finite element method.

Building

Dependencies

Tools

  • Modern C++ compiler with C++17 support (GCC >= 7, Clang >= 6)
  • CMake (>= 3.13, 3.20 recommended for presets)

Libraries

Optional

  • Galois (>= 6.0) - parallel assembly (recommended)
  • MUMPS - used for stationary problems
  • Catch2 - required to build test suite
  • Lyra - argument parser used by some examples

Compilation

To compile the code, in the project root directory execute the following commands:

mkdir build-dir
cmake -S. -B build-dir [OPTIONS]
cmake --build build-dir --parallel

where OPTIONS are additional build settings described below. By default this builds the entire project, including examples and supporting applications. To build only the library, add --target ADS to the last command:

cmake --build build-dir --parallel --target ADS

Once the library is compiled, in can be installed using

cmake --install build-dir

This installs the library, headers and CMake configuration files in a default system location. To install in a different directory, specify it by using the --prefix option as follows:

cmake --install build-dir --prefix /path/to/desired/directory

For more details and additional options, consult CMake documentation.

Build options

Options are specified as -D option=value, e.g. cmake -S . -B build -D ADS_USE_GALOIS=ON

  • ADS_USE_GALOIS - decides if parallel executor using Galois framework is compiled. Disabling this options also stops example programs using it from being compiled (default: OFF)
  • ADS_USE_MUMPS - decides if MUMPS support is included (default: OFF)
  • ADS_BUILD_PROBLEMS - decides if the example problems are compiled (default: ON)
  • ADS_BUILD_TOOLS - decides if the supporting applications are compiled (default: ON)
  • BUILD_SHARED_LIBS - decides if the project is built as a shared library (default: OFF)
  • BUILD_TESTING - decides if the tests are compiled (default: OFF)

Using the library

There are three primary ways to use IGA-ADS library in your CMake project.

Importing installed package

If IGA-ADS has been built and installed as described above, it can be imported using find_package command. To import and use the library with some example application, add the following to you CMakeLists.txt:

find_package(ADS 0.1.0 REQUIRED)
add_executable(example ...)
target_link_libraries(example PRIVATE ADS::ADS)

Note that if the library has been installed in a non-standard location, it may be necessary to inform CMake about it via CMAKE_PREFIX_PATH or ADS_ROOT option:

cmake -D ADS_ROOT=/path/to/install/dir ...

Including as a subdirectory

In this method, the entire IGA-ADS directory is added as a subdirectory to the project using it. One easy way to do it is by using git submodules:

git submodule add https://github.com/marcinlos/iga-ads ads

The ads directory then needs to be added in CMakeLists.txt using add_subdirectory. We can also set build options for IGA-ADS:

set(ADS_USE_GALOIS ON)
set(ADS_USE_MUMPS ON)
set(ADS_BUILD_PROBLEMS OFF)
set(ADS_BUILD_TOOLS OFF)

add_subdirectory(ads)
add_executable(example ...)
target_link_libraries(example PRIVATE ADS::ADS)

Using FetchContent

Using FetchContent we can automatically download IGA-ADS to the build directory.

include(FetchContent)

FetchContent_Declare(ADS
  GIT_REPOSITORY https://github.com/marcinlos/iga-ads
  GIT_TAG develop
)

set(ADS_USE_GALOIS ON)
set(ADS_USE_MUMPS ON)
set(ADS_BUILD_PROBLEMS OFF)
set(ADS_BUILD_TOOLS OFF)

FetchContent_MakeAvailable(ADS)
add_executable(example ...)
target_link_libraries(example PRIVATE ADS::ADS)

Note: FetchContent_MakeAvailable requires CMake >= 3.14, see here for solution working in earlier versions.

Citation

If you use this code, please cite:

  • Marcin Łoś, Maciej Woźniak, Maciej Paszyński, Andrew Lenharth and Keshav Pingali. IGA-ADS : Isogeometric Analysis FEM using ADS solver. Computer & Physics Communications, 217:99-116, 2017.
  • Marcin Łoś, Maciej Paszyński, Adriank Kłusek and Witold Dzwinel. Application of fast isogeometric L2 projection solver for tumor growth simulations. Computer Methods in Applied Mechanics and Engineering, 316:1257-1269, 2017.
  • Marcin Łoś, Adriank Kłusek, M. Amber Hassaan, Keshav Pingali, Witold Dzwinel and Maciej Paszyński. Parallel fast isogeometric L2 projection solver with GALOIS system for 3D tumor growth simulations. Computer Methods in Applied Mechanics and Engineering, 343:1-22, 2019.