took out formatConcentrationString. It wasn't being used.

This commit is contained in:
Harry Moffat 2009-01-14 22:46:32 +00:00
parent a6c0284257
commit 2bbbe08cff
5 changed files with 35 additions and 45 deletions

View file

@ -129,7 +129,6 @@ namespace Cantera {
const char delim = ' ');
std::string formatCompList(const Phase& mix, int xyc);
std::string logfileName(const std::string& infile);
std::string getFileName(const std::string& path);

View file

@ -2081,6 +2081,8 @@ namespace Cantera {
*/
std::string report(const ThermoPhase& th, const bool show_thermo = true);
}
#endif

View file

@ -53,47 +53,7 @@ namespace Cantera {
writelog(s+"\n");
}
//! Format a composition list for output.
/*!
* Depending upon xyc, this creates a list of
* mole fractions, mass fractions, or concentrations.
*
* @param mix Mixture to create a list from
* @param xyc Integer 0 mole fractions
* 1 mass fractions
* 2 concentrations
*
* @return Returns a string containing the list
*/
std::string formatCompList(const Phase& mix, int xyc) {
const doublereal Threshold = 1.e-20;
char p[200];
string s = "";
int kk = mix.nSpecies();
array_fp zz(kk);
switch (xyc) {
case 0: mix.getMoleFractions(&zz[0]); break;
case 1: mix.getMassFractions(&zz[0]); break;
case 2: mix.getConcentrations(&zz[0]); break;
default: return "error: xyc must be 0, 1, or 2";
}
doublereal z;
int k;
for (k = 0; k < kk; k++) {
z = fabs(zz[k]);
if (z < Threshold) zz[k] = 0.0;
}
for (k = 0; k < kk; k++) {
sprintf(p, "%18s\t %12.6e\n", mix.speciesName(k).c_str(),
zz[k]);
s += p;
}
return s;
}
}

24
configure vendored
View file

@ -308,7 +308,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BITCOMPILE BITHARDWARE BITCHANGE ldemulationarg CVF_LIBDIR USE_CLIB_DLL local_inst local_python_inst python_prefix python_win_prefix ctversion homedir ct_libdir ct_bindir ct_incdir ct_incroot ct_datadir ct_demodir ct_templdir ct_tutdir ct_docdir ct_dir ct_mandir COMPACT_INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os username ctroot buildinc buildlib buildbin MAKE GRAPHVIZDIR ARCHIVE DO_RANLIB RANLIB CXX_DEPENDS USERDIR INCL_USER_CODE CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT use_sundials CVODE_LIBS IDA_LIBS sundials_include CANTERA_DEBUG_MODE COMPILE_PURE_FLUIDS phase_object_files phase_header_files COMPILE_IDEAL_SOLUTIONS COMPILE_ELECTROLYTES NEED_CATHERMO COMPILE_KINETICS COMPILE_HETEROKIN COMPILE_RXNPATH WITH_REACTORS KERNEL KERNEL_OBJ BUILD_CK LIB_DIR COMPILE_VCSNONIDEAL COMPILE_H298MODIFY_CAPABILITY BOOST_INCLUDE BOOST_LIB PURIFY build_lapack build_blas BLAS_LAPACK_LIBS BLAS_LAPACK_LINK BLAS_LAPACK_DIR build_with_f2c build_f2c_lib F2C_SYSTEMLIB BOOST_LIB_DIR LOCAL_LIB_DIRS LOCAL_LIBS LOCAL_LIBS_DEP INSTALL_LIBS_DEP RAW_LIBS_DEP CANTERA_CORE_LIBS CANTERA_CORE_LIBS_DEP CT_SHARED_LIB PYTHON_CMD BUILD_PYTHON NUMARRAY_INC_DIR NUMARRAY_HOME CANTERA_PYTHON_HOME CVSTAG MATLAB_CMD BUILD_MATLAB BUILD_CLIB export_name PIC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC CFLAGS ac_ct_CC CXXCPP EGREP SOEXT SHARED CXX_INCLUDES LCXX_FLAGS LCXX_END_LIBS HAVE_STRIPSYMBOLS F77 FFLAGS ac_ct_F77 FLIBS F90 BUILD_F90 F90FLAGS F90BUILDFLAGS F90LIBS precompile_headers OS_IS_DARWIN OS_IS_WIN OS_IS_CYGWIN SHARED_CTLIB mex_ext F77_EXT CXX_EXT OBJ_EXT EXE_EXT math_libs SO LDSHARED EXTRA_LINK TSCOMPARE_abs INSTALL_abs INSTALL_VERBOSE LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BITCOMPILE BITHARDWARE BITCHANGE ldemulationarg CVF_LIBDIR USE_CLIB_DLL local_inst local_python_inst python_prefix python_win_prefix ctversion homedir ct_libdir ct_bindir ct_incdir ct_incroot ct_datadir ct_demodir ct_templdir ct_tutdir ct_docdir ct_dir ct_mandir COMPACT_INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os username ctroot buildinc buildlib buildbin MAKE GRAPHVIZDIR ARCHIVE DO_RANLIB RANLIB CXX_DEPENDS USERDIR INCL_USER_CODE CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT use_sundials CVODE_LIBS IDA_LIBS sundials_include sundials_lib_dir sundials_lib sundials_lib_dep CANTERA_DEBUG_MODE COMPILE_PURE_FLUIDS phase_object_files phase_header_files COMPILE_IDEAL_SOLUTIONS COMPILE_ELECTROLYTES NEED_CATHERMO COMPILE_KINETICS COMPILE_HETEROKIN COMPILE_RXNPATH WITH_REACTORS KERNEL KERNEL_OBJ BUILD_CK LIB_DIR COMPILE_VCSNONIDEAL COMPILE_H298MODIFY_CAPABILITY BOOST_INCLUDE BOOST_LIB PURIFY build_lapack build_blas BLAS_LAPACK_LIBS BLAS_LAPACK_LINK BLAS_LAPACK_DIR build_with_f2c build_f2c_lib F2C_SYSTEMLIB BOOST_LIB_DIR LOCAL_LIB_DIRS LOCAL_LIBS LOCAL_LIBS_DEP INSTALL_LIBS_DEP RAW_LIBS_DEP CANTERA_CORE_LIBS CANTERA_CORE_LIBS_DEP CT_SHARED_LIB PYTHON_CMD BUILD_PYTHON NUMARRAY_INC_DIR NUMARRAY_HOME CANTERA_PYTHON_HOME CVSTAG MATLAB_CMD BUILD_MATLAB BUILD_CLIB export_name PIC INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC CFLAGS ac_ct_CC CXXCPP EGREP SOEXT SHARED CXX_INCLUDES LCXX_FLAGS LCXX_END_LIBS HAVE_STRIPSYMBOLS F77 FFLAGS ac_ct_F77 FLIBS F90 BUILD_F90 F90FLAGS F90BUILDFLAGS F90LIBS precompile_headers OS_IS_DARWIN OS_IS_WIN OS_IS_CYGWIN SHARED_CTLIB mex_ext F77_EXT CXX_EXT OBJ_EXT EXE_EXT math_libs SO LDSHARED EXTRA_LINK TSCOMPARE_abs INSTALL_abs INSTALL_VERBOSE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -2425,6 +2425,10 @@ fi
if test "x$USE_SUNDIALS" = "xy"; then
use_sundials=1
fi
sundials_lib_dir=
sundials_lib=
sundials_lib_dep=
if test ${use_sundials} = 1; then
cat >>confdefs.h <<\_ACEOF
@ -2444,6 +2448,9 @@ _ACEOF
sundials_include='-I'${SUNDIALS_HOME}'/include -I'${SUNDIALS_HOME}'/include/sundials -I'${SUNDIALS_HOME}'/include/cvodes -I'${SUNDIALS_HOME}'/include/ida'
echo "sundials include directory: " ${sundials_include}
echo "sundials library directory: " $SUNDIALS_LIB_DIR
sundials_lib_dir=$SUNDIALS_LIB_DIR
sundials_lib="-L$SUNDIALS_LIB_DIR -lsundials_cvodes -lsundials_ida -lsundials_nvecserial"
sundials_lib_dep="$SUNDIALS_LIB_DIR/libsundials_cvodes.a $SUNDIALS_LIB_DIR/libsundials_ida.a $SUNDIALS_LIB_DIR/libsundials_nvecserial.a"
else
cat >>confdefs.h <<\_ACEOF
#define SUNDIALS_VERSION_23 1
@ -2452,6 +2459,9 @@ _ACEOF
sundials_include='-I'${SUNDIALS_INC_DIR}
echo "sundials include directory: " ${sundials_include}
echo "sundials library directory: " $SUNDIALS_LIB_DIR
sundials_lib_dir=$SUNDIALS_LIB_DIR
sundials_lib="-L$SUNDIALS_LIB_DIR -lsundials_cvodes -lsundials_ida -lsundials_nvecserial"
sundials_lib_dep="$SUNDIALS_LIB_DIR/libsundials_cvodes.a $SUNDIALS_LIB_DIR/libsundials_ida.a $SUNDIALS_LIB_DIR/libsundials_nvecserial.a"
# python tools/src/sundials_version.py $SUNDIALS_HOME
fi
fi
@ -2467,6 +2477,9 @@ fi
#########################################################
# The Cantera Kernel
#########################################################
@ -8688,7 +8701,7 @@ fi
# Provide some information about the compiler.
echo "$as_me:8691:" \
echo "$as_me:8704:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@ -8891,7 +8904,7 @@ _ACEOF
# flags.
ac_save_FFLAGS=$FFLAGS
FFLAGS="$FFLAGS $ac_verb"
(eval echo $as_me:8894: \"$ac_link\") >&5
(eval echo $as_me:8907: \"$ac_link\") >&5
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
echo "$ac_f77_v_output" >&5
FFLAGS=$ac_save_FFLAGS
@ -8969,7 +8982,7 @@ _ACEOF
# flags.
ac_save_FFLAGS=$FFLAGS
FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
(eval echo $as_me:8972: \"$ac_link\") >&5
(eval echo $as_me:8985: \"$ac_link\") >&5
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
echo "$ac_f77_v_output" >&5
FFLAGS=$ac_save_FFLAGS
@ -10202,6 +10215,9 @@ s,@use_sundials@,$use_sundials,;t t
s,@CVODE_LIBS@,$CVODE_LIBS,;t t
s,@IDA_LIBS@,$IDA_LIBS,;t t
s,@sundials_include@,$sundials_include,;t t
s,@sundials_lib_dir@,$sundials_lib_dir,;t t
s,@sundials_lib@,$sundials_lib,;t t
s,@sundials_lib_dep@,$sundials_lib_dep,;t t
s,@CANTERA_DEBUG_MODE@,$CANTERA_DEBUG_MODE,;t t
s,@COMPILE_PURE_FLUIDS@,$COMPILE_PURE_FLUIDS,;t t
s,@phase_object_files@,$phase_object_files,;t t

View file

@ -362,6 +362,10 @@ fi
if test "x$USE_SUNDIALS" = "xy"; then
use_sundials=1
fi
sundials_lib_dir=
sundials_lib=
sundials_lib_dep=
if test ${use_sundials} = 1; then
AC_DEFINE(HAS_SUNDIALS)
@ -375,11 +379,17 @@ AC_DEFINE(SUNDIALS_VERSION_22)
sundials_include='-I'${SUNDIALS_HOME}'/include -I'${SUNDIALS_HOME}'/include/sundials -I'${SUNDIALS_HOME}'/include/cvodes -I'${SUNDIALS_HOME}'/include/ida'
echo "sundials include directory: " ${sundials_include}
echo "sundials library directory: " $SUNDIALS_LIB_DIR
sundials_lib_dir=$SUNDIALS_LIB_DIR
sundials_lib="-L$SUNDIALS_LIB_DIR -lsundials_cvodes -lsundials_ida -lsundials_nvecserial"
sundials_lib_dep="$SUNDIALS_LIB_DIR/libsundials_cvodes.a $SUNDIALS_LIB_DIR/libsundials_ida.a $SUNDIALS_LIB_DIR/libsundials_nvecserial.a"
else
AC_DEFINE(SUNDIALS_VERSION_23)
sundials_include='-I'${SUNDIALS_INC_DIR}
echo "sundials include directory: " ${sundials_include}
echo "sundials library directory: " $SUNDIALS_LIB_DIR
sundials_lib_dir=$SUNDIALS_LIB_DIR
sundials_lib="-L$SUNDIALS_LIB_DIR -lsundials_cvodes -lsundials_ida -lsundials_nvecserial"
sundials_lib_dep="$SUNDIALS_LIB_DIR/libsundials_cvodes.a $SUNDIALS_LIB_DIR/libsundials_ida.a $SUNDIALS_LIB_DIR/libsundials_nvecserial.a"
# python tools/src/sundials_version.py $SUNDIALS_HOME
fi
fi
@ -393,6 +403,9 @@ AC_SUBST(use_sundials)
AC_SUBST(CVODE_LIBS)
AC_SUBST(IDA_LIBS)
AC_SUBST(sundials_include)
AC_SUBST(sundials_lib_dir)
AC_SUBST(sundials_lib)
AC_SUBST(sundials_lib_dep)
#########################################################