From 3bb643c8f5864c1f4f155fa0360d59ac0193deb8 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 1 Sep 2020 21:31:26 +0200 Subject: [PATCH] re-enable CIDER with option sparse by setting CKTkluMODE in new matrix to CKTkluMODE from current circuit. --- src/ciderlib/oned/onesolve.c | 7 +++++-- src/ciderlib/twod/twosolve.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ciderlib/oned/onesolve.c b/src/ciderlib/oned/onesolve.c index 95a09e2a2..3f082392c 100644 --- a/src/ciderlib/oned/onesolve.c +++ b/src/ciderlib/oned/onesolve.c @@ -22,6 +22,9 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "../../maths/misc/norm.h" #include "ngspice/ifsim.h" +#include "ngspice/cktdefs.h" +#include "ngspice/ftedefs.h" + extern IFfrontEnd *SPfrontEnd; @@ -591,7 +594,7 @@ ONEequilSolve(ONEdevice *pDevice) pDevice->matrix = TMALLOC (SMPmatrix, 1) ; #ifdef KLU - pDevice->matrix->CKTkluMODE = CKTkluON ; /* Francesco Lannutti - To be sustitued with a value coming from the uplevel */ + pDevice->matrix->CKTkluMODE = ft_curckt->ci_ckt->CKTkluMODE ; error = SMPnewMatrixKLUforCIDER (pDevice->matrix, pDevice->numEqns, KLUmatrixReal) ; #else error = SMPnewMatrixForCIDER (pDevice->matrix, pDevice->numEqns, 0) ; @@ -749,7 +752,7 @@ ONEbiasSolve(ONEdevice *pDevice, int iterationLimit, pDevice->matrix = TMALLOC (SMPmatrix, 1) ; #ifdef KLU - pDevice->matrix->CKTkluMODE = CKTkluON ; /* Francesco Lannutti - To be sustitued with a value coming from the uplevel */ + pDevice->matrix->CKTkluMODE = ft_curckt->ci_ckt->CKTkluMODE ; error = SMPnewMatrixKLUforCIDER (pDevice->matrix, pDevice->numEqns, KLUMatrixComplex) ; #else error = SMPnewMatrixForCIDER (pDevice->matrix, pDevice->numEqns, 1) ; diff --git a/src/ciderlib/twod/twosolve.c b/src/ciderlib/twod/twosolve.c index bc744667f..fa09d4db6 100644 --- a/src/ciderlib/twod/twosolve.c +++ b/src/ciderlib/twod/twosolve.c @@ -18,6 +18,9 @@ Author: 1991 David A. Gates, U. C. Berkeley CAD Group #include "ngspice/twomesh.h" #include "twoddefs.h" #include "twodext.h" +#include "ngspice/cktdefs.h" +#include "ngspice/ftedefs.h" + extern IFfrontEnd *SPfrontEnd; @@ -504,7 +507,7 @@ int TWOequilSolve(TWOdevice *pDevice) pDevice->matrix = TMALLOC (SMPmatrix, 1) ; #ifdef KLU - pDevice->matrix->CKTkluMODE = CKTkluON ; /* Francesco Lannutti - To be sustitued with a value coming from the uplevel */ + pDevice->matrix->CKTkluMODE = ft_curckt->ci_ckt->CKTkluMODE ; error = SMPnewMatrixKLUforCIDER (pDevice->matrix, pDevice->numEqns, KLUmatrixReal) ; #else error = SMPnewMatrixForCIDER (pDevice->matrix, pDevice->numEqns, 0) ; @@ -663,7 +666,7 @@ TWObiasSolve(TWOdevice *pDevice, int iterationLimit, BOOLEAN tranAnalysis, pDevice->matrix = TMALLOC (SMPmatrix, 1) ; #ifdef KLU - pDevice->matrix->CKTkluMODE = CKTkluON ; /* Francesco Lannutti - To be sustitued with a value coming from the uplevel */ + pDevice->matrix->CKTkluMODE = ft_curckt->ci_ckt->CKTkluMODE ; error = SMPnewMatrixKLUforCIDER (pDevice->matrix, pDevice->numEqns, KLUMatrixComplex) ; #else error = SMPnewMatrixForCIDER (pDevice->matrix, pDevice->numEqns, 1) ;