Upgrading to IBAMR 1.0
The next planned release (ETA fall of 2020) of IBAMR is 1.0: this release, currently under development in the GitHub repository, introduces some breaking changes necessary for compatibility with libraries IBAMR depends upon.
Compiling the current IBAMR 1.0 prerelease
master branch in the GitHub repository tracks what will become the IBAMR
1.0 release. at the present time it can be compiled by following the same
instructions used for IBAMR 0.7.1: the C++11 version flag, when needed, will be
C++ version changes
Like IBAMR 0.7.1, IBAMR 1.0 will require C++11 or newer. This requirement does not change any IBAMR interfaces and will not require changes to any user codes. In particular, no changes were made to the examples. However, if you wish to contribute to IBAMR, or want to update your code to use the C++11 features, then we suggest using the following features: the heavy use of auto, range-based for loops, and default member utilization in the header file where appropriate. Note that auto should only be used when the type name would be duplicated, or the type name is clear from the initialization, for example:
for (std::set<int>::iterator cit = seed_set.begin(); cit != seed_set.end(); ++cit) int n = static_cast<int>(3.0);
should transform to
for (const auto& seed : seed_set) // New range-based for loop auto n = static_cast<int>(3.0);
We also prefer that default initializations for class member variables be done in the header files instead of in the constructor.
The C++11 updates were mostly done using the clang-tidy tool provided by
LLVM. In order to use clang-tidy on
your branch of IBAMR, you will need a compilation database. To set this up with
the build system IBAMR uses, we suggest using
BEAR. Note that IBMAR currently contains
two separate libraries IBTK and IBAMR, so you will need to run clang-tidy on
each of these libraries separately. Once you have generated the compilation
database, you can run the clang-tidy tool on the library using the script
run-clang-tidy.py provided by LLVM. The checks that were used on IBAMR
modernize-deprecated-headers modernize-loop-convert modernize-pass-by-value modernize-shrink-to-fit modernize-use-auto modernize-use-bool-literals modernize-use-default-member-init modernize-use-equals-default modernize-use-equals-delete modernize-use-nullptr modernize-use-override modernize-use-using
We suggest that each of these changes be run individually with results checked along the way to make spotting errors easier. Note that you may need to have an updated version of the LLVM compiler to access some of these checks.
SAMRAI version changes
The IBAMR developers are currently converting the library to use SAMRAI 3.12
instead of SAMRAI 2.4.4. Newer versions of SAMRAI are, in general, not
compatible with older versions: many classes have been renamed,
been replaced by
std::shared_ptr, and most classes are no longer templated on
the spatial dimension.
The IBAMR developers are preparing a set of scripts that will convert nearly all SAMRAI 2.4.4 code into SAMRAI 3.12 code. More information will be posted here once this is complete.