From 50fd1a4c0dcc512c054fc1026c7b0f2075763dce Mon Sep 17 00:00:00 2001 From: Ferhat Date: Tue, 6 Nov 2012 14:38:51 +0100 Subject: [PATCH] In the two boundaries solver, gives up the symbolic solver if a stable computation solution could not be found on the first third of the simulation period --- mex/sources/bytecode/SparseMatrix.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mex/sources/bytecode/SparseMatrix.cc b/mex/sources/bytecode/SparseMatrix.cc index d7c4ab466..f21855776 100644 --- a/mex/sources/bytecode/SparseMatrix.cc +++ b/mex/sources/bytecode/SparseMatrix.cc @@ -2910,7 +2910,14 @@ SparseMatrix::Solve_ByteCode_Symbolic_Sparse_GaussianElimination(int Size, bool } if (symbolic) { - if (record && (nop == nop1)) + if (t > int(periods*0.35)) + { + symbolic = false; + mxFree(save_opaa + mxFree(save_opa); + mxFree(save_op); + } + else if (record && (nop == nop1)) { if (save_opa && save_opaa) {