This PR adds a configure flag (--enable-build-deprecated, which is off by default) that defines a preprocessor variable (_BUILD_DEPRECATED_) which can be used to optionally build code that has been marked as deprecated. In addition, a few sections have been marked as deprecated. These are detailed below.
Motivation
tps has significant chunks of code that do not appear to be used or supported anymore. Rather than delete these immediately, I prefer to conditionally "delete" them from the build with #ifdef. This enables testing with and without these sections without requiring them to be actually deleted until we are convinced they will never be useful.
General Usage
To mark a deprecated section, simply surround it as follows:
#ifdef _BUILD_DEPRECATED_
// this code is eliminated from the build
// unless --enable-build-deprecated is passed to configure
#endif
In a standard build _BUILD_DEPRECATED_ is undefined, so this code is not compiled. To include it, simply configure with --enable-build-deprecated.
Deprecated Sections
Three types of code section have been marked with #if _BUILD_DEPRECATED_ in this PR. These sections are as follows:
Old read/write functionality, including
Read/write for restart files predating the hdf5 restart capability
HDF5 restarts were added way back in PR #5. There aren't any old format restarts around anymore, so no reason to support it.
Read of the original input file format
The parser was refactored in #88. We also have a converter utility to map from the old input format to the new, so no reason to continue support for parsing the original format.
Unused capabilities, including
The SBP method
To the best of my knowledge, this has never been used and probably does not work. Seems best to eliminate.
The mass-matrix-based approach for the face terms
Similarly, not used in practice and never tested. Don't see a reason to keep.
Duplicate code
Due to the needs of the gpu implementation, we have in places duplicated functions. This PR reduces this duplication by calling one variant of the function from the other.
Unless someone objects, these sections will be removed in the near future.
Overview
This PR adds a configure flag (
--enable-build-deprecated
, which is off by default) that defines a preprocessor variable (_BUILD_DEPRECATED_
) which can be used to optionally build code that has been marked as deprecated. In addition, a few sections have been marked as deprecated. These are detailed below.Motivation
tps
has significant chunks of code that do not appear to be used or supported anymore. Rather than delete these immediately, I prefer to conditionally "delete" them from the build with#ifdef
. This enables testing with and without these sections without requiring them to be actually deleted until we are convinced they will never be useful.General Usage
To mark a deprecated section, simply surround it as follows:
In a standard build
_BUILD_DEPRECATED_
is undefined, so this code is not compiled. To include it, simplyconfigure
with--enable-build-deprecated
.Deprecated Sections
Three types of code section have been marked with
#if _BUILD_DEPRECATED_
in this PR. These sections are as follows:Unless someone objects, these sections will be removed in the near future.