First fixes to make it compile.

This commit is contained in:
Harry Moffat 2009-02-14 19:55:39 +00:00
parent 0127285b88
commit 06be63229c
4 changed files with 56 additions and 34 deletions

View file

@ -15,7 +15,7 @@
#endif #endif
#include "ThermoPhase.h" #include "ThermoPhase.h"
#include "LiquidTransport.h" #include "AqueousTransport.h"
#include "utilities.h" #include "utilities.h"
#include "TransportParams.h" #include "TransportParams.h"
@ -437,14 +437,14 @@ namespace Cantera {
doublereal pres = m_thermo->pressure(); doublereal pres = m_thermo->pressure();
// Check for changes in the mole fraction vector. // Check for changes in the mole fraction vector.
int iStateNew = m_thermo->getIStateMF(); //int iStateNew = m_thermo->getIStateMF();
if (iStateNew == m_iStateMF) { //if (iStateNew == m_iStateMF) {
if (pres == m_press) { // if (pres == m_press) {
return; // return;
} // }
} else { // } else {
m_iStateMF = iStateNew; // m_iStateMF = iStateNew;
} //}
m_press = pres; m_press = pres;
// signal that concentration-dependent quantities will need to // signal that concentration-dependent quantities will need to
@ -688,7 +688,7 @@ namespace Cantera {
} }
//! invert and solve the system Ax = b. Answer is in m_B //! invert and solve the system Ax = b. Answer is in m_B
solve(m_A, m_B); //solve(m_A, m_B);
m_flux = m_B; m_flux = m_B;
@ -718,7 +718,7 @@ namespace Cantera {
} }
//! invert and solve the system Ax = b. Answer is in m_B //! invert and solve the system Ax = b. Answer is in m_B
solve(m_A, m_B); //solve(m_A, m_B);
m_flux = m_B; m_flux = m_B;

View file

@ -424,14 +424,14 @@ namespace Cantera {
doublereal pres = m_thermo->pressure(); doublereal pres = m_thermo->pressure();
// Check for changes in the mole fraction vector. // Check for changes in the mole fraction vector.
int iStateNew = m_thermo->getIStateMF(); //int iStateNew = m_thermo->getIStateMF();
if (iStateNew == m_iStateMF) { //if (iStateNew == m_iStateMF) {
if (pres == m_press) { // if (pres == m_press) {
return; // return;
} // }
} else { // } else {
m_iStateMF = iStateNew; // m_iStateMF = iStateNew;
} //}
m_press = pres; m_press = pres;
// signal that concentration-dependent quantities will need to // signal that concentration-dependent quantities will need to
@ -675,7 +675,7 @@ namespace Cantera {
} }
//! invert and solve the system Ax = b. Answer is in m_B //! invert and solve the system Ax = b. Answer is in m_B
solve(m_A, m_B); //solve(m_A, m_B);
m_flux = m_B; m_flux = m_B;
@ -705,7 +705,7 @@ namespace Cantera {
} }
//! invert and solve the system Ax = b. Answer is in m_B //! invert and solve the system Ax = b. Answer is in m_B
solve(m_A, m_B); //solve(m_A, m_B);
m_flux = m_B; m_flux = m_B;

View file

