Experimental changes:
Introduced new binding scheme for RES, CAP, IND, VSRC, (ISRC), BSIM4 models to improve speed The old method will not work anymore, so please use KLU only if you have these models in your circuit and nothing more!
This commit is contained in:
parent
de5e2accea
commit
38947fb651
|
|
@ -20,13 +20,15 @@ Modified: 2000 AlansFixes
|
||||||
|
|
||||||
#if defined(KLU)
|
#if defined(KLU)
|
||||||
#include "ngspice/klu.h"
|
#include "ngspice/klu.h"
|
||||||
|
#include "ngspice/spmatrix.h"
|
||||||
#elif defined(SuperLU)
|
#elif defined(SuperLU)
|
||||||
#include "ngspice/slu_ddefs.h"
|
#include "ngspice/slu_ddefs.h"
|
||||||
#elif defined(UMFPACK)
|
#elif defined(UMFPACK)
|
||||||
#include "ngspice/umfpack.h"
|
#include "ngspice/umfpack.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct SMPmatrix {
|
/* SMPmatrix structure - Francesco Lannutti (2012-02) */
|
||||||
|
typedef struct sSMPmatrix {
|
||||||
MatrixFrame *SPmatrix ; /* pointer to sparse matrix */
|
MatrixFrame *SPmatrix ; /* pointer to sparse matrix */
|
||||||
|
|
||||||
#if defined(KLU)
|
#if defined(KLU)
|
||||||
|
|
@ -45,6 +47,7 @@ struct SMPmatrix {
|
||||||
double **CKTbind_Sparse ; /* KLU Sparse original element position */
|
double **CKTbind_Sparse ; /* KLU Sparse original element position */
|
||||||
double **CKTbind_CSC ; /* KLU new element position */
|
double **CKTbind_CSC ; /* KLU new element position */
|
||||||
double **CKTbind_CSC_Complex ; /* KLU new element position in Complex analysis */
|
double **CKTbind_CSC_Complex ; /* KLU new element position in Complex analysis */
|
||||||
|
BindElement *CKTbindStruct ; /* KLU - Sparse Binding Structure */
|
||||||
double **CKTdiag_CSC ; /* KLU pointer to diagonal element to perform Gmin */
|
double **CKTdiag_CSC ; /* KLU pointer to diagonal element to perform Gmin */
|
||||||
int CKTkluN ; /* KLU N, copied */
|
int CKTkluN ; /* KLU N, copied */
|
||||||
int CKTklunz ; /* KLU nz, copied for AC Analysis */
|
int CKTklunz ; /* KLU nz, copied for AC Analysis */
|
||||||
|
|
@ -97,10 +100,7 @@ struct SMPmatrix {
|
||||||
#define CKTumfpackOFF 0 /* UMFPACK MODE OFF definition */
|
#define CKTumfpackOFF 0 /* UMFPACK MODE OFF definition */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
} SMPmatrix ;
|
||||||
|
|
||||||
/* SMPmatrix structure alias - Francesco Lannutti (2012-02) */
|
|
||||||
typedef struct SMPmatrix SMPmatrix ;
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(KLU) || defined(SuperLU) || defined(UMFPACK)
|
#if defined(KLU) || defined(SuperLU) || defined(UMFPACK)
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Francesco Lannutti 2012-09 - NGSPICE Configuration File Inclusion */
|
||||||
|
#include "ngspice/config.h"
|
||||||
|
|
||||||
|
|
||||||
#ifndef spOKAY
|
#ifndef spOKAY
|
||||||
|
|
@ -294,10 +296,21 @@ extern void spMultTransposed(MatrixPtr,spREAL*,spREAL*,spREAL*,spREAL*);
|
||||||
extern void spSolve( MatrixPtr, spREAL*, spREAL*, spREAL*, spREAL* );
|
extern void spSolve( MatrixPtr, spREAL*, spREAL*, spREAL*, spREAL* );
|
||||||
extern void spSolveTransposed(MatrixPtr,spREAL*,spREAL*,spREAL*,spREAL*);
|
extern void spSolveTransposed(MatrixPtr,spREAL*,spREAL*,spREAL*,spREAL*);
|
||||||
|
|
||||||
extern int WriteCol_original(MatrixPtr, int, spREAL *, int *, spREAL **, spREAL **, spREAL **);
|
|
||||||
extern int WriteCol_original_dump(MatrixPtr, int, spREAL *, int *);
|
/* Francesco Lannutti - CSC Data Structure Conversion */
|
||||||
extern void spMatrix_CSC(MatrixPtr, int *, int *, double *, int, double **, double **, double **);
|
#ifdef KLU
|
||||||
extern void spMatrix_CSC_dump(MatrixPtr, char *);
|
typedef struct sBindElement {
|
||||||
extern void spRHS_CSC_dump(spREAL *, char *, MatrixPtr);
|
double *Sparse ;
|
||||||
|
double *CSC ;
|
||||||
|
double *CSC_Complex ;
|
||||||
|
} BindElement ;
|
||||||
|
|
||||||
|
extern int WriteCol_original (MatrixPtr, int, spREAL *, spREAL *, int *, BindElement *, spREAL **) ;
|
||||||
|
extern int WriteCol_original_dump (MatrixPtr, int, spREAL *, int *) ;
|
||||||
|
extern void spMatrix_CSC (MatrixPtr, int *, int *, double *, double *, int, BindElement *, double **) ;
|
||||||
|
extern void spMatrix_CSC_dump (MatrixPtr, char *) ;
|
||||||
|
extern void spRHS_CSC_dump (spREAL *, char *, MatrixPtr) ;
|
||||||
|
#endif
|
||||||
|
/* ------------------------------------------------------ */
|
||||||
|
|
||||||
#endif /* spOKAY */
|
#endif /* spOKAY */
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ void
|
||||||
SMPmatrix_CSC (SMPmatrix *Matrix)
|
SMPmatrix_CSC (SMPmatrix *Matrix)
|
||||||
{
|
{
|
||||||
spMatrix_CSC (Matrix->SPmatrix, Matrix->CKTkluAp, Matrix->CKTkluAi, Matrix->CKTkluAx,
|
spMatrix_CSC (Matrix->SPmatrix, Matrix->CKTkluAp, Matrix->CKTkluAi, Matrix->CKTkluAx,
|
||||||
Matrix->CKTkluN, Matrix->CKTbind_Sparse, Matrix->CKTbind_CSC, Matrix->CKTdiag_CSC) ;
|
Matrix->CKTkluAx_Complex, Matrix->CKTkluN, Matrix->CKTbindStruct, Matrix->CKTdiag_CSC) ;
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ NIinit(CKTcircuit *ckt)
|
||||||
ckt->CKTmatrix->CKTbind_Sparse = NULL ;
|
ckt->CKTmatrix->CKTbind_Sparse = NULL ;
|
||||||
ckt->CKTmatrix->CKTbind_CSC = NULL ;
|
ckt->CKTmatrix->CKTbind_CSC = NULL ;
|
||||||
ckt->CKTmatrix->CKTbind_CSC_Complex = NULL ;
|
ckt->CKTmatrix->CKTbind_CSC_Complex = NULL ;
|
||||||
|
ckt->CKTmatrix->CKTbindStruct = NULL ;
|
||||||
ckt->CKTmatrix->CKTdiag_CSC = NULL ;
|
ckt->CKTmatrix->CKTdiag_CSC = NULL ;
|
||||||
ckt->CKTmatrix->CKTkluN = 0 ;
|
ckt->CKTmatrix->CKTkluN = 0 ;
|
||||||
ckt->CKTmatrix->CKTklunz = 0 ;
|
ckt->CKTmatrix->CKTklunz = 0 ;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
/* Body */
|
/* Body */
|
||||||
int
|
int
|
||||||
WriteCol_original (MatrixPtr Matrix, int Col, spREAL *CSC_Element, int *CSC_Row, spREAL **bind_Sparse, spREAL **bind_KLU, spREAL **diag)
|
WriteCol_original (MatrixPtr Matrix, int Col, spREAL *CSC_Element, spREAL *CSC_Element_Complex, int *CSC_Row, BindElement *BindSparseCSC, spREAL **diag)
|
||||||
{
|
{
|
||||||
int i ;
|
int i ;
|
||||||
ElementPtr current ;
|
ElementPtr current ;
|
||||||
|
|
@ -30,8 +30,9 @@ WriteCol_original (MatrixPtr Matrix, int Col, spREAL *CSC_Element, int *CSC_Row,
|
||||||
current = Matrix->FirstInCol [Col] ;
|
current = Matrix->FirstInCol [Col] ;
|
||||||
|
|
||||||
while (current != NULL) {
|
while (current != NULL) {
|
||||||
bind_Sparse [i] = (double *)current ;
|
BindSparseCSC [i].Sparse = (double *)current ;
|
||||||
bind_KLU [i] = &(CSC_Element [i]) ;
|
BindSparseCSC [i].CSC = &(CSC_Element [i]) ;
|
||||||
|
BindSparseCSC [i].CSC_Complex = &(CSC_Element_Complex [2 * i]) ;
|
||||||
CSC_Row [i] = (current->Row) - 1 ;
|
CSC_Row [i] = (current->Row) - 1 ;
|
||||||
if (CSC_Row [i] == Col - 1)
|
if (CSC_Row [i] == Col - 1)
|
||||||
diag [0] = &(CSC_Element [i]) ;
|
diag [0] = &(CSC_Element [i]) ;
|
||||||
|
|
@ -61,15 +62,15 @@ WriteCol_original_dump (MatrixPtr Matrix, int Col, spREAL *CSC_Element, int *CSC
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
spMatrix_CSC (MatrixPtr Matrix, int *Ap, int *Ai, double *Ax, int n, double **bind_Sparse, double **bind_KLU, double **diag)
|
spMatrix_CSC (MatrixPtr Matrix, int *Ap, int *Ai, double *Ax, double *Ax_Complex, int n, BindElement *BindSparseCSC, double **diag)
|
||||||
{
|
{
|
||||||
int offset, i ;
|
int offset, i ;
|
||||||
|
|
||||||
offset = 0 ;
|
offset = 0 ;
|
||||||
Ap[0] = offset ;
|
Ap[0] = offset ;
|
||||||
for (i = 1 ; i <= n ; i++) {
|
for (i = 1 ; i <= n ; i++) {
|
||||||
offset += WriteCol_original (Matrix, i, (spREAL *)(Ax + offset), (int *)(Ai + offset), (spREAL **)(bind_Sparse + offset),
|
offset += WriteCol_original (Matrix, i, (spREAL *)(Ax + offset), (spREAL *)(Ax_Complex + 2 * offset),
|
||||||
(spREAL **)(bind_KLU + offset), (spREAL **)(diag + (i - 1))) ;
|
(int *)(Ai + offset), BindSparseCSC + offset, (spREAL **)(diag + (i - 1))) ;
|
||||||
|
|
||||||
Ap[i] = offset ;
|
Ap[i] = offset ;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -243,25 +243,15 @@ ACan(CKTcircuit *ckt, int restart)
|
||||||
ckt->CKTcurrentAnalysis = DOING_AC;
|
ckt->CKTcurrentAnalysis = DOING_AC;
|
||||||
|
|
||||||
#ifdef KLU
|
#ifdef KLU
|
||||||
int i, m ;
|
int i ;
|
||||||
|
|
||||||
if (ckt->CKTmatrix->CKTkluMODE)
|
if (ckt->CKTmatrix->CKTkluMODE)
|
||||||
{
|
{
|
||||||
|
/* Conversion from Real Matrix to Complex Matrix */
|
||||||
if (!ckt->CKTmatrix->CKTkluMatrixIsComplex)
|
if (!ckt->CKTmatrix->CKTkluMatrixIsComplex)
|
||||||
{
|
{
|
||||||
ckt->CKTmatrix->CKTkluAx_Complex = TMALLOC (double, 2 * ckt->CKTmatrix->CKTklunz) ;
|
|
||||||
ckt->CKTmatrix->CKTbind_CSC_Complex = TMALLOC (double *, ckt->CKTmatrix->CKTklunz) ;
|
|
||||||
ckt->CKTmatrix->CKTkluIntermediate_Complex = TMALLOC (double, 2 * ckt->CKTmatrix->CKTkluN) ;
|
|
||||||
|
|
||||||
m = 0 ;
|
|
||||||
for (i = 0 ; i < ckt->CKTmatrix->CKTklunz ; i++)
|
|
||||||
{
|
|
||||||
ckt->CKTmatrix->CKTbind_CSC_Complex [i] = &(ckt->CKTmatrix->CKTkluAx_Complex [m]) ;
|
|
||||||
m += 2 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0 ; i < DEVmaxnum ; i++)
|
for (i = 0 ; i < DEVmaxnum ; i++)
|
||||||
if (DEVices [i] && DEVices [i]->DEVbindCSCComplex)
|
if (DEVices [i] && DEVices [i]->DEVbindCSCComplex && ckt->CKThead [i])
|
||||||
DEVices [i]->DEVbindCSCComplex (ckt->CKThead [i], ckt) ;
|
DEVices [i]->DEVbindCSCComplex (ckt->CKThead [i], ckt) ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTkluMatrixIsComplex = CKTkluMatrixComplex ;
|
ckt->CKTmatrix->CKTkluMatrixIsComplex = CKTkluMatrixComplex ;
|
||||||
|
|
@ -286,7 +276,7 @@ ACan(CKTcircuit *ckt, int restart)
|
||||||
{
|
{
|
||||||
/* Conversion from Complex Matrix to Real Matrix */
|
/* Conversion from Complex Matrix to Real Matrix */
|
||||||
for (i = 0 ; i < DEVmaxnum ; i++)
|
for (i = 0 ; i < DEVmaxnum ; i++)
|
||||||
if (DEVices [i] && DEVices [i]->DEVbindCSCComplexToReal)
|
if (DEVices [i] && DEVices [i]->DEVbindCSCComplexToReal && ckt->CKThead [i])
|
||||||
DEVices [i]->DEVbindCSCComplexToReal (ckt->CKThead [i], ckt) ;
|
DEVices [i]->DEVbindCSCComplexToReal (ckt->CKThead [i], ckt) ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTkluMatrixIsComplex = CKTkluMatrixReal ;
|
ckt->CKTmatrix->CKTkluMatrixIsComplex = CKTkluMatrixReal ;
|
||||||
|
|
@ -326,7 +316,7 @@ ACan(CKTcircuit *ckt, int restart)
|
||||||
{
|
{
|
||||||
/* Conversion from Real Matrix to Complex Matrix */
|
/* Conversion from Real Matrix to Complex Matrix */
|
||||||
for (i = 0 ; i < DEVmaxnum ; i++)
|
for (i = 0 ; i < DEVmaxnum ; i++)
|
||||||
if (DEVices [i] && DEVices [i]->DEVbindCSCComplex)
|
if (DEVices [i] && DEVices [i]->DEVbindCSCComplex && ckt->CKThead [i])
|
||||||
DEVices [i]->DEVbindCSCComplex (ckt->CKThead [i], ckt) ;
|
DEVices [i]->DEVbindCSCComplex (ckt->CKThead [i], ckt) ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTkluMatrixIsComplex = CKTkluMatrixComplex ;
|
ckt->CKTmatrix->CKTkluMatrixIsComplex = CKTkluMatrixComplex ;
|
||||||
|
|
@ -438,7 +428,7 @@ endsweep:
|
||||||
{
|
{
|
||||||
/* Conversion from Complex Matrix to Real Matrix */
|
/* Conversion from Complex Matrix to Real Matrix */
|
||||||
for (i = 0 ; i < DEVmaxnum ; i++)
|
for (i = 0 ; i < DEVmaxnum ; i++)
|
||||||
if (DEVices [i] && DEVices [i]->DEVbindCSCComplexToReal)
|
if (DEVices [i] && DEVices [i]->DEVbindCSCComplexToReal && ckt->CKThead [i])
|
||||||
DEVices [i]->DEVbindCSCComplexToReal (ckt->CKThead [i], ckt) ;
|
DEVices [i]->DEVbindCSCComplexToReal (ckt->CKThead [i], ckt) ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTkluMatrixIsComplex = CKTkluMatrixReal ;
|
ckt->CKTmatrix->CKTkluMatrixIsComplex = CKTkluMatrixReal ;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,24 @@ int nthreads;
|
||||||
return(E_NOMEM);\
|
return(E_NOMEM);\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAS_WINDOWS
|
||||||
|
extern void SetAnalyse( char * Analyse, int Percent);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef KLU
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
static
|
||||||
|
int
|
||||||
|
BindCompare (const void *a, const void *b)
|
||||||
|
{
|
||||||
|
BindElement *A, *B ;
|
||||||
|
A = (BindElement *)a ;
|
||||||
|
B = (BindElement *)b ;
|
||||||
|
|
||||||
|
return ((int)(A->Sparse - B->Sparse)) ;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
CKTsetup(CKTcircuit *ckt)
|
CKTsetup(CKTcircuit *ckt)
|
||||||
|
|
@ -103,14 +121,23 @@ CKTsetup(CKTcircuit *ckt)
|
||||||
ckt->CKTmatrix->CKTkluAx = TMALLOC (double, nz) ;
|
ckt->CKTmatrix->CKTkluAx = TMALLOC (double, nz) ;
|
||||||
ckt->CKTmatrix->CKTkluIntermediate = TMALLOC (double, n) ;
|
ckt->CKTmatrix->CKTkluIntermediate = TMALLOC (double, n) ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTbind_Sparse = TMALLOC (double *, nz) ;
|
// ckt->CKTmatrix->CKTbind_Sparse = TMALLOC (double *, nz) ;
|
||||||
ckt->CKTmatrix->CKTbind_CSC = TMALLOC (double *, nz) ;
|
// ckt->CKTmatrix->CKTbind_CSC = TMALLOC (double *, nz) ;
|
||||||
|
ckt->CKTmatrix->CKTbindStruct = TMALLOC (BindElement, nz) ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTdiag_CSC = TMALLOC (double *, n) ;
|
ckt->CKTmatrix->CKTdiag_CSC = TMALLOC (double *, n) ;
|
||||||
|
|
||||||
/* Binding Table Sparse-KLU creation */
|
/* Complex Stuff needed for AC Analysis */
|
||||||
|
ckt->CKTmatrix->CKTkluAx_Complex = TMALLOC (double, 2 * nz) ;
|
||||||
|
ckt->CKTmatrix->CKTkluIntermediate_Complex = TMALLOC (double, 2 * n) ;
|
||||||
|
|
||||||
|
/* Binding Table from Sparse to CSC Format Creation */
|
||||||
SMPmatrix_CSC (ckt->CKTmatrix) ;
|
SMPmatrix_CSC (ckt->CKTmatrix) ;
|
||||||
|
|
||||||
|
/* Binding Table Sorting */
|
||||||
|
qsort (ckt->CKTmatrix->CKTbindStruct, (size_t)nz, sizeof(BindElement), BindCompare) ;
|
||||||
|
|
||||||
|
/* KLU Pointers Assignment */
|
||||||
for (i = 0 ; i < DEVmaxnum ; i++)
|
for (i = 0 ; i < DEVmaxnum ; i++)
|
||||||
if (DEVices [i] && DEVices [i]->DEVbindCSC && ckt->CKThead [i])
|
if (DEVices [i] && DEVices [i]->DEVbindCSC && ckt->CKThead [i])
|
||||||
DEVices [i]->DEVbindCSC (ckt->CKThead [i], ckt) ;
|
DEVices [i]->DEVbindCSC (ckt->CKThead [i], ckt) ;
|
||||||
|
|
@ -135,14 +162,19 @@ CKTsetup(CKTcircuit *ckt)
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTsuperluIntermediate = TMALLOC (double, n) ;
|
ckt->CKTmatrix->CKTsuperluIntermediate = TMALLOC (double, n) ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTbind_Sparse = TMALLOC (double *, nz) ;
|
// ckt->CKTmatrix->CKTbind_Sparse = TMALLOC (double *, nz) ;
|
||||||
ckt->CKTmatrix->CKTbind_CSC = TMALLOC (double *, nz) ;
|
// ckt->CKTmatrix->CKTbind_CSC = TMALLOC (double *, nz) ;
|
||||||
|
ckt->CKTmatrix->CKTbindStruct = TMALLOC (BindElement, nz) ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTdiag_CSC = TMALLOC (double *, n) ;
|
ckt->CKTmatrix->CKTdiag_CSC = TMALLOC (double *, n) ;
|
||||||
|
|
||||||
/* Binding Table Sparse-KLU creation */
|
/* Binding Table from Sparse to CSC Format Creation */
|
||||||
SMPmatrix_CSC (ckt->CKTmatrix) ;
|
SMPmatrix_CSC (ckt->CKTmatrix) ;
|
||||||
|
|
||||||
|
/* Binding Table Sorting */
|
||||||
|
qsort (ckt->CKTmatrix->CKTbindStruct, (size_t)nz, sizeof(BindElement), BindCompare) ;
|
||||||
|
|
||||||
|
|
||||||
dCreate_CompCol_Matrix (&(ckt->CKTmatrix->CKTsuperluA), n, n, nz, ckt->CKTmatrix->CKTsuperluAx,
|
dCreate_CompCol_Matrix (&(ckt->CKTmatrix->CKTsuperluA), n, n, nz, ckt->CKTmatrix->CKTsuperluAx,
|
||||||
ckt->CKTmatrix->CKTsuperluAi, ckt->CKTmatrix->CKTsuperluAp, SLU_NC, SLU_D, SLU_GE) ;
|
ckt->CKTmatrix->CKTsuperluAi, ckt->CKTmatrix->CKTsuperluAp, SLU_NC, SLU_D, SLU_GE) ;
|
||||||
dCreate_Dense_Matrix (&(ckt->CKTmatrix->CKTsuperluI), n, 1, ckt->CKTmatrix->CKTsuperluIntermediate,
|
dCreate_Dense_Matrix (&(ckt->CKTmatrix->CKTsuperluI), n, 1, ckt->CKTmatrix->CKTsuperluIntermediate,
|
||||||
|
|
@ -172,13 +204,18 @@ CKTsetup(CKTcircuit *ckt)
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTumfpackX = TMALLOC (double, n) ;
|
ckt->CKTmatrix->CKTumfpackX = TMALLOC (double, n) ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTbind_Sparse = TMALLOC (double *, nz) ;
|
// ckt->CKTmatrix->CKTbind_Sparse = TMALLOC (double *, nz) ;
|
||||||
ckt->CKTmatrix->CKTbind_CSC = TMALLOC (double *, nz) ;
|
// ckt->CKTmatrix->CKTbind_CSC = TMALLOC (double *, nz) ;
|
||||||
|
ckt->CKTmatrix->CKTbindStruct = TMALLOC (BindElement, nz) ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTdiag_CSC = TMALLOC (double *, n) ;
|
ckt->CKTmatrix->CKTdiag_CSC = TMALLOC (double *, n) ;
|
||||||
|
|
||||||
/* Binding Table Sparse-KLU creation */
|
/* Binding Table from Sparse to CSC Format Creation */
|
||||||
SMPmatrix_CSC (ckt->CKTmatrix) ;
|
SMPmatrix_CSC (ckt->CKTmatrix) ;
|
||||||
|
|
||||||
|
/* Binding Table Sorting */
|
||||||
|
qsort (ckt->CKTmatrix->CKTbindStruct, (size_t)nz, sizeof(BindElement), BindCompare) ;
|
||||||
|
|
||||||
|
|
||||||
for (i = 0 ; i < DEVmaxnum ; i++)
|
for (i = 0 ; i < DEVmaxnum ; i++)
|
||||||
if (DEVices [i] && DEVices [i]->DEVbindCSC && ckt->CKThead [i])
|
if (DEVices [i] && DEVices [i]->DEVbindCSC && ckt->CKThead [i])
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -569,6 +569,91 @@ typedef struct sBSIM4instance
|
||||||
double **BSIM4nVar;
|
double **BSIM4nVar;
|
||||||
#endif /* NONOISE */
|
#endif /* NONOISE */
|
||||||
|
|
||||||
|
#ifdef KLU
|
||||||
|
BindElement *BSIM4DPdStructPtr ;
|
||||||
|
BindElement *BSIM4DPdpStructPtr ;
|
||||||
|
BindElement *BSIM4DPgpStructPtr ;
|
||||||
|
BindElement *BSIM4DPgmStructPtr ;
|
||||||
|
BindElement *BSIM4DPspStructPtr ;
|
||||||
|
BindElement *BSIM4DPbpStructPtr ;
|
||||||
|
BindElement *BSIM4DPdbStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4DdStructPtr ;
|
||||||
|
BindElement *BSIM4DdpStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4GPdpStructPtr ;
|
||||||
|
BindElement *BSIM4GPgpStructPtr ;
|
||||||
|
BindElement *BSIM4GPgmStructPtr ;
|
||||||
|
BindElement *BSIM4GPgeStructPtr ;
|
||||||
|
BindElement *BSIM4GPspStructPtr ;
|
||||||
|
BindElement *BSIM4GPbpStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4GMdpStructPtr ;
|
||||||
|
BindElement *BSIM4GMgpStructPtr ;
|
||||||
|
BindElement *BSIM4GMgmStructPtr ;
|
||||||
|
BindElement *BSIM4GMgeStructPtr ;
|
||||||
|
BindElement *BSIM4GMspStructPtr ;
|
||||||
|
BindElement *BSIM4GMbpStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4GEdpStructPtr ;
|
||||||
|
BindElement *BSIM4GEgpStructPtr ;
|
||||||
|
BindElement *BSIM4GEgmStructPtr ;
|
||||||
|
BindElement *BSIM4GEgeStructPtr ;
|
||||||
|
BindElement *BSIM4GEspStructPtr ;
|
||||||
|
BindElement *BSIM4GEbpStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4SPdpStructPtr ;
|
||||||
|
BindElement *BSIM4SPgpStructPtr ;
|
||||||
|
BindElement *BSIM4SPgmStructPtr ;
|
||||||
|
BindElement *BSIM4SPsStructPtr ;
|
||||||
|
BindElement *BSIM4SPspStructPtr ;
|
||||||
|
BindElement *BSIM4SPbpStructPtr ;
|
||||||
|
BindElement *BSIM4SPsbStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4SspStructPtr ;
|
||||||
|
BindElement *BSIM4SsStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4BPdpStructPtr ;
|
||||||
|
BindElement *BSIM4BPgpStructPtr ;
|
||||||
|
BindElement *BSIM4BPgmStructPtr ;
|
||||||
|
BindElement *BSIM4BPspStructPtr ;
|
||||||
|
BindElement *BSIM4BPdbStructPtr ;
|
||||||
|
BindElement *BSIM4BPbStructPtr ;
|
||||||
|
BindElement *BSIM4BPsbStructPtr ;
|
||||||
|
BindElement *BSIM4BPbpStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4DBdpStructPtr ;
|
||||||
|
BindElement *BSIM4DBdbStructPtr ;
|
||||||
|
BindElement *BSIM4DBbpStructPtr ;
|
||||||
|
BindElement *BSIM4DBbStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4SBspStructPtr ;
|
||||||
|
BindElement *BSIM4SBbpStructPtr ;
|
||||||
|
BindElement *BSIM4SBbStructPtr ;
|
||||||
|
BindElement *BSIM4SBsbStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4BdbStructPtr ;
|
||||||
|
BindElement *BSIM4BbpStructPtr ;
|
||||||
|
BindElement *BSIM4BsbStructPtr ;
|
||||||
|
BindElement *BSIM4BbStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4DgpStructPtr ;
|
||||||
|
BindElement *BSIM4DspStructPtr ;
|
||||||
|
BindElement *BSIM4DbpStructPtr ;
|
||||||
|
BindElement *BSIM4SdpStructPtr ;
|
||||||
|
BindElement *BSIM4SgpStructPtr ;
|
||||||
|
BindElement *BSIM4SbpStructPtr ;
|
||||||
|
|
||||||
|
BindElement *BSIM4QdpStructPtr ;
|
||||||
|
BindElement *BSIM4QgpStructPtr ;
|
||||||
|
BindElement *BSIM4QspStructPtr ;
|
||||||
|
BindElement *BSIM4QbpStructPtr ;
|
||||||
|
BindElement *BSIM4QqStructPtr ;
|
||||||
|
BindElement *BSIM4DPqStructPtr ;
|
||||||
|
BindElement *BSIM4GPqStructPtr ;
|
||||||
|
BindElement *BSIM4SPqStructPtr ;
|
||||||
|
#endif
|
||||||
|
|
||||||
} BSIM4instance ;
|
} BSIM4instance ;
|
||||||
|
|
||||||
struct bsim4SizeDependParam
|
struct bsim4SizeDependParam
|
||||||
|
|
|
||||||
|
|
@ -7,44 +7,70 @@ Author: 2012 Francesco Lannutti
|
||||||
#include "capdefs.h"
|
#include "capdefs.h"
|
||||||
#include "ngspice/sperror.h"
|
#include "ngspice/sperror.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
static
|
||||||
|
int
|
||||||
|
BindCompare (const void *a, const void *b)
|
||||||
|
{
|
||||||
|
BindElement *A, *B ;
|
||||||
|
A = (BindElement *)a ;
|
||||||
|
B = (BindElement *)b ;
|
||||||
|
|
||||||
|
return ((int)(A->Sparse - B->Sparse)) ;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
CAPbindCSC (GENmodel *inModel, CKTcircuit *ckt)
|
CAPbindCSC (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
CAPmodel *model = (CAPmodel *)inModel ;
|
CAPmodel *model = (CAPmodel *)inModel ;
|
||||||
CAPinstance *here ;
|
CAPinstance *here ;
|
||||||
int i ;
|
double *i ;
|
||||||
|
BindElement *matched, *BindStruct ;
|
||||||
|
size_t nz ;
|
||||||
|
|
||||||
/* loop through all the capacitor models */
|
BindStruct = ckt->CKTmatrix->CKTbindStruct ;
|
||||||
for ( ; model != NULL ; model = model->CAPnextModel)
|
nz = (size_t)ckt->CKTmatrix->CKTklunz ;
|
||||||
|
|
||||||
|
/* loop through all the capacitor models */
|
||||||
|
for ( ; model != NULL ; model = model->CAPnextModel)
|
||||||
|
{
|
||||||
|
/* loop through all the instances of the model */
|
||||||
|
for (here = model->CAPinstances ; here != NULL ; here = here->CAPnextInstance)
|
||||||
{
|
{
|
||||||
/* loop through all the instances of the model */
|
if ((here->CAPposNode != 0) && (here->CAPposNode != 0))
|
||||||
for (here = model->CAPinstances ; here != NULL ; here = here->CAPnextInstance)
|
|
||||||
{
|
{
|
||||||
i = 0 ;
|
i = here->CAPposPosptr ;
|
||||||
if ((here->CAPposNode != 0) && (here->CAPposNode != 0)) {
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
while (here->CAPposPosptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
here->CAPposPosStructPtr = matched ;
|
||||||
here->CAPposPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
here->CAPposPosptr = matched->CSC ;
|
||||||
}
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->CAPnegNode != 0) && (here->CAPnegNode != 0))
|
||||||
if ((here->CAPnegNode != 0) && (here->CAPnegNode != 0)) {
|
{
|
||||||
while (here->CAPnegNegptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
i = here->CAPnegNegptr ;
|
||||||
here->CAPnegNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->CAPnegNegStructPtr = matched ;
|
||||||
|
here->CAPnegNegptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->CAPposNode != 0) && (here->CAPnegNode != 0))
|
||||||
if ((here->CAPposNode != 0) && (here->CAPnegNode != 0)) {
|
{
|
||||||
while (here->CAPposNegptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
i = here->CAPposNegptr ;
|
||||||
here->CAPposNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->CAPposNegStructPtr = matched ;
|
||||||
|
here->CAPposNegptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->CAPnegNode != 0) && (here->CAPposNode != 0))
|
||||||
if ((here->CAPnegNode != 0) && (here->CAPposNode != 0)) {
|
{
|
||||||
while (here->CAPnegPosptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
i = here->CAPnegPosptr ;
|
||||||
here->CAPnegPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->CAPnegPosStructPtr = matched ;
|
||||||
}
|
here->CAPnegPosptr = matched->CSC ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (OK) ;
|
return (OK) ;
|
||||||
}
|
}
|
||||||
|
|
@ -54,39 +80,28 @@ CAPbindCSCComplex (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
CAPmodel *model = (CAPmodel *)inModel ;
|
CAPmodel *model = (CAPmodel *)inModel ;
|
||||||
CAPinstance *here ;
|
CAPinstance *here ;
|
||||||
int i ;
|
|
||||||
|
|
||||||
/* loop through all the capacitor models */
|
NG_IGNORE (ckt) ;
|
||||||
for ( ; model != NULL ; model = model->CAPnextModel)
|
|
||||||
|
/* loop through all the capacitor models */
|
||||||
|
for ( ; model != NULL ; model = model->CAPnextModel)
|
||||||
|
{
|
||||||
|
/* loop through all the instances of the model */
|
||||||
|
for (here = model->CAPinstances ; here != NULL ; here = here->CAPnextInstance)
|
||||||
{
|
{
|
||||||
/* loop through all the instances of the model */
|
if ((here->CAPposNode != 0) && (here->CAPposNode != 0))
|
||||||
for (here = model->CAPinstances ; here != NULL ; here = here->CAPnextInstance)
|
here->CAPposPosptr = here->CAPposPosStructPtr->CSC_Complex ;
|
||||||
{
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->CAPposNode != 0) && (here->CAPposNode != 0)) {
|
|
||||||
while (here->CAPposPosptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
|
||||||
here->CAPposPosptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->CAPnegNode != 0) && (here->CAPnegNode != 0))
|
||||||
if ((here->CAPnegNode != 0) && (here->CAPnegNode != 0)) {
|
here->CAPnegNegptr = here->CAPnegNegStructPtr->CSC_Complex ;
|
||||||
while (here->CAPnegNegptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
|
||||||
here->CAPnegNegptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->CAPposNode != 0) && (here->CAPnegNode != 0))
|
||||||
if ((here->CAPposNode != 0) && (here->CAPnegNode != 0)) {
|
here->CAPposNegptr = here->CAPposNegStructPtr->CSC_Complex ;
|
||||||
while (here->CAPposNegptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
|
||||||
here->CAPposNegptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->CAPnegNode != 0) && (here->CAPposNode != 0))
|
||||||
if ((here->CAPnegNode != 0) && (here->CAPposNode != 0)) {
|
here->CAPnegPosptr = here->CAPnegPosStructPtr->CSC_Complex ;
|
||||||
while (here->CAPnegPosptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
}
|
||||||
here->CAPnegPosptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (OK) ;
|
return (OK) ;
|
||||||
}
|
}
|
||||||
|
|
@ -96,43 +111,28 @@ CAPbindCSCComplexToReal (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
CAPmodel *model = (CAPmodel *)inModel ;
|
CAPmodel *model = (CAPmodel *)inModel ;
|
||||||
CAPinstance *here ;
|
CAPinstance *here ;
|
||||||
int i ;
|
|
||||||
|
|
||||||
/* loop through all the capacitor models */
|
NG_IGNORE (ckt) ;
|
||||||
|
|
||||||
|
/* loop through all the capacitor models */
|
||||||
for ( ; model != NULL ; model = model->CAPnextModel)
|
for ( ; model != NULL ; model = model->CAPnextModel)
|
||||||
{
|
{
|
||||||
/* loop through all the instances of the model */
|
/* loop through all the instances of the model */
|
||||||
for (here = model->CAPinstances ; here != NULL ; here = here->CAPnextInstance)
|
for (here = model->CAPinstances ; here != NULL ; here = here->CAPnextInstance)
|
||||||
{
|
{
|
||||||
i = 0 ;
|
|
||||||
if ((here->CAPposNode != 0) && (here->CAPposNode != 0))
|
if ((here->CAPposNode != 0) && (here->CAPposNode != 0))
|
||||||
{
|
here->CAPposPosptr = here->CAPposPosStructPtr->CSC ;
|
||||||
while (here->CAPposPosptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->CAPposPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->CAPnegNode != 0) && (here->CAPnegNode != 0))
|
if ((here->CAPnegNode != 0) && (here->CAPnegNode != 0))
|
||||||
{
|
here->CAPnegNegptr = here->CAPnegNegStructPtr->CSC ;
|
||||||
while (here->CAPnegNegptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->CAPnegNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->CAPposNode != 0) && (here->CAPnegNode != 0))
|
if ((here->CAPposNode != 0) && (here->CAPnegNode != 0))
|
||||||
{
|
here->CAPposNegptr = here->CAPposNegStructPtr->CSC ;
|
||||||
while (here->CAPposNegptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->CAPposNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->CAPnegNode != 0) && (here->CAPposNode != 0))
|
if ((here->CAPnegNode != 0) && (here->CAPposNode != 0))
|
||||||
{
|
here->CAPnegPosptr = here->CAPnegPosStructPtr->CSC ;
|
||||||
while (here->CAPnegPosptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->CAPnegPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (OK) ;
|
return (OK) ;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,13 @@ typedef struct sCAPinstance {
|
||||||
int CAPsenParmNo; /* parameter # for sensitivity use;
|
int CAPsenParmNo; /* parameter # for sensitivity use;
|
||||||
set equal to 0 if not a design parameter*/
|
set equal to 0 if not a design parameter*/
|
||||||
|
|
||||||
|
#ifdef KLU
|
||||||
|
BindElement *CAPposPosStructPtr ;
|
||||||
|
BindElement *CAPposNegStructPtr ;
|
||||||
|
BindElement *CAPnegPosStructPtr ;
|
||||||
|
BindElement *CAPnegNegStructPtr ;
|
||||||
|
#endif
|
||||||
|
|
||||||
} CAPinstance ;
|
} CAPinstance ;
|
||||||
|
|
||||||
#define CAPqcap CAPstate /* charge on the capacitor */
|
#define CAPqcap CAPstate /* charge on the capacitor */
|
||||||
|
|
|
||||||
|
|
@ -7,100 +7,114 @@ Author: 2012 Francesco Lannutti
|
||||||
#include "inddefs.h"
|
#include "inddefs.h"
|
||||||
#include "ngspice/sperror.h"
|
#include "ngspice/sperror.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
static
|
||||||
int
|
int
|
||||||
INDbindCSC(GENmodel *inModel, CKTcircuit *ckt)
|
BindCompare (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
INDmodel *model = (INDmodel *)inModel;
|
BindElement *A, *B ;
|
||||||
INDinstance *here;
|
A = (BindElement *)a ;
|
||||||
int i ;
|
B = (BindElement *)b ;
|
||||||
|
|
||||||
/* loop through all the INDacitor models */
|
return ((int)(A->Sparse - B->Sparse)) ;
|
||||||
for( ; model != NULL; model = model->INDnextModel ) {
|
|
||||||
|
|
||||||
/* loop through all the instances of the model */
|
|
||||||
for (here = model->INDinstances; here != NULL ;
|
|
||||||
here=here->INDnextInstance) {
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->INDposNode != 0) && (here->INDbrEq != 0)) {
|
|
||||||
while (here->INDposIbrptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->INDposIbrptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->INDnegNode != 0) && (here->INDbrEq != 0)) {
|
|
||||||
while (here->INDnegIbrptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->INDnegIbrptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->INDbrEq != 0) && (here->INDnegNode != 0)) {
|
|
||||||
while (here->INDibrNegptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->INDibrNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->INDbrEq != 0) && (here->INDposNode != 0)) {
|
|
||||||
while (here->INDibrPosptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->INDibrPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->INDbrEq != 0) && (here->INDbrEq != 0)) {
|
|
||||||
while (here->INDibrIbrptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->INDibrIbrptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
INDbindCSCComplex(GENmodel *inModel, CKTcircuit *ckt)
|
INDbindCSC (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
INDmodel *model = (INDmodel *)inModel;
|
INDmodel *model = (INDmodel *)inModel ;
|
||||||
INDinstance *here;
|
INDinstance *here ;
|
||||||
int i ;
|
double *i ;
|
||||||
|
BindElement *matched, *BindStruct ;
|
||||||
|
size_t nz ;
|
||||||
|
|
||||||
/* loop through all the INDacitor models */
|
BindStruct = ckt->CKTmatrix->CKTbindStruct ;
|
||||||
for( ; model != NULL; model = model->INDnextModel ) {
|
nz = (size_t)ckt->CKTmatrix->CKTklunz ;
|
||||||
|
|
||||||
/* loop through all the instances of the model */
|
/* loop through all the inductor models */
|
||||||
for (here = model->INDinstances; here != NULL ;
|
for ( ; model != NULL ; model = model->INDnextModel)
|
||||||
here=here->INDnextInstance) {
|
{
|
||||||
|
/* loop through all the instances of the model */
|
||||||
|
for (here = model->INDinstances ; here != NULL ; here = here->INDnextInstance)
|
||||||
|
{
|
||||||
|
if ((here->INDposNode != 0) && (here->INDbrEq != 0))
|
||||||
|
{
|
||||||
|
i = here->INDposIbrptr ;
|
||||||
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
|
here->INDposIbrStructPtr = matched ;
|
||||||
|
here->INDposIbrptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->INDnegNode != 0) && (here->INDbrEq != 0))
|
||||||
if ((here->INDposNode != 0) && (here->INDbrEq != 0)) {
|
{
|
||||||
while (here->INDposIbrptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
i = here->INDnegIbrptr ;
|
||||||
here->INDposIbrptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->INDnegIbrStructPtr = matched ;
|
||||||
|
here->INDnegIbrptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->INDbrEq != 0) && (here->INDnegNode != 0))
|
||||||
if ((here->INDnegNode != 0) && (here->INDbrEq != 0)) {
|
{
|
||||||
while (here->INDnegIbrptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
i = here->INDibrNegptr ;
|
||||||
here->INDnegIbrptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->INDibrNegStructPtr = matched ;
|
||||||
|
here->INDibrNegptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->INDbrEq != 0) && (here->INDposNode != 0))
|
||||||
if ((here->INDbrEq != 0) && (here->INDnegNode != 0)) {
|
{
|
||||||
while (here->INDibrNegptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
i = here->INDibrPosptr ;
|
||||||
here->INDibrNegptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->INDibrPosStructPtr = matched ;
|
||||||
|
here->INDibrPosptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->INDbrEq != 0) && (here->INDbrEq != 0))
|
||||||
if ((here->INDbrEq != 0) && (here->INDposNode != 0)) {
|
{
|
||||||
while (here->INDibrPosptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
i = here->INDibrIbrptr ;
|
||||||
here->INDibrPosptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->INDibrIbrStructPtr = matched ;
|
||||||
|
here->INDibrIbrptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
return (OK) ;
|
||||||
if ((here->INDbrEq != 0) && (here->INDbrEq != 0)) {
|
}
|
||||||
while (here->INDibrIbrptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
|
||||||
here->INDibrIbrptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
int
|
||||||
}
|
INDbindCSCComplex (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
}
|
{
|
||||||
}
|
INDmodel *model = (INDmodel *)inModel ;
|
||||||
return(OK);
|
INDinstance *here ;
|
||||||
|
|
||||||
|
NG_IGNORE (ckt) ;
|
||||||
|
|
||||||
|
/* loop through all the inductor models */
|
||||||
|
for ( ; model != NULL ; model = model->INDnextModel)
|
||||||
|
{
|
||||||
|
/* loop through all the instances of the model */
|
||||||
|
for (here = model->INDinstances ; here != NULL ; here = here->INDnextInstance)
|
||||||
|
{
|
||||||
|
if ((here->INDposNode != 0) && (here->INDbrEq != 0))
|
||||||
|
here->INDposIbrptr = here->INDposIbrStructPtr->CSC_Complex ;
|
||||||
|
|
||||||
|
if ((here->INDnegNode != 0) && (here->INDbrEq != 0))
|
||||||
|
here->INDnegIbrptr = here->INDnegIbrStructPtr->CSC_Complex ;
|
||||||
|
|
||||||
|
if ((here->INDbrEq != 0) && (here->INDnegNode != 0))
|
||||||
|
here->INDibrNegptr = here->INDibrNegStructPtr->CSC_Complex ;
|
||||||
|
|
||||||
|
if ((here->INDbrEq != 0) && (here->INDposNode != 0))
|
||||||
|
here->INDibrPosptr = here->INDibrPosStructPtr->CSC_Complex ;
|
||||||
|
|
||||||
|
if ((here->INDbrEq != 0) && (here->INDbrEq != 0))
|
||||||
|
here->INDibrIbrptr = here->INDibrIbrStructPtr->CSC_Complex ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (OK) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -108,48 +122,29 @@ INDbindCSCComplexToReal (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
INDmodel *model = (INDmodel *)inModel ;
|
INDmodel *model = (INDmodel *)inModel ;
|
||||||
INDinstance *here ;
|
INDinstance *here ;
|
||||||
int i ;
|
|
||||||
|
|
||||||
/* loop through all the Inductor models */
|
NG_IGNORE (ckt) ;
|
||||||
|
|
||||||
|
/* loop through all the inductor models */
|
||||||
for ( ; model != NULL ; model = model->INDnextModel)
|
for ( ; model != NULL ; model = model->INDnextModel)
|
||||||
{
|
{
|
||||||
/* loop through all the instances of the model */
|
/* loop through all the instances of the model */
|
||||||
for (here = model->INDinstances ; here != NULL ; here = here->INDnextInstance)
|
for (here = model->INDinstances ; here != NULL ; here = here->INDnextInstance)
|
||||||
{
|
{
|
||||||
i = 0 ;
|
|
||||||
if ((here->INDposNode != 0) && (here->INDbrEq != 0))
|
if ((here->INDposNode != 0) && (here->INDbrEq != 0))
|
||||||
{
|
here->INDposIbrptr = here->INDposIbrStructPtr->CSC ;
|
||||||
while (here->INDposIbrptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->INDposIbrptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->INDnegNode != 0) && (here->INDbrEq != 0))
|
if ((here->INDnegNode != 0) && (here->INDbrEq != 0))
|
||||||
{
|
here->INDnegIbrptr = here->INDnegIbrStructPtr->CSC ;
|
||||||
while (here->INDnegIbrptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->INDnegIbrptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->INDbrEq != 0) && (here->INDnegNode != 0))
|
if ((here->INDbrEq != 0) && (here->INDnegNode != 0))
|
||||||
{
|
here->INDibrNegptr = here->INDibrNegStructPtr->CSC ;
|
||||||
while (here->INDibrNegptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->INDibrNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->INDbrEq != 0) && (here->INDposNode != 0))
|
if ((here->INDbrEq != 0) && (here->INDposNode != 0))
|
||||||
{
|
here->INDibrPosptr = here->INDibrPosStructPtr->CSC ;
|
||||||
while (here->INDibrPosptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->INDibrPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->INDbrEq != 0) && (here->INDbrEq != 0))
|
if ((here->INDbrEq != 0) && (here->INDbrEq != 0))
|
||||||
{
|
here->INDibrIbrptr = here->INDibrIbrStructPtr->CSC ;
|
||||||
while (here->INDibrIbrptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->INDibrIbrptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -158,63 +153,67 @@ INDbindCSCComplexToReal (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
|
|
||||||
#ifdef MUTUAL
|
#ifdef MUTUAL
|
||||||
int
|
int
|
||||||
MUTbindCSC(GENmodel *inModel, CKTcircuit *ckt)
|
MUTbindCSC (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
MUTmodel *model = (MUTmodel *)inModel;
|
MUTmodel *model = (MUTmodel *)inModel ;
|
||||||
MUTinstance *here;
|
MUTinstance *here ;
|
||||||
int i ;
|
double *i ;
|
||||||
|
BindElement *matched, *BindStruct ;
|
||||||
|
size_t nz ;
|
||||||
|
|
||||||
/* loop through all the INDacitor models */
|
BindStruct = ckt->CKTmatrix->CKTbindStruct ;
|
||||||
for( ; model != NULL; model = model->MUTnextModel ) {
|
nz = (size_t)ckt->CKTmatrix->CKTklunz ;
|
||||||
|
|
||||||
/* loop through all the instances of the model */
|
/* loop through all the mutual inductor models */
|
||||||
for (here = model->MUTinstances; here != NULL ;
|
for ( ; model != NULL ; model = model->MUTnextModel)
|
||||||
here=here->MUTnextInstance) {
|
{
|
||||||
|
/* loop through all the instances of the model */
|
||||||
|
for (here = model->MUTinstances ; here != NULL ; here = here->MUTnextInstance)
|
||||||
|
{
|
||||||
|
if ((here->MUTind1->INDbrEq != 0) && (here->MUTind2->INDbrEq != 0))
|
||||||
|
{
|
||||||
|
i = here->MUTbr1br2 ;
|
||||||
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
|
here->MUTbr1br2StructPtr = matched ;
|
||||||
|
here->MUTbr1br2 = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->MUTind2->INDbrEq != 0) && (here->MUTind1->INDbrEq != 0))
|
||||||
if ((here->MUTind1->INDbrEq != 0) && (here->MUTind2->INDbrEq != 0)) {
|
{
|
||||||
while (here->MUTbr1br2 != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
i = here->MUTbr2br1 ;
|
||||||
here->MUTbr1br2 = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->MUTbr2br1StructPtr = matched ;
|
||||||
|
here->MUTbr2br1 = matched->CSC ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
return (OK) ;
|
||||||
if ((here->MUTind2->INDbrEq != 0) && (here->MUTind1->INDbrEq != 0)) {
|
|
||||||
while (here->MUTbr2br1 != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->MUTbr2br1 = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
MUTbindCSCComplex(GENmodel *inModel, CKTcircuit *ckt)
|
MUTbindCSCComplex (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
MUTmodel *model = (MUTmodel *)inModel;
|
MUTmodel *model = (MUTmodel *)inModel ;
|
||||||
MUTinstance *here;
|
MUTinstance *here ;
|
||||||
int i ;
|
|
||||||
|
|
||||||
/* loop through all the INDacitor models */
|
NG_IGNORE (ckt) ;
|
||||||
for( ; model != NULL; model = model->MUTnextModel ) {
|
|
||||||
|
|
||||||
/* loop through all the instances of the model */
|
/* loop through all the mutual inductor models */
|
||||||
for (here = model->MUTinstances; here != NULL ;
|
for ( ; model != NULL ; model = model->MUTnextModel)
|
||||||
here=here->MUTnextInstance) {
|
{
|
||||||
|
/* loop through all the instances of the model */
|
||||||
|
for (here = model->MUTinstances ; here != NULL ; here = here->MUTnextInstance)
|
||||||
|
{
|
||||||
|
if ((here->MUTind1->INDbrEq != 0) && (here->MUTind2->INDbrEq != 0))
|
||||||
|
here->MUTbr1br2 = here->MUTbr1br2StructPtr->CSC_Complex ;
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->MUTind2->INDbrEq != 0) && (here->MUTind1->INDbrEq != 0))
|
||||||
if ((here->MUTind1->INDbrEq != 0) && (here->MUTind2->INDbrEq != 0)) {
|
here->MUTbr2br1 = here->MUTbr2br1StructPtr->CSC_Complex ;
|
||||||
while (here->MUTbr1br2 != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
}
|
||||||
here->MUTbr1br2 = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
return (OK) ;
|
||||||
if ((here->MUTind2->INDbrEq != 0) && (here->MUTind1->INDbrEq != 0)) {
|
|
||||||
while (here->MUTbr2br1 != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
|
||||||
here->MUTbr2br1 = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -222,27 +221,20 @@ MUTbindCSCComplexToReal (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
MUTmodel *model = (MUTmodel *)inModel ;
|
MUTmodel *model = (MUTmodel *)inModel ;
|
||||||
MUTinstance *here ;
|
MUTinstance *here ;
|
||||||
int i ;
|
|
||||||
|
|
||||||
/* loop through all the MutualInductor models */
|
NG_IGNORE (ckt) ;
|
||||||
|
|
||||||
|
/* loop through all the mutual inductor models */
|
||||||
for ( ; model != NULL ; model = model->MUTnextModel)
|
for ( ; model != NULL ; model = model->MUTnextModel)
|
||||||
{
|
{
|
||||||
/* loop through all the instances of the model */
|
/* loop through all the instances of the model */
|
||||||
for (here = model->MUTinstances ; here != NULL ; here = here->MUTnextInstance)
|
for (here = model->MUTinstances ; here != NULL ; here = here->MUTnextInstance)
|
||||||
{
|
{
|
||||||
i = 0 ;
|
|
||||||
if ((here->MUTind1->INDbrEq != 0) && (here->MUTind2->INDbrEq != 0))
|
if ((here->MUTind1->INDbrEq != 0) && (here->MUTind2->INDbrEq != 0))
|
||||||
{
|
here->MUTbr1br2 = here->MUTbr1br2StructPtr->CSC ;
|
||||||
while (here->MUTbr1br2 != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->MUTbr1br2 = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->MUTind2->INDbrEq != 0) && (here->MUTind1->INDbrEq != 0))
|
if ((here->MUTind2->INDbrEq != 0) && (here->MUTind1->INDbrEq != 0))
|
||||||
{
|
here->MUTbr2br1 = here->MUTbr2br1StructPtr->CSC ;
|
||||||
while (here->MUTbr2br1 != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->MUTbr2br1 = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,14 @@ typedef struct sINDinstance {
|
||||||
int INDsenParmNo; /* parameter # for sensitivity use;
|
int INDsenParmNo; /* parameter # for sensitivity use;
|
||||||
set equal to 0 if not a design parameter*/
|
set equal to 0 if not a design parameter*/
|
||||||
|
|
||||||
|
#ifdef KLU
|
||||||
|
BindElement *INDposIbrStructPtr ;
|
||||||
|
BindElement *INDnegIbrStructPtr ;
|
||||||
|
BindElement *INDibrPosStructPtr ;
|
||||||
|
BindElement *INDibrNegStructPtr ;
|
||||||
|
BindElement *INDibrIbrStructPtr ;
|
||||||
|
#endif
|
||||||
|
|
||||||
} INDinstance ;
|
} INDinstance ;
|
||||||
|
|
||||||
#define INDflux INDstate /* flux in the inductor */
|
#define INDflux INDstate /* flux in the inductor */
|
||||||
|
|
@ -125,6 +133,10 @@ typedef struct sMUTinstance {
|
||||||
int MUTsenParmNo; /* parameter # for sensitivity use;
|
int MUTsenParmNo; /* parameter # for sensitivity use;
|
||||||
set equal to 0 if not a design parameter*/
|
set equal to 0 if not a design parameter*/
|
||||||
|
|
||||||
|
#ifdef KLU
|
||||||
|
BindElement *MUTbr1br2StructPtr ;
|
||||||
|
BindElement *MUTbr2br1StructPtr ;
|
||||||
|
#endif
|
||||||
|
|
||||||
} MUTinstance ;
|
} MUTinstance ;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,88 +7,103 @@ Author: 2012 Francesco Lannutti
|
||||||
#include "resdefs.h"
|
#include "resdefs.h"
|
||||||
#include "ngspice/sperror.h"
|
#include "ngspice/sperror.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
static
|
||||||
int
|
int
|
||||||
RESbindCSC(GENmodel *inModel, CKTcircuit *ckt)
|
BindCompare (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
RESmodel *model = (RESmodel *)inModel;
|
BindElement *A, *B ;
|
||||||
int i ;
|
A = (BindElement *)a ;
|
||||||
|
B = (BindElement *)b ;
|
||||||
|
|
||||||
/* loop through all the resistor models */
|
return ((int)(A->Sparse - B->Sparse)) ;
|
||||||
for( ; model != NULL; model = model->RESnextModel ) {
|
|
||||||
RESinstance *here;
|
|
||||||
|
|
||||||
/* loop through all the instances of the model */
|
|
||||||
for (here = model->RESinstances; here != NULL ;
|
|
||||||
here = here->RESnextInstance) {
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->RESposNode != 0) && (here->RESposNode != 0)) {
|
|
||||||
while (here->RESposPosptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->RESposPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->RESnegNode != 0) && (here->RESnegNode != 0)) {
|
|
||||||
while (here->RESnegNegptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->RESnegNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->RESposNode != 0) && (here->RESnegNode != 0)) {
|
|
||||||
while (here->RESposNegptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->RESposNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->RESnegNode != 0) && (here->RESposNode != 0)) {
|
|
||||||
while (here->RESnegPosptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->RESnegPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
RESbindCSCComplex(GENmodel *inModel, CKTcircuit *ckt)
|
RESbindCSC (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
RESmodel *model = (RESmodel *)inModel;
|
RESmodel *model = (RESmodel *)inModel ;
|
||||||
int i ;
|
RESinstance *here ;
|
||||||
|
double *i ;
|
||||||
|
BindElement *matched, *BindStruct ;
|
||||||
|
size_t nz ;
|
||||||
|
|
||||||
/* loop through all the resistor models */
|
BindStruct = ckt->CKTmatrix->CKTbindStruct ;
|
||||||
for( ; model != NULL; model = model->RESnextModel ) {
|
nz = (size_t)ckt->CKTmatrix->CKTklunz ;
|
||||||
RESinstance *here;
|
|
||||||
|
|
||||||
|
/* loop through all the resistor models */
|
||||||
|
for ( ; model != NULL ; model = model->RESnextModel)
|
||||||
|
{
|
||||||
/* loop through all the instances of the model */
|
/* loop through all the instances of the model */
|
||||||
for (here = model->RESinstances; here != NULL ;
|
for (here = model->RESinstances ; here != NULL ; here = here->RESnextInstance)
|
||||||
here = here->RESnextInstance) {
|
{
|
||||||
|
if ((here->RESposNode != 0) && (here->RESposNode != 0))
|
||||||
|
{
|
||||||
|
i = here->RESposPosptr ;
|
||||||
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
|
here->RESposPosStructPtr = matched ;
|
||||||
|
here->RESposPosptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->RESnegNode != 0) && (here->RESnegNode != 0))
|
||||||
if ((here->RESposNode != 0) && (here->RESposNode != 0)) {
|
{
|
||||||
while (here->RESposPosptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
i = here->RESnegNegptr ;
|
||||||
here->RESposPosptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->RESnegNegStructPtr = matched ;
|
||||||
|
here->RESnegNegptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->RESposNode != 0) && (here->RESnegNode != 0))
|
||||||
if ((here->RESnegNode != 0) && (here->RESnegNode != 0)) {
|
{
|
||||||
while (here->RESnegNegptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
i = here->RESposNegptr ;
|
||||||
here->RESnegNegptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->RESposNegStructPtr = matched ;
|
||||||
|
here->RESposNegptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->RESnegNode != 0) && (here->RESposNode != 0))
|
||||||
if ((here->RESposNode != 0) && (here->RESnegNode != 0)) {
|
{
|
||||||
while (here->RESposNegptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
i = here->RESnegPosptr ;
|
||||||
here->RESposNegptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->RESnegPosStructPtr = matched ;
|
||||||
|
here->RESnegPosptr = matched->CSC ;
|
||||||
i = 0 ;
|
}
|
||||||
if ((here->RESnegNode != 0) && (here->RESposNode != 0)) {
|
}
|
||||||
while (here->RESnegPosptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
|
||||||
here->RESnegPosptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return(OK);
|
|
||||||
|
return (OK) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
RESbindCSCComplex (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
|
{
|
||||||
|
RESmodel *model = (RESmodel *)inModel ;
|
||||||
|
RESinstance *here ;
|
||||||
|
|
||||||
|
NG_IGNORE (ckt) ;
|
||||||
|
|
||||||
|
/* loop through all the resistor models */
|
||||||
|
for ( ; model != NULL ; model = model->RESnextModel)
|
||||||
|
{
|
||||||
|
/* loop through all the instances of the model */
|
||||||
|
for (here = model->RESinstances ; here != NULL ; here = here->RESnextInstance)
|
||||||
|
{
|
||||||
|
if ((here->RESposNode != 0) && (here->RESposNode != 0))
|
||||||
|
here->RESposPosptr = here->RESposPosStructPtr->CSC_Complex ;
|
||||||
|
|
||||||
|
if ((here->RESnegNode != 0) && (here->RESnegNode != 0))
|
||||||
|
here->RESnegNegptr = here->RESnegNegStructPtr->CSC_Complex ;
|
||||||
|
|
||||||
|
if ((here->RESposNode != 0) && (here->RESnegNode != 0))
|
||||||
|
here->RESposNegptr = here->RESposNegStructPtr->CSC_Complex ;
|
||||||
|
|
||||||
|
if ((here->RESnegNode != 0) && (here->RESposNode != 0))
|
||||||
|
here->RESnegPosptr = here->RESnegPosStructPtr->CSC_Complex ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (OK) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -96,41 +111,26 @@ RESbindCSCComplexToReal (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
RESmodel *model = (RESmodel *)inModel ;
|
RESmodel *model = (RESmodel *)inModel ;
|
||||||
RESinstance *here ;
|
RESinstance *here ;
|
||||||
int i ;
|
|
||||||
|
|
||||||
/* loop through all the resistor models */
|
NG_IGNORE (ckt) ;
|
||||||
|
|
||||||
|
/* loop through all the resistor models */
|
||||||
for ( ; model != NULL ; model = model->RESnextModel)
|
for ( ; model != NULL ; model = model->RESnextModel)
|
||||||
{
|
{
|
||||||
/* loop through all the instances of the model */
|
/* loop through all the instances of the model */
|
||||||
for (here = model->RESinstances ; here != NULL ; here = here->RESnextInstance)
|
for (here = model->RESinstances ; here != NULL ; here = here->RESnextInstance)
|
||||||
{
|
{
|
||||||
i = 0 ;
|
|
||||||
if ((here->RESposNode != 0) && (here->RESposNode != 0))
|
if ((here->RESposNode != 0) && (here->RESposNode != 0))
|
||||||
{
|
here->RESposPosptr = here->RESposPosStructPtr->CSC ;
|
||||||
while (here->RESposPosptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->RESposPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->RESnegNode != 0) && (here->RESnegNode != 0))
|
if ((here->RESnegNode != 0) && (here->RESnegNode != 0))
|
||||||
{
|
here->RESnegNegptr = here->RESnegNegStructPtr->CSC ;
|
||||||
while (here->RESnegNegptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->RESnegNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->RESposNode != 0) && (here->RESnegNode != 0))
|
if ((here->RESposNode != 0) && (here->RESnegNode != 0))
|
||||||
{
|
here->RESposNegptr = here->RESposNegStructPtr->CSC ;
|
||||||
while (here->RESposNegptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->RESposNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->RESnegNode != 0) && (here->RESposNode != 0))
|
if ((here->RESnegNode != 0) && (here->RESposNode != 0))
|
||||||
{
|
here->RESnegPosptr = here->RESnegPosStructPtr->CSC ;
|
||||||
while (here->RESnegPosptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->RESnegPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,13 @@ typedef struct sRESinstance {
|
||||||
double **RESnVar;
|
double **RESnVar;
|
||||||
#endif /* NONOISE */
|
#endif /* NONOISE */
|
||||||
|
|
||||||
|
#ifdef KLU
|
||||||
|
BindElement *RESposPosStructPtr ;
|
||||||
|
BindElement *RESposNegStructPtr ;
|
||||||
|
BindElement *RESnegPosStructPtr ;
|
||||||
|
BindElement *RESnegNegStructPtr ;
|
||||||
|
#endif
|
||||||
|
|
||||||
} RESinstance ;
|
} RESinstance ;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,88 +7,103 @@ Author: 2012 Francesco Lannutti
|
||||||
#include "vsrcdefs.h"
|
#include "vsrcdefs.h"
|
||||||
#include "ngspice/sperror.h"
|
#include "ngspice/sperror.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
static
|
||||||
int
|
int
|
||||||
VSRCbindCSC(GENmodel *inModel, CKTcircuit *ckt)
|
BindCompare (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
VSRCmodel *model = (VSRCmodel *)inModel;
|
BindElement *A, *B ;
|
||||||
int i ;
|
A = (BindElement *)a ;
|
||||||
|
B = (BindElement *)b ;
|
||||||
|
|
||||||
/* loop through all the resistor models */
|
return ((int)(A->Sparse - B->Sparse)) ;
|
||||||
for( ; model != NULL; model = model->VSRCnextModel ) {
|
|
||||||
VSRCinstance *here;
|
|
||||||
|
|
||||||
/* loop through all the instances of the model */
|
|
||||||
for (here = model->VSRCinstances; here != NULL ;
|
|
||||||
here = here->VSRCnextInstance) {
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->VSRCposNode != 0) && (here->VSRCbranch != 0)) {
|
|
||||||
while (here->VSRCposIbrptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->VSRCposIbrptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->VSRCnegNode != 0) && (here->VSRCbranch != 0)) {
|
|
||||||
while (here->VSRCnegIbrptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->VSRCnegIbrptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->VSRCbranch != 0) && (here->VSRCnegNode != 0)) {
|
|
||||||
while (here->VSRCibrNegptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->VSRCibrNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->VSRCbranch != 0) && (here->VSRCposNode != 0)) {
|
|
||||||
while (here->VSRCibrPosptr != ckt->CKTmatrix->CKTbind_Sparse [i]) i ++ ;
|
|
||||||
here->VSRCibrPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
VSRCbindCSCComplex(GENmodel *inModel, CKTcircuit *ckt)
|
VSRCbindCSC (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
VSRCmodel *model = (VSRCmodel *)inModel;
|
VSRCmodel *model = (VSRCmodel *)inModel ;
|
||||||
int i ;
|
VSRCinstance *here ;
|
||||||
|
double *i ;
|
||||||
|
BindElement *matched, *BindStruct ;
|
||||||
|
size_t nz ;
|
||||||
|
|
||||||
/* loop through all the resistor models */
|
BindStruct = ckt->CKTmatrix->CKTbindStruct ;
|
||||||
for( ; model != NULL; model = model->VSRCnextModel ) {
|
nz = (size_t)ckt->CKTmatrix->CKTklunz ;
|
||||||
VSRCinstance *here;
|
|
||||||
|
|
||||||
|
/* loop through all the voltage source models */
|
||||||
|
for ( ; model != NULL ; model = model->VSRCnextModel)
|
||||||
|
{
|
||||||
/* loop through all the instances of the model */
|
/* loop through all the instances of the model */
|
||||||
for (here = model->VSRCinstances; here != NULL ;
|
for (here = model->VSRCinstances ; here != NULL ; here = here->VSRCnextInstance)
|
||||||
here = here->VSRCnextInstance) {
|
{
|
||||||
|
if ((here->VSRCposNode != 0) && (here->VSRCbranch != 0))
|
||||||
|
{
|
||||||
|
i = here->VSRCposIbrptr ;
|
||||||
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
|
here->VSRCposIbrStructPtr = matched ;
|
||||||
|
here->VSRCposIbrptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->VSRCnegNode != 0) && (here->VSRCbranch != 0))
|
||||||
if ((here->VSRCposNode != 0) && (here->VSRCbranch != 0)) {
|
{
|
||||||
while (here->VSRCposIbrptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
i = here->VSRCnegIbrptr ;
|
||||||
here->VSRCposIbrptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->VSRCnegIbrStructPtr = matched ;
|
||||||
|
here->VSRCnegIbrptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->VSRCbranch != 0) && (here->VSRCnegNode != 0))
|
||||||
if ((here->VSRCnegNode != 0) && (here->VSRCbranch != 0)) {
|
{
|
||||||
while (here->VSRCnegIbrptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
i = here->VSRCibrNegptr ;
|
||||||
here->VSRCnegIbrptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->VSRCibrNegStructPtr = matched ;
|
||||||
|
here->VSRCibrNegptr = matched->CSC ;
|
||||||
|
}
|
||||||
|
|
||||||
i = 0 ;
|
if ((here->VSRCbranch != 0) && (here->VSRCposNode != 0))
|
||||||
if ((here->VSRCbranch != 0) && (here->VSRCnegNode != 0)) {
|
{
|
||||||
while (here->VSRCibrNegptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
i = here->VSRCibrPosptr ;
|
||||||
here->VSRCibrNegptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
matched = (BindElement *) bsearch (&i, BindStruct, nz, sizeof(BindElement), BindCompare) ;
|
||||||
}
|
here->VSRCibrPosStructPtr = matched ;
|
||||||
|
here->VSRCibrPosptr = matched->CSC ;
|
||||||
i = 0 ;
|
}
|
||||||
if ((here->VSRCbranch != 0) && (here->VSRCposNode != 0)) {
|
}
|
||||||
while (here->VSRCibrPosptr != ckt->CKTmatrix->CKTbind_CSC [i]) i ++ ;
|
|
||||||
here->VSRCibrPosptr = ckt->CKTmatrix->CKTbind_CSC_Complex [i] ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return(OK);
|
|
||||||
|
return (OK) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
VSRCbindCSCComplex (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
|
{
|
||||||
|
VSRCmodel *model = (VSRCmodel *)inModel ;
|
||||||
|
VSRCinstance *here ;
|
||||||
|
|
||||||
|
NG_IGNORE (ckt) ;
|
||||||
|
|
||||||
|
/* loop through all the voltage source models */
|
||||||
|
for ( ; model != NULL ; model = model->VSRCnextModel)
|
||||||
|
{
|
||||||
|
/* loop through all the instances of the model */
|
||||||
|
for (here = model->VSRCinstances ; here != NULL ; here = here->VSRCnextInstance)
|
||||||
|
{
|
||||||
|
if ((here->VSRCposNode != 0) && (here->VSRCbranch != 0))
|
||||||
|
here->VSRCposIbrptr = here->VSRCposIbrStructPtr->CSC_Complex ;
|
||||||
|
|
||||||
|
if ((here->VSRCnegNode != 0) && (here->VSRCbranch != 0))
|
||||||
|
here->VSRCnegIbrptr = here->VSRCnegIbrStructPtr->CSC_Complex ;
|
||||||
|
|
||||||
|
if ((here->VSRCbranch != 0) && (here->VSRCnegNode != 0))
|
||||||
|
here->VSRCibrNegptr = here->VSRCibrNegStructPtr->CSC_Complex ;
|
||||||
|
|
||||||
|
if ((here->VSRCbranch != 0) && (here->VSRCposNode != 0))
|
||||||
|
here->VSRCibrPosptr = here->VSRCibrPosStructPtr->CSC_Complex ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (OK) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
@ -96,41 +111,26 @@ VSRCbindCSCComplexToReal (GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
VSRCmodel *model = (VSRCmodel *)inModel ;
|
VSRCmodel *model = (VSRCmodel *)inModel ;
|
||||||
VSRCinstance *here ;
|
VSRCinstance *here ;
|
||||||
int i ;
|
|
||||||
|
|
||||||
/* loop through all the source models */
|
NG_IGNORE (ckt) ;
|
||||||
|
|
||||||
|
/* loop through all the voltage source models */
|
||||||
for ( ; model != NULL ; model = model->VSRCnextModel)
|
for ( ; model != NULL ; model = model->VSRCnextModel)
|
||||||
{
|
{
|
||||||
/* loop through all the instances of the model */
|
/* loop through all the instances of the model */
|
||||||
for (here = model->VSRCinstances ; here != NULL ; here = here->VSRCnextInstance)
|
for (here = model->VSRCinstances ; here != NULL ; here = here->VSRCnextInstance)
|
||||||
{
|
{
|
||||||
i = 0 ;
|
|
||||||
if ((here->VSRCposNode != 0) && (here->VSRCbranch != 0))
|
if ((here->VSRCposNode != 0) && (here->VSRCbranch != 0))
|
||||||
{
|
here->VSRCposIbrptr = here->VSRCposIbrStructPtr->CSC ;
|
||||||
while (here->VSRCposIbrptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->VSRCposIbrptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->VSRCnegNode != 0) && (here->VSRCbranch != 0))
|
if ((here->VSRCnegNode != 0) && (here->VSRCbranch != 0))
|
||||||
{
|
here->VSRCnegIbrptr = here->VSRCnegIbrStructPtr->CSC ;
|
||||||
while (here->VSRCnegIbrptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->VSRCnegIbrptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->VSRCbranch != 0) && (here->VSRCnegNode != 0))
|
if ((here->VSRCbranch != 0) && (here->VSRCnegNode != 0))
|
||||||
{
|
here->VSRCibrNegptr = here->VSRCibrNegStructPtr->CSC ;
|
||||||
while (here->VSRCibrNegptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->VSRCibrNegptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0 ;
|
|
||||||
if ((here->VSRCbranch != 0) && (here->VSRCposNode != 0))
|
if ((here->VSRCbranch != 0) && (here->VSRCposNode != 0))
|
||||||
{
|
here->VSRCibrPosptr = here->VSRCibrPosStructPtr->CSC ;
|
||||||
while (here->VSRCibrPosptr != ckt->CKTmatrix->CKTbind_CSC_Complex [i]) i ++ ;
|
|
||||||
here->VSRCibrPosptr = ckt->CKTmatrix->CKTbind_CSC [i] ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,14 @@ typedef struct sVSRCinstance {
|
||||||
unsigned VSRCdF1given :1 ; /* flag to indicate source is an f1 distortion input */
|
unsigned VSRCdF1given :1 ; /* flag to indicate source is an f1 distortion input */
|
||||||
unsigned VSRCdF2given :1 ; /* flag to indicate source is an f2 distortion input */
|
unsigned VSRCdF2given :1 ; /* flag to indicate source is an f2 distortion input */
|
||||||
unsigned VSRCrGiven :1 ; /* flag to indicate repeating pwl */
|
unsigned VSRCrGiven :1 ; /* flag to indicate repeating pwl */
|
||||||
|
|
||||||
|
#ifdef KLU
|
||||||
|
BindElement *VSRCposIbrStructPtr ;
|
||||||
|
BindElement *VSRCnegIbrStructPtr ;
|
||||||
|
BindElement *VSRCibrPosStructPtr ;
|
||||||
|
BindElement *VSRCibrNegStructPtr ;
|
||||||
|
#endif
|
||||||
|
|
||||||
} VSRCinstance ;
|
} VSRCinstance ;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue