Committing recent developments on the windows build
This commit is contained in:
parent
cd16354fd0
commit
c245407535
12 changed files with 83 additions and 34 deletions
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* @file ctfunctions.cpp
|
||||
*/
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "mex.h"
|
||||
#include "../../../clib/src/ct.h"
|
||||
|
|
@ -22,11 +28,8 @@ void ctfunctions( int nlhs, mxArray *plhs[],
|
|||
int nrhs, const mxArray *prhs[] )
|
||||
{
|
||||
int job = getInt(prhs[1]);
|
||||
|
||||
int j, m, iok, id, dbg, validate;
|
||||
char *file, *key, *val;
|
||||
|
||||
char *infile, *dbfile, *trfile, *outfile, *idtag;
|
||||
int iok, dbg, validate;
|
||||
char *infile, *dbfile, *trfile, *idtag;
|
||||
int buflen;
|
||||
char* output_buf;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@
|
|||
*/
|
||||
|
||||
#include "../../../clib/src/ct.h"
|
||||
#include <string>
|
||||
//#include "../../../src/base/ct_defs.h"
|
||||
//#include "../../../src/base/global.h"
|
||||
//#include "../../../src/base/logger.h"
|
||||
#include "mex.h"
|
||||
#include "ctmatutils.h"
|
||||
#include "mllogger.h"
|
||||
|
|
@ -76,7 +80,9 @@ static Cantera::ML_Logger* _logger = 0;
|
|||
void initLogger() {
|
||||
if (!_logger) {
|
||||
_logger = new Cantera::ML_Logger;
|
||||
setLogWriter(_logger);
|
||||
// Call the DLL program to set the logger
|
||||
void * vl = (void *) _logger;
|
||||
int retn = setLogWriter(vl);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +92,8 @@ extern "C" {
|
|||
void mexFunction( int nlhs, mxArray *plhs[],
|
||||
int nrhs, const mxArray *prhs[] )
|
||||
{
|
||||
|
||||
// mexPrintf("Number of lhs = %d\n", nlhs);
|
||||
// mexPrintf("number of rhs = %d\n", nrhs);
|
||||
// create a log writer for error messages if this is the
|
||||
// first MATLAB function call
|
||||
initLogger();
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@
|
|||
void flowdevicemethods( int nlhs, mxArray *plhs[],
|
||||
int nrhs, const mxArray *prhs[] )
|
||||
{
|
||||
int j, m, iok, n;
|
||||
char *file, *key, *val;
|
||||
|
||||
int m, iok, n;
|
||||
int job = getInt(prhs[1]);
|
||||
int i = getInt(prhs[2]);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
|
||||
/**
|
||||
* @file mixturemethods.cpp
|
||||
*/
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
#include "mex.h"
|
||||
#include "../../../clib/src/ctmultiphase.h"
|
||||
#include "../../../clib/src/ct.h"
|
||||
|
|
@ -9,9 +14,7 @@ using namespace std;
|
|||
void mixturemethods( int nlhs, mxArray *plhs[],
|
||||
int nrhs, const mxArray *prhs[] )
|
||||
{
|
||||
int j, m, iok, n;
|
||||
char *file, *key, *val;
|
||||
|
||||
int m, iok, n;
|
||||
int job = getInt(prhs[1]);
|
||||
int i = getInt(prhs[2]);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
/**
|
||||
* @file mlloger.h
|
||||
*/
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef MLLOGGER_H
|
||||
#define MLLOGGER_H
|
||||
|
||||
|
|
@ -6,9 +13,9 @@
|
|||
#include "cantera/kernel/logger.h"
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
//using namespace std;
|
||||
|
||||
static string ss = "disp(' ";
|
||||
static std::string ss = "disp(' ";
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
|
|
@ -18,7 +25,7 @@ namespace Cantera {
|
|||
virtual ~ML_Logger() {}
|
||||
|
||||
|
||||
virtual void write(const string& s) {
|
||||
virtual void write(const std::string& s) {
|
||||
char ch = s[0];
|
||||
int n = 0;
|
||||
while (ch != '\0') {
|
||||
|
|
@ -36,10 +43,14 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
virtual void writeendl(const std::string& msg) {
|
||||
mexPrintf("\n");
|
||||
}
|
||||
|
||||
virtual void error(const string& msg) {
|
||||
string err = "error("+msg+");";
|
||||
mexEvalString(err.c_str());
|
||||
virtual void error(const std::string& msg) {
|
||||
std::string err = "error("+msg+");";
|
||||
//mexEvalString(err.c_str());
|
||||
mexErrMsgTxt(err.c_str());
|
||||
}
|
||||
|
||||
virtual int env() {
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ void onedimmethods( int nlhs, mxArray *plhs[],
|
|||
double lower, upper, rtol, atol, *grid, *pos, *values,
|
||||
mdot, t, p, val, *temp, ratio, slope, curve, tstep, *dts,
|
||||
rdt, prune;
|
||||
int nlower, nupper, nr, na, npts, np, nv, comp, localPoint, idom,
|
||||
int npts, np, nv, comp, localPoint, idom,
|
||||
loglevel, refine_grid, n, flag, itime, ns, *nsteps, icount,
|
||||
onoff, ss_age, ts_age;
|
||||
char *xstr, *fname, *id, *desc, *name;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* @file phasemethods.cpp
|
||||
*/
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "mex.h"
|
||||
#include "ctmatutils.h"
|
||||
|
|
@ -12,7 +18,6 @@
|
|||
int job = getInt(prhs[2]);
|
||||
|
||||
bool ok = true;
|
||||
int status, buflen;
|
||||
char* input_buf;
|
||||
double* ptr = 0;
|
||||
int n, nsp, mjob, show_thermo;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* @file reactormethods.cpp
|
||||
*/
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "mex.h"
|
||||
#include "../../../clib/src/ctreactor.h"
|
||||
|
|
@ -7,8 +13,7 @@
|
|||
void reactormethods( int nlhs, mxArray *plhs[],
|
||||
int nrhs, const mxArray *prhs[] )
|
||||
{
|
||||
int j, m, iok, n;
|
||||
char *file, *key, *val;
|
||||
int iok, n;
|
||||
|
||||
int job = getInt(prhs[1]);
|
||||
int i = getInt(prhs[2]);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* @file reactornetmethods.cpp
|
||||
*/
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "mex.h"
|
||||
#include "../../../clib/src/ctreactor.h"
|
||||
|
|
@ -9,9 +15,7 @@
|
|||
void reactornetmethods( int nlhs, mxArray *plhs[],
|
||||
int nrhs, const mxArray *prhs[] )
|
||||
{
|
||||
int j, m, iok, n;
|
||||
char *file, *key, *val;
|
||||
|
||||
int iok, n;
|
||||
int job = getInt(prhs[1]);
|
||||
int i = getInt(prhs[2]);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
|
||||
/**
|
||||
* @file thermomethods.cpp
|
||||
*/
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
#include "mex.h"
|
||||
#include "../../../clib/src/ct.h"
|
||||
#include "ctmatutils.h"
|
||||
|
|
@ -10,7 +15,6 @@ static void thermoset( int nlhs, mxArray *plhs[],
|
|||
// mexErrMsgTxt("wrong number of input parameters.");
|
||||
//}
|
||||
int ierr = 0;
|
||||
double vv;
|
||||
int th = getInt(prhs[1]);
|
||||
int job = -getInt(prhs[2]);
|
||||
double* ptr = 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
|
||||
/**
|
||||
* @file wallmethods.cpp
|
||||
*/
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
#include "mex.h"
|
||||
#include "../../../clib/src/ctreactor.h"
|
||||
#include "../../../clib/src/ct.h"
|
||||
|
|
@ -9,9 +14,7 @@
|
|||
void wallmethods( int nlhs, mxArray *plhs[],
|
||||
int nrhs, const mxArray *prhs[] )
|
||||
{
|
||||
int j, m, iok, n;
|
||||
char *file, *key, *val;
|
||||
|
||||
int m, iok, n;
|
||||
int job = getInt(prhs[1]);
|
||||
int i = getInt(prhs[2]);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
/**
|
||||
* @file xmlmethods.cpp
|
||||
*/
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "mex.h"
|
||||
#include "../../../clib/src/ctxml.h"
|
||||
|
|
@ -23,7 +29,7 @@ static bool nargs_ok(int job, int n) {
|
|||
void xmlmethods( int nlhs, mxArray *plhs[],
|
||||
int nrhs, const mxArray *prhs[] )
|
||||
{
|
||||
int j, m, iok, id;
|
||||
int j, m, iok;
|
||||
char *file, *key, *val, *nm;
|
||||
|
||||
int job = getInt(prhs[1]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue