Rename Sundials-related macros to avoid name conflicts

This commit is contained in:
Ray Speth 2018-02-08 22:58:16 -05:00
parent a0ac2b0cc6
commit 50a3fecb23
6 changed files with 12 additions and 12 deletions

View file

@ -1539,12 +1539,12 @@ configh['SOLARIS'] = 1 if env['OS'] == 'Solaris' else None
configh['DARWIN'] = 1 if env['OS'] == 'Darwin' else None
cdefine('NEEDS_GENERIC_TEMPL_STATIC_DECL', 'OS', 'Solaris')
configh['SUNDIALS_VERSION'] = env['sundials_version'].replace('.','')
configh['CT_SUNDIALS_VERSION'] = env['sundials_version'].replace('.','')
if env.get('has_sundials_lapack') and env['use_lapack']:
configh['SUNDIALS_USE_LAPACK'] = 1
configh['CT_SUNDIALS_USE_LAPACK'] = 1
else:
configh['SUNDIALS_USE_LAPACK'] = 0
configh['CT_SUNDIALS_USE_LAPACK'] = 0
cdefine('LAPACK_FTN_STRING_LEN_AT_END', 'lapack_ftn_string_len_at_end')
cdefine('LAPACK_FTN_TRAILING_UNDERSCORE', 'lapack_ftn_trailing_underscore')

View file

@ -33,7 +33,7 @@ typedef int ftnlen; // Fortran hidden string length type
%(FTN_TRAILING_UNDERSCORE)s
%(SUNDIALS_VERSION)s
%(CT_SUNDIALS_VERSION)s
//-------- LAPACK / BLAS ---------
@ -74,6 +74,6 @@ typedef int ftnlen; // Fortran hidden string length type
// Enable Sundials to use an external BLAS/LAPACK library if it was
// built to use this option
%(SUNDIALS_USE_LAPACK)s
%(CT_SUNDIALS_USE_LAPACK)s
#endif

View file

@ -16,7 +16,7 @@ std::string get_cantera_version()
int get_sundials_version()
{
return SUNDIALS_VERSION;
return CT_SUNDIALS_VERSION;
}
class PythonLogger : public Cantera::Logger

View file

@ -10,7 +10,7 @@
#if CT_USE_LAPACK
#include "cantera/numerics/ctlapack.h"
#else
#if SUNDIALS_USE_LAPACK
#if CT_SUNDIALS_USE_LAPACK
#include "cvodes/cvodes_lapack.h"
#else
#include "cvodes/cvodes_dense.h"

View file

@ -14,7 +14,7 @@ using namespace std;
#include "sundials/sundials_nvector.h"
#include "nvector/nvector_serial.h"
#include "cvodes/cvodes.h"
#if SUNDIALS_USE_LAPACK
#if CT_SUNDIALS_USE_LAPACK
#include "cvodes/cvodes_lapack.h"
#else
#include "cvodes/cvodes_dense.h"
@ -26,7 +26,7 @@ using namespace std;
#define CV_SS 1
#define CV_SV 2
#if SUNDIALS_VERSION < 25
#if CT_SUNDIALS_VERSION < 25
typedef int sd_size_t;
#else
typedef long int sd_size_t;
@ -338,7 +338,7 @@ void CVodesIntegrator::applyOptions()
{
if (m_type == DENSE + NOJAC) {
sd_size_t N = static_cast<sd_size_t>(m_neq);
#if SUNDIALS_USE_LAPACK
#if CT_SUNDIALS_USE_LAPACK
CVLapackDense(m_cvode_mem, N);
#else
CVDense(m_cvode_mem, N);
@ -351,7 +351,7 @@ void CVodesIntegrator::applyOptions()
sd_size_t N = static_cast<sd_size_t>(m_neq);
long int nu = m_mupper;
long int nl = m_mlower;
#if SUNDIALS_USE_LAPACK
#if CT_SUNDIALS_USE_LAPACK
CVLapackBand(m_cvode_mem, N, nu, nl);
#else
CVBand(m_cvode_mem, N, nu, nl);

View file

@ -16,7 +16,7 @@
using namespace std;
#if SUNDIALS_VERSION < 25
#if CT_SUNDIALS_VERSION < 25
typedef int sd_size_t;
#else
typedef long int sd_size_t;