*** empty log message ***
This commit is contained in:
parent
4f0c424fb7
commit
a75e7f10be
4 changed files with 27 additions and 29 deletions
|
|
@ -314,7 +314,7 @@
|
|||
;;
|
||||
mac)
|
||||
#----------------------------------------------------------------------------
|
||||
CC='g++3'
|
||||
CC='g++2'
|
||||
CFLAGS='-fno-common -traditional-cpp'
|
||||
|
||||
CLIBS="$MLIBS"
|
||||
|
|
@ -322,8 +322,8 @@
|
|||
COPTIMFLAGS='-O3 -DNDEBUG'
|
||||
CDEBUGFLAGS='-g'
|
||||
|
||||
if [ -f /usr/bin/g++3 ]; then
|
||||
CXX=g++3
|
||||
if [ -f /usr/bin/g++2 ]; then
|
||||
CXX=g++2
|
||||
else
|
||||
CXX=c++
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -2,23 +2,30 @@
|
|||
#include "mex.h"
|
||||
#include "ctmatutils.h"
|
||||
#include "../../../clib/src/ctfunc.h"
|
||||
|
||||
#include "../../../clib/src/ct.h"
|
||||
|
||||
void funcmethods( int nlhs, mxArray *plhs[],
|
||||
int nrhs, const mxArray *prhs[] )
|
||||
{
|
||||
int job = getInt(prhs[1]);
|
||||
int nn;
|
||||
double* ptr = 0;
|
||||
|
||||
// constructor
|
||||
if (job == 0) {
|
||||
int type = getInt(prhs[2]);
|
||||
int n = getInt(prhs[3]);
|
||||
double* ptr = mxGetPr(prhs[4]);
|
||||
int msize = mxGetM(prhs[4]);
|
||||
int nsize = mxGetN(prhs[4]);
|
||||
int lenp = msize*nsize;
|
||||
nn = func_new(type, n, lenp, ptr);
|
||||
if (type < 20) {
|
||||
ptr = mxGetPr(prhs[4]);
|
||||
int msize = mxGetM(prhs[4]);
|
||||
int nsize = mxGetN(prhs[4]);
|
||||
int lenp = msize*nsize;
|
||||
nn = func_new(type, n, lenp, ptr);
|
||||
}
|
||||
else {
|
||||
int m = getInt(prhs[4]);
|
||||
nn = func_new(type, n, m, ptr);
|
||||
}
|
||||
plhs[0] = mxCreateNumericMatrix(1,1,mxDOUBLE_CLASS,mxREAL);
|
||||
double *h = mxGetPr(plhs[0]);
|
||||
*h = double(nn);
|
||||
|
|
@ -32,7 +39,7 @@ void funcmethods( int nlhs, mxArray *plhs[],
|
|||
double v;
|
||||
int i = getInt(prhs[2]);
|
||||
if (job == 1) {
|
||||
nn = func_del(int i);
|
||||
nn = func_del(i);
|
||||
if (nn < 0) reportError();
|
||||
v = double(nn);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ mex private/ctmethods.cpp private/ctfunctions.cpp ...
|
|||
private/thermomethods.cpp private/kineticsmethods.cpp ...
|
||||
private/transportmethods.cpp private/reactormethods.cpp ...
|
||||
private/wallmethods.cpp private/flowdevicemethods.cpp ...
|
||||
prinvate/funcmethods.cpp ...
|
||||
private/funcmethods.cpp ...
|
||||
private/onedimmethods.cpp private/surfmethods.cpp private/write.cpp ...
|
||||
"""+'-I'+incdir+' -L'+libdir+' '+libs+'\n'+"""disp('done.');
|
||||
""")
|
||||
|
|
|
|||
|
|
@ -1,36 +1,27 @@
|
|||
|
||||
import sys
|
||||
|
||||
bindir = '/home/goodwin/ct153c/bin'
|
||||
libdir = '/home/goodwin/dv/sf/cantera/build/lib/i686-pc-linux-gnu'
|
||||
incdir = '/home/goodwin/dv/sf/cantera/build/include'
|
||||
dflibdir = ''
|
||||
|
||||
libs = ['clib', 'oneD', 'zeroD', 'transport', 'cantera', 'recipes',
|
||||
'cvode', 'ctlapack', 'ctmath', 'ctblas', 'tpx']
|
||||
bindir = '/usr/local/bin'
|
||||
libdir = '/Users/dgg/dv/sf/cantera/build/lib/powerpc-apple-darwin7.2.0'
|
||||
incdir = '/Users/dgg/dv/sf/cantera/build/include'
|
||||
libs = '-lclib -loneD -lzeroD -ltransport -lcantera -lrecipes -lcvode -lctlapack -lctmath -lctblas -ltpx -lg2c -lgcc'
|
||||
|
||||
f = open('setup.m','w')
|
||||
f.write('cd cantera\nbuild_cantera\nexit\n')
|
||||
f.write('cd cantera\nbuildux\nexit\n')
|
||||
f.close()
|
||||
|
||||
fb = open('cantera/build_cantera.m','w')
|
||||
fb = open('cantera/buildux.m','w')
|
||||
fb.write("""
|
||||
disp('building Cantera..');
|
||||
mex -I"""+incdir+""" private/ctmethods.cpp private/ctfunctions.cpp ...
|
||||
mex 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/wallmethods.cpp private/flowdevicemethods.cpp ...
|
||||
private/funcmethods.cpp ...
|
||||
private/funcmethods.cpp ...
|
||||
private/onedimmethods.cpp private/surfmethods.cpp private/write.cpp ...
|
||||
"""+'-I'+incdir+' -L'+libdir+' '+libs+'\n'+"""disp('done.');
|
||||
""")
|
||||
s = ''
|
||||
for lib in libs:
|
||||
s += ' '+libdir+'/'+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')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue