DataTransferKit - Multiphysics Solution Transfer Services  2.0
Design-by-Contract.

Design-by-Contract (DBC) functionality is provided to verify function preconditions, postconditions, and invariants. These checks are separated from the debug build and can be activated for both release and debug builds. They can be activated by setting the following in a CMake configure:

-D DataTransferKit_ENABLE_DBC:BOOL=ON

By default, DBC is deactivated. Although they will require additional computational overhead, these checks provide a mechanism for verifying library input arguments. Note that the bounds-checking functionality used within the DataTransferKit is only provided by a debug build.

In addition, DTK_REMEMBER is provided to store values used only for DBC checks and no other place in executed code.

Separate from the DBC build, DTK_INSIST can be used at any time verify a conditional. This should be used instead of the standard cassert.

DTK_CHECK_ERROR_CODE provides DBC support for libraries that return error codes with 0 as the value for no errors.