diff --git a/CMakeLists.txt b/CMakeLists.txt index ff25e5e86..851a75fdd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,6 @@ PROJECT (Cantera) INCLUDE (config.cmake) - #operating system SET(os ${CMAKE_SYSTEM_NAME}) if (os STREQUAL "Darwin") @@ -25,7 +24,6 @@ CONFIGURE_FILE ( ${PROJECT_SOURCE_DIR}/config.h_cmake.in ${PROJECT_BINARY_DIR}/config.h ) -INCLUDE_DIRECTORIES (${PROJECT_BINARY_DIR}) INCLUDE_DIRECTORIES (${PROJECT_BINARY_DIR}/build/include/cantera) SET (LIBRARY_OUTPUT_PATH @@ -46,5 +44,5 @@ ADD_SUBDIRECTORY (Cantera) SET ( CANTERA_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/Cantera/cxx/include ) -SET(CMAKE_INSTALL_PREFIX /Applications/Cantera/include ) -INSTALL_FILES ( /cantera .h ${CANTERA_CXX_HEADERS} ) +#SET(CMAKE_INSTALL_PREFIX /Applications/Cantera/include ) +#INSTALL_FILES ( /cantera .h ${CANTERA_CXX_HEADERS} ) diff --git a/Cantera/CMakeLists.txt b/Cantera/CMakeLists.txt index 7e910ca1d..28ca2f267 100644 --- a/Cantera/CMakeLists.txt +++ b/Cantera/CMakeLists.txt @@ -1,6 +1,5 @@ add_subdirectory(src) +add_subdirectory(cxx) add_subdirectory(clib) -# add_subdirectory(python) -#add_subdirectory(fortran) diff --git a/Cantera/clib/src/CMakeLists.txt b/Cantera/clib/src/CMakeLists.txt index b8b2391c1..c2e797732 100644 --- a/Cantera/clib/src/CMakeLists.txt +++ b/Cantera/clib/src/CMakeLists.txt @@ -10,16 +10,19 @@ INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/Cantera/src/transport) INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/Cantera/src/converters) INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/Cantera/src/zeroD) INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/Cantera/src/oneD) +INCLUDE_DIRECTORIES (${PROJECT_BINARY_DIR}/build/include/cantera) -SET (LIBRARY_OUTPUT_PATH - ${PROJECT_BINARY_DIR}/build/lib/${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_VERSION} CACHE PATH "Single directory for all libraries" - ) +#SET (LIBRARY_OUTPUT_PATH +# ${PROJECT_BINARY_DIR}/build/lib/${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_SYSTEM +# VERSION} CACHE PATH "Single directory for all libraries" +# ) -ADD_LIBRARY(clib ${CLIB_SRCS}) +ADD_LIBRARY ( clib ${CLIB_SRCS} ) + +TARGET_LINK_LIBRARIES (clib oneD zeroD equil kinetics thermo ctbase) SET (CLIB_H ct.h Storage.h ctsurf.h ctrpath.h ctreactor.h ctfunc.h ctxml.h ctonedim.h ctmultiphase.h ) -TARGET_LINK_LIBRARIES (clib oneD zeroD equil kinetics thermo ctbase) -# @phase_header_files@) + diff --git a/Cantera/cmake_install.cmake b/Cantera/cmake_install.cmake index d49115f71..67bc76e17 100644 --- a/Cantera/cmake_install.cmake +++ b/Cantera/cmake_install.cmake @@ -30,6 +30,7 @@ ENDIF(NOT CMAKE_INSTALL_COMPONENT) IF(NOT CMAKE_INSTALL_LOCAL_ONLY) # Include the install script for each subdirectory. INCLUDE("/Users/dgg/dv/sf/cantera/Cantera/src/cmake_install.cmake") + INCLUDE("/Users/dgg/dv/sf/cantera/Cantera/cxx/cmake_install.cmake") INCLUDE("/Users/dgg/dv/sf/cantera/Cantera/clib/cmake_install.cmake") ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY) diff --git a/Cantera/cxx/demos/combustor.cpp b/Cantera/cxx/demos/combustor.cpp index f36a17209..b8a3c0c45 100644 --- a/Cantera/cxx/demos/combustor.cpp +++ b/Cantera/cxx/demos/combustor.cpp @@ -11,6 +11,8 @@ #include #include +using namespace CanteraZeroD; + void runexample() { // use reaction mechanism GRI-Mech 3.0 diff --git a/Cantera/cxx/include/zerodim.h b/Cantera/cxx/include/zerodim.h index f22ba99c8..68c6e760b 100644 --- a/Cantera/cxx/include/zerodim.h +++ b/Cantera/cxx/include/zerodim.h @@ -8,7 +8,7 @@ #include "kernel/FlowReactor.h" #include "kernel/ConstPressureReactor.h" -//using namespace CanteraZeroD; +using namespace CanteraZeroD; #endif diff --git a/Cantera/cxx/src/Makefile.in b/Cantera/cxx/src/Makefile.in index 7e46bbbe1..e22072c19 100644 --- a/Cantera/cxx/src/Makefile.in +++ b/Cantera/cxx/src/Makefile.in @@ -3,7 +3,7 @@ # $Author$ # $Date$ # $Revision$ -# + impor# # Copyright 2001 California Institute of Technology # ############################################################### diff --git a/Cantera/fortran/f77demos/isentropic.dsp.in b/Cantera/fortran/f77demos/isentropic.dsp.in deleted file mode 100644 index 09b25fa1f..000000000 --- a/Cantera/fortran/f77demos/isentropic.dsp.in +++ /dev/null @@ -1,111 +0,0 @@ -# Microsoft Developer Studio Project File - Name="isentropic" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=isentropic - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "isentropic.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "isentropic.mak" CFG="isentropic - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "isentropic - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "isentropic - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -F90=df.exe -RSC=rc.exe - -!IF "$(CFG)" == "isentropic - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "." -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE F90 /compile_only /nologo /warn:nofileopt -# ADD F90 /assume:underscore /compile_only /iface:nomixed_str_len_arg /iface:cref /libs:dll /math_library:fast /names:lowercase /nologo /threads /warn:nofileopt -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "@ct_incroot@" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib transport.lib tpx.lib cantera.lib cvode.lib ctlapack.lib ctmath.lib recipes.lib cxxutils.lib /nologo /subsystem:console /machine:I386 /libpath:"@ct_libdir@" - -!ELSEIF "$(CFG)" == "isentropic - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE F90 /check:bounds /compile_only /debug:full /nologo /traceback /warn:argument_checking /warn:nofileopt -# ADD F90 /assume:underscore /check:bounds /compile_only /debug:full /iface:nomixed_str_len_arg /iface:cref /libs:dll /names:lowercase /nologo /reentrancy:threaded /threads /traceback /warn:argument_checking /warn:nofileopt -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "@ct_incroot@" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib transport_d.lib tpx_d.lib cantera_d.lib cvode_d.lib ctlapack_d.lib ctmath_d.lib recipes_d.lib cxxutils_d.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"@ct_libdir@" - -!ENDIF - -# Begin Target - -# Name "isentropic - Win32 Release" -# Name "isentropic - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;f90;for;f;fpp" -# Begin Source File - -SOURCE=demo_ftnlib.cpp -# End Source File -# Begin Source File - -SOURCE=isentropic.f -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/Cantera/matlab/cantera/buildwin.m b/Cantera/matlab/cantera/buildwin.m deleted file mode 100755 index fd053bce9..000000000 --- a/Cantera/matlab/cantera/buildwin.m +++ /dev/null @@ -1,27 +0,0 @@ - -disp('building Cantera...'); -diary -mex -v -I../../../build/include private/ctmethods.cpp ... - private/ctfunctions.cpp ... - private/xmlmethods.cpp private/phasemethods.cpp ... - private/thermomethods.cpp private/kineticsmethods.cpp ... - private/mixturemethods.cpp ... - private/transportmethods.cpp private/reactormethods.cpp ... - private/reactornetmethods.cpp ... - private/wallmethods.cpp private/flowdevicemethods.cpp ... - private/funcmethods.cpp ... - private/onedimmethods.cpp private/surfmethods.cpp ... - ../../../build/lib/i686-pc-win32/clib.lib -disp('done.'); -diary off -exit; -% ../../../build/lib/i686-pc-win32/oneD.lib ... -% ../../../build/lib/i686-pc-win32/zeroD.lib ... -% ../../../build/lib/i686-pc-win32/transport.lib ... -% ../../../build/lib/i686-pc-win32/cantera.lib ... -% ../../../build/lib/i686-pc-win32/recipes.lib ... -% ../../../build/lib/i686-pc-win32/cvode.lib ... -% ../../../build/lib/i686-pc-win32/ctlapack.lib ... -% ../../../build/lib/i686-pc-win32/ctmath.lib ... -% ../../../build/lib/i686-pc-win32/ctblas.lib ... -% ../../../build/lib/i686-pc-win32/tpx.lib diff --git a/Cantera/matlab/setup_winmatlab.py.in b/Cantera/matlab/setup_winmatlab.py.in deleted file mode 100644 index c0bf1a944..000000000 --- a/Cantera/matlab/setup_winmatlab.py.in +++ /dev/null @@ -1,54 +0,0 @@ - -import sys - -bindir = '@ct_bindir@' -libdir = '@buildlib@' -incdir = '@buildinc@' -dflibdir = '@CVF_LIBDIR@' - -bllibstr = "@BLAS_LAPACK_LIBS@" -bllibs = bllibstr.replace('-l',' ') -bllist = bllibs.split() - -bldir = "@BLAS_LAPACK_DIR@" - -libs = ['clib', 'oneD', 'zeroD', 'transport', 'cantera', 'recipes', - 'cvode', 'ctmath', 'tpx'] - -f = open('setup.m','w') -f.write('cd cantera\nbuild_cantera\nexit\n') -f.close() - -fb = open('cantera/build_cantera.m','w') -fb.write(""" -disp('building Cantera..'); -mex -I"""+incdir+""" private/ctmethods.cpp private/ctfunctions.cpp ... - private/xmlmethods.cpp private/phasemethods.cpp ... - private/thermomethods.cpp private/kineticsmethods.cpp ... - private/transportmethods.cpp private/reactormethods.cpp ... - private/reactornetmethods.cpp ... - private/wallmethods.cpp private/flowdevicemethods.cpp ... - private/funcmethods.cpp ... - private/onedimmethods.cpp private/surfmethods.cpp private/write.cpp ... -""") -s = '' -for lib in libs: - s += ' '+libdir+'/'+lib+'.lib ...\n' -fb.write(s) -if bllist: - s = '' - for lib in bllist: - s += ' '+bldir+'/'+lib+'.lib ...\n' - fb.write(s) -fb.write(' "'+dflibdir+'/dformd.lib" ...\n') -fb.write(' "'+dflibdir+'/dfconsol.lib" ...\n') -fb.write(' "'+dflibdir+'/dfport.lib" \n') - -fb.close() - -fp = open('cantera/ctbin.m','w') -fp.write("""function path = ctbin -path = '"""+bindir+"""'; -""") -fp.close() - diff --git a/Cantera/src/CMakeLists.txt b/Cantera/src/CMakeLists.txt index 445f3283a..814022fc2 100644 --- a/Cantera/src/CMakeLists.txt +++ b/Cantera/src/CMakeLists.txt @@ -7,4 +7,5 @@ add_subdirectory(equil) add_subdirectory(spectra) add_subdirectory(oneD) +add_subdirectory(zeroD) diff --git a/config.h_cmake.in b/config.h_cmake.in index 8e70e37bf..17b681840 100644 --- a/config.h_cmake.in +++ b/config.h_cmake.in @@ -2,9 +2,6 @@ // Input file for CMAKE to generate config.h // -// WORK IN PROGRESS! - - #ifndef CT_CONFIG_H #define CT_CONFIG_H @@ -17,9 +14,6 @@ // This just compiles in the code. #cmakedefine DEBUG_MODE -//------------------------ Fortran settings -------------------// - - // define types doublereal, integer, and ftnlen to match the // corresponding Fortran data types on your system. The defaults // are OK for most systems @@ -29,7 +23,6 @@ typedef int integer; // Fortran integer typedef int ftnlen; // Fortran hidden string length type - // Fortran compilers pass character strings in argument lists by // adding a hidden argement with the length of the string. Some // compilers add the hidden length argument immediately after the diff --git a/ext/f2c_libs/f2c.h b/ext/f2c_libs/f2c.h index 02751d051..1f78d120c 100644 --- a/ext/f2c_libs/f2c.h +++ b/ext/f2c_libs/f2c.h @@ -7,6 +7,7 @@ #ifndef F2C_INCLUDE #define F2C_INCLUDE +//#define #ifdef _WIN32 #include /* for real isatty() */ /* diff --git a/ext/f2c_libs/f2c.h0 b/ext/f2c_libs/f2c.h0 index dbfb57e4a..1f78d120c 100644 --- a/ext/f2c_libs/f2c.h0 +++ b/ext/f2c_libs/f2c.h0 @@ -7,7 +7,7 @@ #ifndef F2C_INCLUDE #define F2C_INCLUDE -#define +//#define #ifdef _WIN32 #include /* for real isatty() */ /*