IGA-ADS is a C++ framework designed to facilitate creating parallel numerical simulations for time-dependent and stationary PDEs using isogeometric finite element method.
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.
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
)There are three primary ways to use IGA-ADS library in your CMake project.
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 ...
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)
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.
If you use this code, please cite: