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
#include "ThermoPhase.h"
#include "LiquidTransport.h"
#include "AqueousTransport.h"
#include "utilities.h"
#include "TransportParams.h"
@ -437,14 +437,14 @@ namespace Cantera {
doublereal pres = m_thermo->pressure();
// Check for changes in the mole fraction vector.
int iStateNew = m_thermo->getIStateMF();
if (iStateNew == m_iStateMF) {
if (pres == m_press) {
return;
}
} else {
m_iStateMF = iStateNew;
}
//int iStateNew = m_thermo->getIStateMF();
//if (iStateNew == m_iStateMF) {
// if (pres == m_press) {
// return;
// }
// } else {
// m_iStateMF = iStateNew;
//}
m_press = pres;
// 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
solve(m_A, m_B);
//solve(m_A, m_B);
m_flux = m_B;
@ -718,7 +718,7 @@ namespace Cantera {
}
//! 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;

View file

@ -424,14 +424,14 @@ namespace Cantera {
doublereal pres = m_thermo->pressure();
// Check for changes in the mole fraction vector.
int iStateNew = m_thermo->getIStateMF();
if (iStateNew == m_iStateMF) {
if (pres == m_press) {
return;
}
} else {
m_iStateMF = iStateNew;
}
//int iStateNew = m_thermo->getIStateMF();
//if (iStateNew == m_iStateMF) {
// if (pres == m_press) {
// return;
// }
// } else {
// m_iStateMF = iStateNew;
//}
m_press = pres;
// 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
solve(m_A, m_B);
//solve(m_A, m_B);
m_flux = m_B;
@ -705,7 +705,7 @@ namespace Cantera {
}
//! 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;

View file

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

View file

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