From 18efeb13505494dbd972061aed4830001691df40 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 3 Jul 2012 19:25:59 +0000 Subject: [PATCH 1/7] Maintenance branch for 2.0 release From 58c202395c2bca9e4e4b6e566cebd223fbeddc87 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 10 Jul 2012 16:23:12 +0000 Subject: [PATCH 2/7] Bump version to 2.0.0 (final) --- README | 2 +- SConstruct | 2 +- doc/sphinx/conf.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index b4cccd0e1..963f06fbe 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ CANTERA ******* -Version 2.0.0 (development) +Version 2.0.0 License Information =================== diff --git a/SConstruct b/SConstruct index 337c93d0d..0cc0d00c0 100644 --- a/SConstruct +++ b/SConstruct @@ -520,7 +520,7 @@ opts.AddVariables( name recognized by the 'dot' program. On linux systems, this should be lowercase 'helvetica'.""", 'Helvetica'), - ('cantera_version', '', '2.0.0b4') + ('cantera_version', '', '2.0.0') ) opts.Update(env) diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 7a103db19..27869d11e 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -70,7 +70,7 @@ copyright = u'2012, Cantera Developers' # The short X.Y version. version = '2.0' # The full version, including alpha/beta/rc tags. -release = '2.0.0b3' +release = '2.0.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 063ee1525c73935b65d82413970def1456a360e8 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 10 Jul 2012 16:23:17 +0000 Subject: [PATCH 3/7] Fixed library specifications in installed SConstruct scripts for samples --- samples/cxx/SConscript | 4 +--- samples/f77/SConscript | 5 ++--- samples/f90/SConscript | 5 ++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/samples/cxx/SConscript b/samples/cxx/SConscript index 401b4289a..0ed0f2f0d 100644 --- a/samples/cxx/SConscript +++ b/samples/cxx/SConscript @@ -28,13 +28,11 @@ for subdir, name, extensions in samples: ## Generate SConstruct files to be installed incdirs = (localenv['ct_incroot'], localenv['sundials_include'], localenv['boost_inc_dir']) - libs = (['cantera'] + localenv['sundials_libs'] + - localenv['boost_libs'] + localenv['blas_lapack_libs']) libdirs = (localenv['ct_libdir'], localenv['sundials_libdir'], localenv['blas_lapack_dir'], localenv['boost_lib_dir']) linkflags = ('-g', localenv['thread_flags']) localenv['tmpl_cantera_incdirs'] = repr([x for x in incdirs if x]) - localenv['tmpl_cantera_libs'] = repr([x for x in libs if x]) + localenv['tmpl_cantera_libs'] = repr(localenv['cantera_libs']) localenv['tmpl_cantera_libdirs'] = repr([x for x in libdirs if x]) localenv['tmpl_cantera_linkflags'] = repr([x for x in linkflags if x]) localenv['tmpl_progname'] = name diff --git a/samples/f77/SConscript b/samples/f77/SConscript index 638ebc9f4..cc5b2dd78 100644 --- a/samples/f77/SConscript +++ b/samples/f77/SConscript @@ -20,13 +20,12 @@ for program_name, fortran_sources in samples: # Generate SConstruct file to be installed incdirs = (localenv['ct_incroot'], localenv['sundials_include'], localenv['boost_inc_dir']) -libs = (['cantera_fortran', 'cantera'] + localenv['sundials_libs'] + - localenv['boost_libs'] + localenv['blas_lapack_libs'] + ['stdc++']) +libs = ['cantera_fortran'] + localenv['cantera_libs'] + ['stdc++'] libdirs = (localenv['ct_libdir'], localenv['sundials_libdir'], localenv['blas_lapack_dir'], localenv['boost_lib_dir']) linkflags = ('-g', localenv['thread_flags']) localenv['tmpl_cantera_incdirs'] = repr([x for x in incdirs if x]) -localenv['tmpl_cantera_libs'] = repr([x for x in libs if x]) +localenv['tmpl_cantera_libs'] = repr(libs) localenv['tmpl_cantera_libdirs'] = repr([x for x in libdirs if x]) localenv['tmpl_cantera_linkflags'] = repr([x for x in linkflags if x]) sconstruct = localenv.SubstFile('SConstruct', 'SConstruct.in') diff --git a/samples/f90/SConscript b/samples/f90/SConscript index 790cee916..7461f5674 100644 --- a/samples/f90/SConscript +++ b/samples/f90/SConscript @@ -14,13 +14,12 @@ for programName, sources in samples: # Generate SConstruct files to be installed incdirs = [pjoin(localenv['ct_incroot'], 'cantera')] - libs = (['cantera_fortran', 'cantera'] + localenv['sundials_libs'] + - localenv['boost_libs'] + localenv['blas_lapack_libs'] + ['stdc++']) + libs = ['cantera_fortran'] + localenv['cantera_libs'] + ['stdc++'] libdirs = (localenv['ct_libdir'], localenv['sundials_libdir'], localenv['blas_lapack_dir'], localenv['boost_lib_dir']) linkflags = ('-g', localenv['thread_flags']) localenv['tmpl_cantera_incdirs'] = repr([x for x in incdirs if x]) - localenv['tmpl_cantera_libs'] = repr([x for x in libs if x]) + localenv['tmpl_cantera_libs'] = repr(libs) localenv['tmpl_cantera_libdirs'] = repr([x for x in libdirs if x]) localenv['tmpl_cantera_linkflags'] = repr([x for x in linkflags if x]) localenv['tmpl_progname'] = programName From 1bae2a373c5873e7b55730f3aca56d4fe88f230f Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 10 Jul 2012 16:23:21 +0000 Subject: [PATCH 4/7] Fixed Cantera.mak when using the 'single_library=y' config option --- platform/posix/Cantera.mak.in | 19 ++++++------------- platform/posix/SConscript | 10 ++++++++-- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/platform/posix/Cantera.mak.in b/platform/posix/Cantera.mak.in index ec2d08246..4009ea2f1 100644 --- a/platform/posix/Cantera.mak.in +++ b/platform/posix/Cantera.mak.in @@ -28,11 +28,11 @@ CANTERA_VERSION=@cantera_version@ CANTERA_CORE_INCLUDES=-I@ct_incroot@ # Required Cantera libraries -CANTERA_CORE_LIBS=@mak_threadflags@ -L@ct_libdir@ -lcantera -lctmath -lexecstream +CANTERA_CORE_LIBS=@mak_threadflags@ -L@ct_libdir@ @mak_corelibs@ CANTERA_CORE_LIBS_DEP = @ct_libdir@/libcantera.a -CANTERA_CORE_FTN=-L@ct_libdir@ -lcantera_fortran -lcantera +CANTERA_CORE_FTN=-L@ct_libdir@ -lcantera_fortran @mak_corelibs@ CANTERA_FORTRAN_MODS=@ct_incroot@/cantera @@ -65,17 +65,10 @@ CANTERA_BLAS_LAPACK_LIBS=@mak_blas_lapack_libs@ endif ############################################################################### -# F2C USAGE +# F2C USAGE ############################################################################### -CANTERA_mak_have_f2c_lib=@mak_have_f2c_lib@ - -ifeq ($(CANTERA_mak_have_f2c_lib), 1) - CANTERA_F2C_LIBS= -lctf2c -else - CANTERA_F2C_LIBS= -endif - +CANTERA_F2C_LIBS= @mak_f2c_lib@ ############################################################################### # COMBINATIONS OF INCLUDES AND LIBS @@ -101,8 +94,8 @@ CANTERA_TOTAL_LIBS_DEP= $(CANTERA_CORE_LIBS_DEP) \ CANTERA_FORTRAN_LIBS=$(CANTERA_CORE_FTN) $(CANTERA_SUNDIALS_LIBS) \ - $(CANTERA_BLAS_LAPACK_LIBS) $(CANTERA_BOOST_LIBS) \ - $(CANTERA_FORTRAN_SYSLIBS) + $(CANTERA_BLAS_LAPACK_LIBS) $(CANTERA_F2C_LIBS) \ + $(CANTERA_BOOST_LIBS) $(CANTERA_FORTRAN_SYSLIBS) ############################################################################### # END diff --git a/platform/posix/SConscript b/platform/posix/SConscript index 15dcde718..740884dc1 100644 --- a/platform/posix/SConscript +++ b/platform/posix/SConscript @@ -29,6 +29,10 @@ pc_libdirs = [] pc_incdirs = [] pc_cflags = [] +localenv['mak_corelibs'] = '-lcantera' +if not env['single_library']: + localenv['mak_corelibs'] += ' -lctmath -lexecstream' + if env['use_sundials'] == 'n': localenv['mak_sundials_libs'] = '-lcvode' localenv['mak_sundials_libdir'] = '' @@ -71,8 +75,10 @@ localenv['mak_have_blas_lapack_dir'] = '1' if localenv['blas_lapack_dir'] else ' if localenv['blas_lapack_dir']: localenv['mak_blas_lapack_libs'] = ' '.join('-l%s' % s for s in localenv['blas_lapack_libs']) pc_libs += localenv['blas_lapack_libs'] -else: +elif not env['single_library']: localenv['mak_blas_lapack_libs'] = ('-L' + '$inst_libdir' + ' -lctlapack -lctblas') +else: + localenv['mak_blas_lapack_libs'] = '' localenv['mak_threadflags'] = localenv['thread_flags'] if '-pthread' in localenv['thread_flags']: @@ -83,7 +89,7 @@ else: localenv['mak_fort_threadflags'] = '' # Handle f2c Linkage -localenv['mak_have_f2c_lib'] = '1' if localenv['build_with_f2c'] else '0' +localenv['mak_f2c_lib'] = '-lctf2c' if localenv['build_with_f2c'] and not env['single_library'] else '' mak = build(localenv.SubstFile('Cantera.mak', 'Cantera.mak.in')) install('$inst_incdir', mak) From 0e672ed92a6f9e8e1956aa14f3a5557b4bfaf06e Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 10 Jul 2012 16:23:25 +0000 Subject: [PATCH 5/7] Fixed generated SConstruct files to work with MSVC --- SConstruct | 5 +++-- samples/cxx/SConscript | 11 ++++++++++- samples/cxx/SConstruct.in | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index 0cc0d00c0..e44ad9ed6 100644 --- a/SConstruct +++ b/SConstruct @@ -956,12 +956,13 @@ config_h = env.Command('include/cantera/base/config.h', env.AlwaysBuild(config_h) env['config_h_target'] = config_h +env['boost_libs'] = [] if env['build_thread_safe']: env['use_boost_libs'] = True - env['boost_libs'] = [env['boost_thread_lib']] + if env['CC'] != 'cl': + env['boost_libs'].append(env['boost_thread_lib']) else: env['use_boost_libs'] = False - env['boost_libs'] = [] # ********************* # *** Build Cantera *** diff --git a/samples/cxx/SConscript b/samples/cxx/SConscript index 0ed0f2f0d..e4094536f 100644 --- a/samples/cxx/SConscript +++ b/samples/cxx/SConscript @@ -9,6 +9,14 @@ samples = [('combustor', 'combustor', ['cpp']), ('NASA_coeffs', 'NASA_coeffs', ['cpp']), ('rankine', 'rankine', ['cpp'])] +if env['CC'] == 'cl': + debug_link_flag = '/DEBUG' + compilerFlags = ['/EHsc', '/MD', '/nologo', '/W3', + '/D_SCL_SECURE_NO_WARNINGS', '/D_CRT_SECURE_NO_WARNINGS'] +else: + debug_link_flag = '-g' + compilerFlags = ['-g', '-Wall'] + for subdir, name, extensions in samples: localenv = env.Clone() buildSample(localenv.Program, pjoin(subdir, name), @@ -30,7 +38,8 @@ for subdir, name, extensions in samples: localenv['boost_inc_dir']) libdirs = (localenv['ct_libdir'], localenv['sundials_libdir'], localenv['blas_lapack_dir'], localenv['boost_lib_dir']) - linkflags = ('-g', localenv['thread_flags']) + linkflags = (debug_link_flag, localenv['thread_flags']) + localenv['tmpl_compiler_flags'] = repr(compilerFlags) localenv['tmpl_cantera_incdirs'] = repr([x for x in incdirs if x]) localenv['tmpl_cantera_libs'] = repr(localenv['cantera_libs']) localenv['tmpl_cantera_libdirs'] = repr([x for x in libdirs if x]) diff --git a/samples/cxx/SConstruct.in b/samples/cxx/SConstruct.in index 898e4c7f2..3ef258db9 100644 --- a/samples/cxx/SConstruct.in +++ b/samples/cxx/SConstruct.in @@ -1,6 +1,6 @@ env = Environment() -env.Append(CCFLAGS='-g', +env.Append(CCFLAGS=@tmpl_compiler_flags@, CPPPATH=@tmpl_cantera_incdirs@, LIBS=@tmpl_cantera_libs@, LIBPATH=@tmpl_cantera_libdirs@, From b83a3b7e9600db7af601f03b6a781ba5cfde1b31 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 10 Jul 2012 16:23:29 +0000 Subject: [PATCH 6/7] Fixed compilation of Fortran samples with user-specified compiler --- SConstruct | 1 + 1 file changed, 1 insertion(+) diff --git a/SConstruct b/SConstruct index e44ad9ed6..86083e394 100644 --- a/SConstruct +++ b/SConstruct @@ -588,6 +588,7 @@ if env['f90_interface'] in ('y','default'): if foundF90: env['f90_interface'] = 'y' + env['FORTRAN'] = env['F90'] elif env['f90_interface'] == 'y': print "ERROR: Couldn't find a suitable Fortran compiler to build the Fortran 90 interface" sys.exit(1) From 7194bf96d4026c74372432b17c57c9f4f6d1bf8f Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 10 Jul 2012 16:23:32 +0000 Subject: [PATCH 7/7] Fixed calculation of some multicomponent transport properties For some properties, the internal temperature-dependent properties were being updated in the wrong order. --- src/transport/GasTransport.cpp | 2 ++ src/transport/MultiTransport.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/transport/GasTransport.cpp b/src/transport/GasTransport.cpp index 213abf900..f56c06161 100644 --- a/src/transport/GasTransport.cpp +++ b/src/transport/GasTransport.cpp @@ -212,6 +212,7 @@ void GasTransport::updateViscosity_T() void GasTransport::updateSpeciesViscosities() { + update_T(); if (m_mode == CK_Mode) { for (size_t k = 0; k < m_nsp; k++) { m_visc[k] = exp(dot4(m_polytempvec, m_visccoeffs[k])); @@ -229,6 +230,7 @@ void GasTransport::updateSpeciesViscosities() void GasTransport::updateDiff_T() { + update_T(); // evaluate binary diffusion coefficients at unit pressure size_t ic = 0; if (m_mode == CK_Mode) { diff --git a/src/transport/MultiTransport.cpp b/src/transport/MultiTransport.cpp index e819e723a..9b8cfd53c 100644 --- a/src/transport/MultiTransport.cpp +++ b/src/transport/MultiTransport.cpp @@ -655,7 +655,6 @@ void MultiTransport::updateThermal_T() } // we need species viscosities and binary diffusion coefficients updateSpeciesViscosities(); - update_T(); updateDiff_T(); // evaluate polynomial fits for A*, B*, C*