Commit 399b6d26 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Specialized maxit in bytecode mex (dynamic simulation vs steady state).

parent 5a98be70
......@@ -707,16 +707,25 @@ main(int nrhs, const char *prhs[])
DYN_MEX_FUNC_ERR_MSG_TXT("verbosity is not a field of options_");
if (verbose)
print_it = true;
field = mxGetFieldNumber(options_, "simul");
mxArray *simul;
if (!steady_state)
field = mxGetFieldNumber(options_, "simul");
else
field = mxGetFieldNumber(options_, "steady");
mxArray *temporaryfield;
if (field >= 0)
simul = mxGetFieldByNumber(options_, 0, field);
temporaryfield = mxGetFieldByNumber(options_, 0, field);
else
DYN_MEX_FUNC_ERR_MSG_TXT("simul is not a field of options_");
field = mxGetFieldNumber(simul, "maxit");
if (!steady_state)
DYN_MEX_FUNC_ERR_MSG_TXT("simul is not a field of options_");
else
DYN_MEX_FUNC_ERR_MSG_TXT("steady is not a field of options_");
field = mxGetFieldNumber(temporaryfield, "maxit");
if (field<0)
DYN_MEX_FUNC_ERR_MSG_TXT("maxit is not a field of options_.simul");
int maxit_ = int (floor(*(mxGetPr(mxGetFieldByNumber(simul, 0, field)))));
if (!steady_state)
DYN_MEX_FUNC_ERR_MSG_TXT("maxit is not a field of options_.simul");
else
DYN_MEX_FUNC_ERR_MSG_TXT("maxit is not a field of options_.steady");
int maxit_ = int (floor(*(mxGetPr(mxGetFieldByNumber(temporaryfield, 0, field)))));
field = mxGetFieldNumber(options_, "slowc");
if (field < 0)
DYN_MEX_FUNC_ERR_MSG_TXT("slows is not a field of options_");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment