Prerequisites
AMR Multiphase is built on top of IBAMR, a framework for developing fluid-structure interaction codes on block-structured AMR grids. You must install IBAMR and all of its required dependencies before compiling this library.IBAMR must be compiled with CMake. AMR Multiphase is not compatible with IBAMR builds that use autoconf.
Compiling the library
1
Create a build directory
From the root of the repository, create a
build directory. This keeps all object files, CMake cache files, and compiled executables separate from the source tree.2
Configure with CMake
Enter the build directory and run Replace
cmake, pointing it at your IBAMR installation. For best performance, pass the optimization flags -O3 -march=native./path/to/ibamr/install/dir with the actual prefix you used when installing IBAMR (the directory that contains lib/cmake/IBAMR/).3
Build a target
Run CMake first builds the
make with the name of the target you want to compile. For example, to build the four-roll-mill example:MultiphaseLib static library (if not already built), then links the requested executable against it.Available build targets
The rootCMakeLists.txt defines MultiphaseLib and includes four example subdirectories, each with its own targets.
To build all targets at once, run
make without arguments from the build directory.
Library source files
MultiphaseLib is compiled from the following source files under src/:
include/ directory and are available to downstream targets via the MultiphaseLib CMake target.