Browse Source

Fixes bug 483

prevent crash when surface mobility (surfmob) has been
selected in 2D simulation.
The patch is provided by Brian Taylor (see
https://sourceforge.net/p/ngspice/mailman/ngspice-devel/thread/e6e921a3-677c-f513-7410-df8568c4bdad%40comcast.net/#msg37318450
)
pre-master-46
Holger Vogt 5 years ago
parent
commit
85b07e35bf
  1. 2
      src/ciderlib/twod/twocont.c
  2. 2
      src/ciderlib/twod/twoncont.c
  3. 2
      src/ciderlib/twod/twopcont.c

2
src/ciderlib/twod/twocont.c

@ -253,7 +253,7 @@ void
pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxP ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxP );
} }
} else { /* Horizontal Slice */ } else { /* Horizontal Slice */
if ( nIndex <= 1 ) { /* Top Side */
if ( nIndex == 0 || nIndex == 3 ) { /* Left (Top?) Side : bug 483 */
pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInM ); pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInM );
pNode->fNPsiInP1 = spGetElement( matrix, nEqn, psiEqnInP ); pNode->fNPsiInP1 = spGetElement( matrix, nEqn, psiEqnInP );
pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxM ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxM );

2
src/ciderlib/twod/twoncont.c

@ -211,7 +211,7 @@ void
pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxP ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxP );
} }
} else { /* Horizontal Slice */ } else { /* Horizontal Slice */
if ( nIndex <= 1 ) { /* Top Side */
if ( nIndex == 0 || nIndex == 3 ) { /* Left (Top?) Side : bug 483 */
pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInM ); pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInM );
pNode->fNPsiInP1 = spGetElement( matrix, nEqn, psiEqnInP ); pNode->fNPsiInP1 = spGetElement( matrix, nEqn, psiEqnInP );
pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxM ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxM );

2
src/ciderlib/twod/twopcont.c

@ -210,7 +210,7 @@ void
pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxP ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxP );
} }
} else { /* Horizontal Slice */ } else { /* Horizontal Slice */
if ( nIndex <= 1 ) { /* Top Side */
if ( nIndex == 0 || nIndex == 3 ) { /* Left (Top?) Side : bug 483 */
pNode->fPPsiIn = spGetElement( matrix, pEqn, psiEqnInM ); pNode->fPPsiIn = spGetElement( matrix, pEqn, psiEqnInM );
pNode->fPPsiInP1 = spGetElement( matrix, pEqn, psiEqnInP ); pNode->fPPsiInP1 = spGetElement( matrix, pEqn, psiEqnInP );
pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxM ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxM );

Loading…
Cancel
Save