@ -1,6 +1,6 @@
#/bin/sh #/bin/sh
############################################################### ###############################################################
# $Author$ #
# $Date$ # $Date$
# $Revision$ # $Revision$
# #
@ -15,6 +15,10 @@ INCDIR = ../../../build/include/cantera/kernel
INSTALL_TSC = ../../../bin/install_tsc INSTALL_TSC = ../../../bin/install_tsc
do_ranlib = @DO_RANLIB@ do_ranlib = @DO_RANLIB@
do_electro = @COMPILE_ELECTROLYTES@
do_issp = @COMPILE_IDEAL_SOLUTIONS@
PURIFY=@PURIFY@ PURIFY=@PURIFY@
PIC_FLAG=@PIC@ PIC_FLAG=@PIC@
@ -27,25 +31,40 @@ else
endif endif
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG) $(DEBUG_FLAG) CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG) $(DEBUG_FLAG)
# Transport Object Files # Base Transport Object Files
OBJS = TransportFactory.o MultiTransport.o MixTransport.o MMCollisionInt.o \ TRAN_OBJ = TransportFactory.o MultiTransport.o MixTransport.o MMCollisionInt.o \
SolidTransport.o DustyGasTransport.o LiquidTransport.o SolidTransport.o DustyGasTransport.o
TRAN_H = TransportFactory.h MultiTransport.h MixTransport.h \ TRAN_H = TransportFactory.h MultiTransport.h MixTransport.h \
MMCollisionInt.h SolidTransport.h DustyGasTransport.h \ MMCollisionInt.h SolidTransport.h DustyGasTransport.h \
TransportBase.h L_matrix.h TransportParams.h LiquidTransport.h TransportBase.h L_matrix.h TransportParams.h
ifeq ($(do_electro),1)
do_issp = 1
ELECTRO_OBJ = AqueousTransport.o
ELECTRO_H = AqueousTransport.h
endif
ifeq ($(do_issp),1)
ISSP_OBJ = LiquidTransport.o
ISSP_H = LiquidTransport.h LiquidTransportParams.h
endif
CATRAN_OBJ = $(TRAN_OBJ) $(ELECTRO_OBJ) $(ISSP_OBJ)
CATRAN_H = $(TRAN_H) $(ELECTRO_H) $(ISSP_H)
CXX_INCLUDES = -I../base -I../thermo -I../numerics @CXX_INCLUDES@ CXX_INCLUDES = -I../base -I../thermo -I../numerics @CXX_INCLUDES@
LIB = @buildlib@/libtransport.a LIB = @buildlib@/libtransport.a
DEPENDS = $(OBJS:.o=.d) DEPENDS = $(CATRAN_OBJ:.o=.d)
all: $(LIB) .depends all: $(LIB) .depends
@(@INSTALL@ -d $(INCDIR)) @(@INSTALL@ -d $(INCDIR))
@(for lh in $(TRAN_H) ; do \ @(for lh in $(CATRAN_H) ; do \
$(INSTALL_TSC) "$${lh}" $(INCDIR) ; \ $(INSTALL_TSC) "$${lh}" $(INCDIR) ; \
done) done)
%.d: Makefile %.o %.d: Makefile %.o
@ -54,14 +73,14 @@ all: $(LIB) .depends
.cpp.o: .cpp.o:
$(PURIFY) @CXX@ -c $< $(CXX_FLAGS) $(CXX_INCLUDES) $(PURIFY) @CXX@ -c $< $(CXX_FLAGS) $(CXX_INCLUDES)
$(LIB): $(OBJS) $(TRAN_H) $(LIB): $(CATRAN_OBJ) $(CATRAN_H)
@ARCHIVE@ $(LIB) $(OBJS) > /dev/null @ARCHIVE@ $(LIB) $(CATRAN_OBJ) > /dev/null
ifeq ($(do_ranlib),1) ifeq ($(do_ranlib),1)
@RANLIB@ $(LIB) @RANLIB@ $(LIB)
endif endif
clean: clean:
@(for lh in $(TRAN_H) ; do \ @(for lh in $(CATRAN_H) ; do \
th=$(INCDIR)/"$${lh}" ; \ th=$(INCDIR)/"$${lh}" ; \
if test -f "$${th}" ; then \ if test -f "$${th}" ; then \
$(RM) "$${th}" ; \ $(RM) "$${th}" ; \
@ -83,9 +102,8 @@ depends:
.depends: $(DEPENDS) .depends: $(DEPENDS)
cat *.d > .depends cat *.d > .depends
$(OBJS): Makefile $(CATRAN_OBJ): Makefile
$(OBJS): Makefile
TAGS: TAGS:
etags *.h *.cpp etags *.h *.cpp

View file

@ -337,14 +337,18 @@ namespace Cantera {
dtr = (DustyGasTransport*)tr; dtr = (DustyGasTransport*)tr;
dtr->initialize(phase, gastr); dtr->initialize(phase, gastr);
break; break;
#ifdef WITH_IDEAL_SOLUTIONS
case cLiquidTransport: case cLiquidTransport:
tr = new LiquidTransport; tr = new LiquidTransport;
tr->setThermo(*phase); tr->setThermo(*phase);
break; break;
#endif
#ifdef WITH_ELECTROLYTES
case cAqueousTransport: case cAqueousTransport:
tr = new AqueousTransport; tr = new AqueousTransport;
tr->setThermo(*phase); tr->setThermo(*phase);
break; break;
#endif
default: default:
throw CanteraError("newTransport","unknown transport model"); throw CanteraError("newTransport","unknown transport model");
} }