From fc31afb3560e689d608c359e2e24ae8593b73fc7 Mon Sep 17 00:00:00 2001
From: Ferhat Mihoubi <ferhat.mihoubi@univ-evry.fr>
Date: Fri, 22 Oct 2010 16:20:28 +0200
Subject: [PATCH] - The Jacobian matrix in the block decomposed model without
 bytecode option is now sparse

---
 preprocessor/StaticModel.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/preprocessor/StaticModel.cc b/preprocessor/StaticModel.cc
index 5b87236075..46ce79efe4 100644
--- a/preprocessor/StaticModel.cc
+++ b/preprocessor/StaticModel.cc
@@ -277,7 +277,7 @@ StaticModel::writeModelEquationsOrdered_M(const string &static_basename) const
       output << "  global options_;" << endl;
       //The Temporary terms
       if (simulation_type != EVALUATE_BACKWARD  && simulation_type != EVALUATE_FORWARD)
-        output << "  g1 = zeros(" << block_mfs << ", " << block_mfs << ");" << endl;
+        output << " g1 = spalloc("  << block_mfs << ", " << block_mfs << ", " << derivative_endo[block].size() << ");" << endl;
 
       if (v_temporary_terms_inuse[block].size())
         {
-- 
GitLab