NEURON
sputils.c File Reference
#include "spconfig.h"
#include "spmatrix.h"
#include "spdefs.h"

Go to the source code of this file.

Macros

#define spINSIDE_SPARSE
 
#define NORM(a)   (nr = ABS((a).Real), ni = ABS((a).Imag), MAX (nr,ni))
 
#define SLACK   1e4
 

Functions

void spcLinkRows (MatrixPtr)
 
void spcRowExchange (MatrixPtr, int row1, int row2)
 
void spcColExchange (MatrixPtr, int col1, int col2)
 
static int CountTwins ()
 
static void SwapCols ()
 
static void ScaleComplexMatrix ()
 
static void ComplexMatrixMultiply ()
 
static void ComplexTransposedMatrixMultiply ()
 
static RealNumber ComplexCondition ()
 
void spMNA_Preorder (char *eMatrix)
 
static int CountTwins (MatrixPtr Matrix, int Col, ElementPtr *ppTwin1, ElementPtr *ppTwin2)
 
static void SwapCols (MatrixPtr Matrix, ElementPtr pTwin1, ElementPtr pTwin2)
 
void spScale (char *eMatrix, RealVector RHS_ScaleFactors, RealVector SolutionScaleFactors)
 
void spMultiply (eMatrix, RHS, Solution IMAG_VECTORS) char *eMatrix
 
 ASSERT (IS_SPARSE(Matrix) AND NOT Matrix->Factored)
 
 if (NOT Matrix->RowsLinked) spcLinkRows(Matrix)
 
 for (I=Matrix->Size;I, 0;I--)
 
void spMultTransposed (eMatrix, RHS, Solution IMAG_VECTORS) char *eMatrix
 
void spDeterminant (char *eMatrix, int *pExponent, RealNumber *pDeterminant)
 
void spStripFills (char *eMatrix)
 
void spDeleteRowAndCol (char *eMatrix, int Row, int Col)
 
RealNumber spPseudoCondition (char *eMatrix)
 
RealNumber spCondition (char *eMatrix, RealNumber NormOfMatrix, int *pError)
 
RealNumber spNorm (char *eMatrix)
 
RealNumber spLargestElement (char *eMatrix)
 
RealNumber spRoundoff (char *eMatrix, RealNumber Rho)
 

Variables

static char copyright []
 
static char RCSid []
 
RealVector RHS
 
RealVector Solution IMAG_VECTORS
 
register RealVector Vector
 
register RealNumber Sum
 
register int I
 
register intpExtOrder = &Matrix->IntToExtColMap[Matrix->Size]
 
MatrixPtr Matrix = (MatrixPtr)eMatrix
 
 return
 

Macro Definition Documentation

◆ NORM

#define NORM (   a)    (nr = ABS((a).Real), ni = ABS((a).Imag), MAX (nr,ni))

◆ SLACK

#define SLACK   1e4

◆ spINSIDE_SPARSE

#define spINSIDE_SPARSE

Definition at line 73 of file sputils.c.

Function Documentation

◆ ASSERT()

ASSERT ( IS_SPARSE(Matrix) AND NOT Matrix->  Factored)

◆ ComplexCondition()

static RealNumber ComplexCondition ( )
static

◆ ComplexMatrixMultiply()

static void ComplexMatrixMultiply ( )
static

◆ ComplexTransposedMatrixMultiply()

static void ComplexTransposedMatrixMultiply ( )
static

◆ CountTwins() [1/2]

static int CountTwins ( )
static

◆ CountTwins() [2/2]

static int CountTwins ( MatrixPtr  Matrix,
int  Col,
ElementPtr ppTwin1,
ElementPtr ppTwin2 
)
static

Definition at line 246 of file sputils.c.

◆ for()

for ( I  = Matrix->SizeI,
0;I--   
)

Definition at line 624 of file sputils.c.

◆ if()

if ( NOT Matrix->  RowsLinked)

◆ ScaleComplexMatrix()

static void ScaleComplexMatrix ( )
static

◆ spcColExchange()

void spcColExchange ( MatrixPtr  ,
int  col1,
int  col2 
)

Definition at line 2335 of file spfactor.c.

◆ spcLinkRows()

void spcLinkRows ( MatrixPtr  )

Definition at line 869 of file spbuild.c.

◆ spCondition()

RealNumber spCondition ( char *  eMatrix,
RealNumber  NormOfMatrix,
int pError 
)

Definition at line 1452 of file sputils.c.

◆ spcRowExchange()

void spcRowExchange ( MatrixPtr  ,
int  row1,
int  row2 
)

Definition at line 2234 of file spfactor.c.

◆ spDeleteRowAndCol()

void spDeleteRowAndCol ( char *  eMatrix,
int  Row,
int  Col 
)

Definition at line 1245 of file sputils.c.

◆ spDeterminant()

void spDeterminant ( char *  eMatrix,
int pExponent,
RealNumber pDeterminant 
)

Definition at line 987 of file sputils.c.

◆ spLargestElement()

RealNumber spLargestElement ( char *  eMatrix)

Definition at line 1974 of file sputils.c.

◆ spMNA_Preorder()

void spMNA_Preorder ( char *  eMatrix)

Definition at line 184 of file sputils.c.

◆ spMultiply()

void spMultiply ( eMatrix  ,
RHS  ,
Solution  IMAG_VECTORS 
)

◆ spMultTransposed()

void spMultTransposed ( eMatrix  ,
RHS  ,
Solution  IMAG_VECTORS 
)

◆ spNorm()

RealNumber spNorm ( char *  eMatrix)

Definition at line 1857 of file sputils.c.

◆ spPseudoCondition()

RealNumber spPseudoCondition ( char *  eMatrix)

Definition at line 1361 of file sputils.c.

◆ spRoundoff()

RealNumber spRoundoff ( char *  eMatrix,
RealNumber  Rho 
)

Definition at line 2093 of file sputils.c.

◆ spScale()

void spScale ( char *  eMatrix,
RealVector  RHS_ScaleFactors,
RealVector  SolutionScaleFactors 
)

Definition at line 376 of file sputils.c.

◆ spStripFills()

void spStripFills ( char *  eMatrix)

Definition at line 1140 of file sputils.c.

◆ SwapCols() [1/2]

static void SwapCols ( )
static

◆ SwapCols() [2/2]

static void SwapCols ( MatrixPtr  Matrix,
ElementPtr  pTwin1,
ElementPtr  pTwin2 
)
static

Definition at line 287 of file sputils.c.

Variable Documentation

◆ copyright

char copyright[]
static
Initial value:
=
"Sparse1.3: Copyright (c) 1985,86,87,88 by Kenneth S. Kundert"

Definition at line 53 of file sputils.c.

◆ I

register int I

Definition at line 600 of file sputils.c.

◆ IMAG_VECTORS

RealVector Solution IMAG_VECTORS

Definition at line 595 of file sputils.c.

◆ Matrix

MatrixPtr Matrix = (MatrixPtr)eMatrix

Definition at line 601 of file sputils.c.

◆ pExtOrder

pExtOrder = &Matrix->IntToExtColMap[Matrix->Size]

Definition at line 600 of file sputils.c.

◆ RCSid

char RCSid[]
static
Initial value:
=
"@(#)$Header$"

Definition at line 55 of file sputils.c.

◆ return

return

Definition at line 638 of file sputils.c.

◆ RHS

Definition at line 595 of file sputils.c.

◆ Sum

register RealNumber Sum

Definition at line 599 of file sputils.c.

◆ Vector

register RealVector Vector
Initial value:
{
register ElementPtr pElement
Definition: spsolve.c:139

Definition at line 596 of file sputils.c.