[cantera]: cleaning up a small error thats been propagated through the code
This commit is contained in:
parent
5298d6989c
commit
7075be19cd
13 changed files with 112 additions and 263 deletions
|
|
@ -8,7 +8,7 @@ cc_sources = DenseMatrix.cpp funcs.cpp Func1.cpp ODE_integrators.cpp \
|
||||||
SquareMatrix.cpp ResidJacEval.cpp NonlinearSolver.cpp \
|
SquareMatrix.cpp ResidJacEval.cpp NonlinearSolver.cpp \
|
||||||
CVodeInt.cpp
|
CVodeInt.cpp
|
||||||
|
|
||||||
AM_CPPFLAGS = -I../../../ -I$(top_builddir)/build/include/cantera
|
AM_CPPFLAGS = -I../../../ -I$(top_builddir)/build/include/cantera -I$(top_builddir)/build/include/cantera/kernel
|
||||||
AM_CXXFLAGS = $(AM_CPPFLAGS)
|
AM_CXXFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
lib_LTLIBRARIES = $(top_builddir)/build/lib/libctnumerics.la
|
lib_LTLIBRARIES = $(top_builddir)/build/lib/libctnumerics.la
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,10 @@
|
||||||
|
|
||||||
#include "ct_defs.h"
|
#include "ct_defs.h"
|
||||||
|
|
||||||
|
typedef double doublereal;
|
||||||
|
typedef int integer;
|
||||||
|
typedef int ftnlen;
|
||||||
|
|
||||||
//#include <vecLib/cblas.h>
|
//#include <vecLib/cblas.h>
|
||||||
|
|
||||||
// map BLAS names to names with or without a trailing underscore.
|
// map BLAS names to names with or without a trailing underscore.
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
#include "ctlapack.h"
|
||||||
#include "ct_defs.h"
|
#include "ct_defs.h"
|
||||||
#include "ctexceptions.h"
|
#include "ctexceptions.h"
|
||||||
#include "stringUtils.h"
|
#include "stringUtils.h"
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sort.h"
|
#include "sort.h"
|
||||||
|
#include "ctlapack.h"
|
||||||
|
|
||||||
namespace Cantera {
|
namespace Cantera {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,11 +89,11 @@ AC_OUTPUT(Makefile \
|
||||||
doxygen/Makefile \
|
doxygen/Makefile \
|
||||||
ext/Makefile \
|
ext/Makefile \
|
||||||
ext/tpx/Makefile \
|
ext/tpx/Makefile \
|
||||||
ext/math/Makefile \
|
|
||||||
ext/blas/Makefile \
|
|
||||||
ext/cvode/Makefile \
|
ext/cvode/Makefile \
|
||||||
|
ext/f2c_blas/Makefile \
|
||||||
ext/f2c_lapack/Makefile \
|
ext/f2c_lapack/Makefile \
|
||||||
ext/f2c_libs/Makefile \
|
ext/f2c_libs/Makefile \
|
||||||
|
ext/f2c_math/Makefile \
|
||||||
Cantera/Makefile \
|
Cantera/Makefile \
|
||||||
Cantera/user/Makefile \
|
Cantera/user/Makefile \
|
||||||
Cantera/src/Makefile \
|
Cantera/src/Makefile \
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
SUBDIRS = f2c_lapack tpx math cvode blas f2c_libs
|
SUBDIRS = f2c_libs f2c_blas f2c_lapack f2c_math cvode tpx
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
SET (F2C_BLAS_SRCS dasum.c daxpy.c dcabs1.c dcopy.c ddot.c
|
|
||||||
dgbmv.c dgemm.c dgemv.c dger.c dnrm2.c drot.c drotg.c
|
|
||||||
drotm.c drotmg.c dsbmv.c dscal.c dsdot.c dspmv.c dspr.c dspr2.c
|
|
||||||
dswap.c dsymm.c dsymv.c dsyr.c dsyr2.c dsyr2k.c dsyrk.c dtbmv.c
|
|
||||||
dtbsv.c dtpmv.c dtpsv.c dtrmm.c dtrmv.c dtrsm.c dtrsv.c
|
|
||||||
dzasum.c dznrm2.c idamax.c lsame.c xerbla.c )
|
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES ( ${PROJECT_SOURCE_DIR}/ext/f2c_libs )
|
|
||||||
ADD_LIBRARY(ctblas ${F2C_BLAS_SRCS})
|
|
||||||
|
|
||||||
|
|
||||||
60
ext/f2c_blas/Makefile.am
Normal file
60
ext/f2c_blas/Makefile.am
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
cc_sources = \
|
||||||
|
dasum.c \
|
||||||
|
daxpy.c \
|
||||||
|
dcabs1.c \
|
||||||
|
dcopy.c \
|
||||||
|
ddot.c \
|
||||||
|
dgbmv.c \
|
||||||
|
dgemm.c \
|
||||||
|
dgemv.c \
|
||||||
|
dger.c \
|
||||||
|
dnrm2.c \
|
||||||
|
drot.c \
|
||||||
|
drotg.c \
|
||||||
|
drotm.c \
|
||||||
|
drotmg.c \
|
||||||
|
dsbmv.c \
|
||||||
|
dscal.c \
|
||||||
|
dsdot.c \
|
||||||
|
dspmv.c \
|
||||||
|
dspr.c \
|
||||||
|
dspr2.c \
|
||||||
|
dswap.c \
|
||||||
|
dsymm.c \
|
||||||
|
dsymv.c \
|
||||||
|
dsyr.c \
|
||||||
|
dsyr2.c \
|
||||||
|
dsyr2k.c \
|
||||||
|
dsyrk.c \
|
||||||
|
dtbmv.c \
|
||||||
|
dtbsv.c \
|
||||||
|
dtpmv.c \
|
||||||
|
dtpsv.c \
|
||||||
|
dtrmm.c \
|
||||||
|
dtrmv.c \
|
||||||
|
dtrsm.c \
|
||||||
|
dtrsv.c \
|
||||||
|
dzasum.c \
|
||||||
|
dznrm2.c \
|
||||||
|
idamax.c \
|
||||||
|
lsame.c \
|
||||||
|
xerbla.c
|
||||||
|
|
||||||
|
h_sources = blaswrap.h
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -I../f2c_libs
|
||||||
|
AM_CXXFLAGS = $(AM_CPPFLAGS)
|
||||||
|
AM_FCFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = $(top_builddir)/build/lib/libctblas.la
|
||||||
|
library_includedir = $(top_builddir)/build/include
|
||||||
|
library_include_HEADERS = $(h_sources)
|
||||||
|
|
||||||
|
#-----------------------
|
||||||
|
# Cantera Converters C/C++ library
|
||||||
|
#-----------------------
|
||||||
|
|
||||||
|
__top_builddir__build_lib_libctblas_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
|
||||||
|
__top_builddir__build_lib_libctblas_la_SOURCES = $(cc_sources) $(h_sources)
|
||||||
|
|
||||||
|
CLEANFILES = *.o
|
||||||
|
|
@ -1,126 +0,0 @@
|
||||||
#/bin/sh
|
|
||||||
#/bin/sh
|
|
||||||
#
|
|
||||||
# $Revision: 1.10 $
|
|
||||||
# $Date: 2009/01/12 19:34:14 $
|
|
||||||
#
|
|
||||||
|
|
||||||
.SUFFIXES :
|
|
||||||
.SUFFIXES : .c .d .o
|
|
||||||
|
|
||||||
do_ranlib = @DO_RANLIB@
|
|
||||||
|
|
||||||
PURIFY=@PURIFY@
|
|
||||||
|
|
||||||
# the directory where the Cantera libraries are located
|
|
||||||
CANTERA_LIBDIR=@buildlib@
|
|
||||||
|
|
||||||
# the directory where Cantera include files may be found.
|
|
||||||
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
|
||||||
|
|
||||||
# the C++ compiler
|
|
||||||
CXX = @CXX@
|
|
||||||
|
|
||||||
# the C compiler
|
|
||||||
CC = @CC@
|
|
||||||
|
|
||||||
# C++ compile flags
|
|
||||||
PIC_FLAG=@PIC@
|
|
||||||
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
|
|
||||||
|
|
||||||
# C compile flags
|
|
||||||
CFLAGS = @CFLAGS@ $(CXX_OPT) $(PIC_FLAG)
|
|
||||||
|
|
||||||
# Local include files
|
|
||||||
CXX_INCLUDES=-I../f2c_libs
|
|
||||||
|
|
||||||
# How to compile the dependency file
|
|
||||||
.c.d:
|
|
||||||
@CXX_DEPENDS@ $(CFLAGS) $(CXX_INCLUDES) $*.c > $*.d
|
|
||||||
|
|
||||||
# How to compile a C file
|
|
||||||
.c.o:
|
|
||||||
$(PURIFY) @CC@ -c $< @DEFS@ $(CFLAGS) $(CXX_INCLUDES)
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------
|
|
||||||
|
|
||||||
BLASLIB = @buildlib@/libctblas.a
|
|
||||||
|
|
||||||
all: $(BLASLIB)
|
|
||||||
|
|
||||||
OBJS = \
|
|
||||||
dasum.o \
|
|
||||||
daxpy.o \
|
|
||||||
dcabs1.o \
|
|
||||||
dcopy.o \
|
|
||||||
ddot.o \
|
|
||||||
dgbmv.o \
|
|
||||||
dgemm.o \
|
|
||||||
dgemv.o \
|
|
||||||
dger.o \
|
|
||||||
dnrm2.o \
|
|
||||||
drot.o \
|
|
||||||
drotg.o \
|
|
||||||
drotm.o \
|
|
||||||
drotmg.o \
|
|
||||||
dsbmv.o \
|
|
||||||
dscal.o \
|
|
||||||
dsdot.o \
|
|
||||||
dspmv.o \
|
|
||||||
dspr.o \
|
|
||||||
dspr2.o \
|
|
||||||
dswap.o \
|
|
||||||
dsymm.o \
|
|
||||||
dsymv.o \
|
|
||||||
dsyr.o \
|
|
||||||
dsyr2.o \
|
|
||||||
dsyr2k.o \
|
|
||||||
dsyrk.o \
|
|
||||||
dtbmv.o \
|
|
||||||
dtbsv.o \
|
|
||||||
dtpmv.o \
|
|
||||||
dtpsv.o \
|
|
||||||
dtrmm.o \
|
|
||||||
dtrmv.o \
|
|
||||||
dtrsm.o \
|
|
||||||
dtrsv.o \
|
|
||||||
dzasum.o \
|
|
||||||
dznrm2.o \
|
|
||||||
idamax.o \
|
|
||||||
lsame.o \
|
|
||||||
xerbla.o
|
|
||||||
|
|
||||||
SRCS = $(OBJS:.o=.cpp)
|
|
||||||
|
|
||||||
# List of dependency files to be created
|
|
||||||
DEPENDS=$(OBJS:.o=.d)
|
|
||||||
|
|
||||||
# rule to make library
|
|
||||||
$(BLASLIB): $(OBJS)
|
|
||||||
@ARCHIVE@ $(BLASLIB) $(OBJS) > /dev/null
|
|
||||||
ifeq ($(do_ranlib),1)
|
|
||||||
@RANLIB@ $(BLASLIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------
|
|
||||||
# Utility Targets
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(OBJS) $(BLASLIB) *.d .depends
|
|
||||||
|
|
||||||
# depends target
|
|
||||||
depends:
|
|
||||||
$(RM) *.d .depends
|
|
||||||
@MAKE@ .depends
|
|
||||||
|
|
||||||
.depends: $(DEPENDS)
|
|
||||||
cat *.d > .depends
|
|
||||||
|
|
||||||
$(OBJS): Makefile
|
|
||||||
|
|
||||||
ifeq ($(wildcard .depends), .depends)
|
|
||||||
include .depends
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
SET ( CTMATH_SRCS mach.cpp ddaspk.c dgbefa.c dgbsl.c dgefa.c dgesl.c
|
|
||||||
dp1vlu.c dpcoef.c dpolft.c fdump.c j4save.c pcoef.c polfit.c pvalue.c
|
|
||||||
xercnt.c xerhlt.c xermsg.c xerprn.c xersve.c xgetua.c printstring.c)
|
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES ( ${PROJECT_SOURCE_DIR}
|
|
||||||
${PROJECT_SOURCE_DIR}/ext/f2c_libs )
|
|
||||||
|
|
||||||
ADD_LIBRARY( ctmath ${CTMATH_SRCS} )
|
|
||||||
|
|
||||||
41
ext/f2c_math/Makefile.am
Normal file
41
ext/f2c_math/Makefile.am
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
cc_sources = \
|
||||||
|
mach.cpp \
|
||||||
|
ddaspk.c \
|
||||||
|
dgbefa.c \
|
||||||
|
dgbsl.c \
|
||||||
|
dgefa.c \
|
||||||
|
dgesl.c \
|
||||||
|
dp1vlu.c \
|
||||||
|
dpcoef.c \
|
||||||
|
dpolft.c \
|
||||||
|
fdump.c \
|
||||||
|
j4save.c \
|
||||||
|
pcoef.c \
|
||||||
|
polfit.c \
|
||||||
|
pvalue.c \
|
||||||
|
xercnt.c \
|
||||||
|
xerhlt.c \
|
||||||
|
xermsg.c \
|
||||||
|
xerprn.c \
|
||||||
|
xersve.c \
|
||||||
|
xgetua.c \
|
||||||
|
printstring.c
|
||||||
|
|
||||||
|
h_sources = cblas.h gmres.h mkl_cblas.h
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -I../f2c_libs
|
||||||
|
AM_CXXFLAGS = $(AM_CPPFLAGS)
|
||||||
|
AM_FCFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = $(top_builddir)/build/lib/libctmath.la
|
||||||
|
library_includedir = $(top_builddir)/build/include
|
||||||
|
library_include_HEADERS = $(h_sources)
|
||||||
|
|
||||||
|
#-----------------------
|
||||||
|
# Cantera Converters C/C++ library
|
||||||
|
#-----------------------
|
||||||
|
|
||||||
|
__top_builddir__build_lib_libctmath_la_LDFLAGS = $(all_libraries) -release $(GENERIC_RELEASE)
|
||||||
|
__top_builddir__build_lib_libctmath_la_SOURCES = $(cc_sources) $(h_sources)
|
||||||
|
|
||||||
|
CLEANFILES = *.o
|
||||||
|
|
@ -1,112 +0,0 @@
|
||||||
#/bin/sh
|
|
||||||
#
|
|
||||||
# $Source: /cvsroot/cantera/cantera/ext/f2c_math/Makefile.in,v $
|
|
||||||
# $Author: hkmoffa $
|
|
||||||
# $Revision: 1.10 $
|
|
||||||
# $Date: 2008/12/30 21:49:42 $
|
|
||||||
#
|
|
||||||
|
|
||||||
.SUFFIXES :
|
|
||||||
.SUFFIXES : .c .cpp .d .o
|
|
||||||
|
|
||||||
do_ranlib = @DO_RANLIB@
|
|
||||||
|
|
||||||
PURIFY=@PURIFY@
|
|
||||||
|
|
||||||
# the directory where the Cantera libraries are located
|
|
||||||
CANTERA_LIBDIR=@buildlib@
|
|
||||||
|
|
||||||
# the directory where Cantera include files may be found.
|
|
||||||
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
|
||||||
|
|
||||||
# the C++ compiler
|
|
||||||
CXX = @CXX@
|
|
||||||
|
|
||||||
# the C compiler
|
|
||||||
CC = @CC@
|
|
||||||
|
|
||||||
# C++ compile flags
|
|
||||||
PIC_FLAG=@PIC@
|
|
||||||
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
|
|
||||||
CFLAGS = @CFLAGS@ $(CXX_OPT) $(PIC_FLAG)
|
|
||||||
|
|
||||||
# Local include files
|
|
||||||
CXX_INCLUDES=-I../f2c_libs
|
|
||||||
|
|
||||||
# How to compile the dependency file
|
|
||||||
.c.d:
|
|
||||||
@CXX_DEPENDS@ $(CFLAGS) $(CXX_INCLUDES) $*.c > $*.d
|
|
||||||
|
|
||||||
.cpp.d:
|
|
||||||
@CXX_DEPENDS@ $(CXX_FLAGS) $(CXX_INCLUDES) $*.cpp > $*.d
|
|
||||||
|
|
||||||
# How to compile a C file
|
|
||||||
.c.o:
|
|
||||||
$(PURIFY) @CC@ -c $< @DEFS@ $(CFLAGS) $(CXX_INCLUDES)
|
|
||||||
|
|
||||||
# How to compile a Cpp file
|
|
||||||
.cpp.o:
|
|
||||||
$(PURIFY) @CXX@ -c $< @DEFS@ $(CXX_FLAGS) $(CXX_INCLUDES)
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------
|
|
||||||
|
|
||||||
LIB = @buildlib@/libctmath.a
|
|
||||||
|
|
||||||
all: $(LIB)
|
|
||||||
|
|
||||||
OBJS = \
|
|
||||||
mach.o \
|
|
||||||
ddaspk.o \
|
|
||||||
dgbefa.o \
|
|
||||||
dgbsl.o \
|
|
||||||
dgefa.o \
|
|
||||||
dgesl.o \
|
|
||||||
dp1vlu.o \
|
|
||||||
dpcoef.o \
|
|
||||||
dpolft.o \
|
|
||||||
fdump.o \
|
|
||||||
j4save.o \
|
|
||||||
pcoef.o \
|
|
||||||
polfit.o \
|
|
||||||
pvalue.o \
|
|
||||||
xercnt.o \
|
|
||||||
xerhlt.o \
|
|
||||||
xermsg.o \
|
|
||||||
xerprn.o \
|
|
||||||
xersve.o \
|
|
||||||
xgetua.o \
|
|
||||||
printstring.o
|
|
||||||
|
|
||||||
SRCS = $(OBJS:.o=.cpp)
|
|
||||||
|
|
||||||
# List of dependency files to be created
|
|
||||||
DEPENDS=$(OBJS:.o=.d)
|
|
||||||
|
|
||||||
# How to make the static library
|
|
||||||
$(LIB): $(OBJS)
|
|
||||||
@ARCHIVE@ $(LIB) $(OBJS)
|
|
||||||
ifeq ($(do_ranlib),1)
|
|
||||||
@RANLIB@ $(LIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ------------------------------------------------
|
|
||||||
# Utility Targets
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(OBJS) $(LIB) *.d .depends
|
|
||||||
|
|
||||||
# depends target
|
|
||||||
depends:
|
|
||||||
$(RM) *.d .depends
|
|
||||||
@MAKE@ .depends
|
|
||||||
|
|
||||||
.depends: $(DEPENDS)
|
|
||||||
cat *.d > .depends
|
|
||||||
|
|
||||||
$(OBJS): Makefile
|
|
||||||
|
|
||||||
ifeq ($(wildcard .depends), .depends)
|
|
||||||
include .depends
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ AM_CXXFLAGS = $(AM_CPPFLAGS)
|
||||||
LINK = -lctcxx -luser -loneD -lzeroD -lequil -lkinetics -ltransport -lthermo
|
LINK = -lctcxx -luser -loneD -lzeroD -lequil -lkinetics -ltransport -lthermo
|
||||||
LINK += -lctnumerics -lctmath -ltpx -lctspectra -lconverters -lctbase -lcvode
|
LINK += -lctnumerics -lctmath -ltpx -lctspectra -lconverters -lctbase -lcvode
|
||||||
LINK += -lctlapack -lctblas -lctf2c -lm -lstdc++
|
LINK += -lctlapack -lctblas -lctf2c -lm -lstdc++
|
||||||
AM_LDFLAGS = -L/workspace/src/cantera/pecos_autotools/build/lib/
|
AM_LDFLAGS = -L$(top_builddir)/build/lib/
|
||||||
LIBS = $(LINK)
|
LIBS = $(LINK)
|
||||||
|
|
||||||
bin_PROGRAMS = DH_graph_1
|
bin_PROGRAMS = DH_graph_1
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue