NEURON
spmatrix.h File Reference
#include "spconfig.h"
#include <optional>

Go to the source code of this file.

Classes

struct  spTemplate
 

Macros

#define spOKAY   0
 
#define spSMALL_PIVOT   1
 
#define spZERO_DIAG   2
 
#define spSINGULAR   3
 
#define spNO_MEMORY   4
 
#define spPANIC   5
 
#define spFATAL   2
 
#define spREAL   double
 
#define spDEFAULT_PARTITION   0
 
#define spDIRECT_PARTITION   1
 
#define spINDIRECT_PARTITION   2
 
#define spAUTO_PARTITION   3
 
#define spADD_REAL_ELEMENT(element, real)   *(element) += real
 
#define spADD_IMAG_ELEMENT(element, imag)   *(element + 1) += imag
 
#define spADD_COMPLEX_ELEMENT(element, real, imag)
 
#define spADD_REAL_QUAD(template, real)
 
#define spADD_IMAG_QUAD(template, imag)
 
#define spADD_COMPLEX_QUAD(template, real, imag)
 

Functions

void spClear (char *)
 
spREAL spCondition (char *, spREAL, int *)
 
char * spCreate (int, int, int *)
 
void spDeleteRowAndCol (char *, int, int)
 
void spDestroy (char *)
 
int spElementCount (char *)
 
int spError (char *)
 
int spFactor (char *)
 
int spFileMatrix (char *, char *, char *, int, int, int)
 
int spFileStats (char *, char *, char *)
 
int spFillinCount (char *)
 
int spGetAdmittance (char *, int, int, struct spTemplate *)
 
spREALspGetElement (char *, int, int)
 
char * spGetInitInfo (spREAL *)
 
int spGetOnes (char *, int, int, int, struct spTemplate *)
 
int spGetQuad (char *, int, int, int, int, struct spTemplate *)
 
int spGetSize (char *, int)
 
int spInitialize (char *, int(*)())
 
void spInstallInitInfo (spREAL *, char *)
 
spREAL spLargestElement (char *)
 
void spMNA_Preorder (char *)
 
spREAL spNorm (char *)
 
int spOrderAndFactor (char *, spREAL[], spREAL, spREAL, int)
 
void spPartition (char *, int)
 
void spPrint (char *, int, int, int)
 
spREAL spPseudoCondition (char *)
 
spREAL spRoundoff (char *, spREAL)
 
void spScale (char *, spREAL[], spREAL[])
 
void spSetReal (char *)
 
void spStripFills (char *)
 
void spWhereSingular (char *, int *, int *)
 
void spDeterminant (char *, int *, spREAL *, std::optional< spREAL * >=std::nullopt)
 
int spFileVector (char *, char *, spREAL *, std::optional< spREAL * >=std::nullopt)
 
void spMultiply (char *, spREAL *, spREAL *, std::optional< spREAL * >=std::nullopt, std::optional< spREAL * >=std::nullopt)
 
void spMultTransposed (char *eMatrix, spREAL *RHS, spREAL *Solution, std::optional< spREAL * > iRHS=std::nullopt, std::optional< spREAL * > iSolution=std::nullopt)
 
void spSolve (char *eMatrix, spREAL *RHS, spREAL *Solution, std::optional< spREAL * > iRHS=std::nullopt, std::optional< spREAL * > iSolution=std::nullopt)
 
void spSolveTransposed (char *, spREAL *, spREAL *, std::optional< spREAL * >=std::nullopt, std::optional< spREAL * >=std::nullopt)
 

Macro Definition Documentation

◆ spADD_COMPLEX_ELEMENT

#define spADD_COMPLEX_ELEMENT (   element,
  real,
  imag 
)
Value:
{ \
*(element) += real; \
*(element + 1) += imag; \
}

Definition at line 165 of file spmatrix.h.

◆ spADD_COMPLEX_QUAD

#define spADD_COMPLEX_QUAD (   template,
  real,
  imag 
)
Value:
{ \
*((template).Element1) += real; \
*((template).Element2) += real; \
*((template).Element3Negated) -= real; \
*((template).Element4Negated) -= real; \
*((template).Element1 + 1) += imag; \
*((template).Element2 + 1) += imag; \
*((template).Element3Negated + 1) -= imag; \
*((template).Element4Negated + 1) -= imag; \
}

Definition at line 187 of file spmatrix.h.

◆ spADD_IMAG_ELEMENT

#define spADD_IMAG_ELEMENT (   element,
  imag 
)    *(element + 1) += imag

Definition at line 163 of file spmatrix.h.

◆ spADD_IMAG_QUAD

#define spADD_IMAG_QUAD (   template,
  imag 
)
Value:
{ \
*((template).Element1 + 1) += imag; \
*((template).Element2 + 1) += imag; \
*((template).Element3Negated + 1) -= imag; \
*((template).Element4Negated + 1) -= imag; \
}

Definition at line 179 of file spmatrix.h.

◆ spADD_REAL_ELEMENT

#define spADD_REAL_ELEMENT (   element,
  real 
)    *(element) += real

Definition at line 161 of file spmatrix.h.

◆ spADD_REAL_QUAD

#define spADD_REAL_QUAD (   template,
  real 
)
Value:
{ \
*((template).Element1) += real; \
*((template).Element2) += real; \
*((template).Element3Negated) -= real; \
*((template).Element4Negated) -= real; \
}

Definition at line 171 of file spmatrix.h.

◆ spAUTO_PARTITION

#define spAUTO_PARTITION   3

Definition at line 134 of file spmatrix.h.

◆ spDEFAULT_PARTITION

#define spDEFAULT_PARTITION   0

Definition at line 131 of file spmatrix.h.

◆ spDIRECT_PARTITION

#define spDIRECT_PARTITION   1

Definition at line 132 of file spmatrix.h.

◆ spFATAL

#define spFATAL   2

Definition at line 93 of file spmatrix.h.

◆ spINDIRECT_PARTITION

#define spINDIRECT_PARTITION   2

Definition at line 133 of file spmatrix.h.

◆ spNO_MEMORY

#define spNO_MEMORY   4

Definition at line 90 of file spmatrix.h.

◆ spOKAY

#define spOKAY   0

Definition at line 86 of file spmatrix.h.

◆ spPANIC

#define spPANIC   5

Definition at line 91 of file spmatrix.h.

◆ spREAL

#define spREAL   double

Definition at line 106 of file spmatrix.h.

◆ spSINGULAR

#define spSINGULAR   3

Definition at line 89 of file spmatrix.h.

◆ spSMALL_PIVOT

#define spSMALL_PIVOT   1

Definition at line 87 of file spmatrix.h.

◆ spZERO_DIAG

#define spZERO_DIAG   2

Definition at line 88 of file spmatrix.h.

Function Documentation

◆ spClear()

void spClear ( char *  eMatrix)

Definition at line 82 of file spbuild.cpp.

◆ spCondition()

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

Definition at line 799 of file sputils.cpp.

◆ spCreate()

char* spCreate ( int  ,
int  ,
int *   
)

◆ spDeleteRowAndCol()

void spDeleteRowAndCol ( char *  ,
int  ,
int   
)

◆ spDestroy()

void spDestroy ( char *  eMatrix)

Definition at line 533 of file spalloc.cpp.

◆ spDeterminant()

void spDeterminant ( char *  eMatrix,
int *  pExponent,
spREAL pDeterminant,
std::optional< spREAL * >  piDeterminant = std::nullopt 
)

Definition at line 549 of file sputils.cpp.

◆ spElementCount()

int spElementCount ( char *  eMatrix)

Definition at line 686 of file spalloc.cpp.

◆ spError()

int spError ( char *  eMatrix)

Definition at line 580 of file spalloc.cpp.

◆ spFactor()

int spFactor ( char *  eMatrix)

Definition at line 307 of file spfactor.cpp.

◆ spFileMatrix()

int spFileMatrix ( char *  eMatrix,
char *  File,
char *  Label,
int  Reordered,
int  Data,
int  Header 
)

Definition at line 366 of file spoutput.cpp.

◆ spFileStats()

int spFileStats ( char *  eMatrix,
char *  File,
char *  Label 
)

Definition at line 550 of file spoutput.cpp.

◆ spFileVector()

int spFileVector ( char *  ,
char *  ,
spREAL ,
std::optional< spREAL * >  = std::nullopt 
)

◆ spFillinCount()

int spFillinCount ( char *  eMatrix)

Definition at line 678 of file spalloc.cpp.

◆ spGetAdmittance()

int spGetAdmittance ( char *  Matrix,
int  Node1,
int  Node2,
struct spTemplate Template 
)

Definition at line 294 of file spbuild.cpp.

◆ spGetElement()

spREAL* spGetElement ( char *  eMatrix,
int  Row,
int  Col 
)

Definition at line 151 of file spbuild.cpp.

◆ spGetInitInfo()

char* spGetInitInfo ( spREAL )

◆ spGetOnes()

int spGetOnes ( char *  Matrix,
int  Pos,
int  Neg,
int  Eqn,
struct spTemplate Template 
)

Definition at line 429 of file spbuild.cpp.

◆ spGetQuad()

int spGetQuad ( char *  Matrix,
int  Row1,
int  Row2,
int  Col1,
int  Col2,
struct spTemplate Template 
)

Definition at line 368 of file spbuild.cpp.

◆ spGetSize()

int spGetSize ( char *  ,
int   
)

◆ spInitialize()

int spInitialize ( char *  ,
int(*)()   
)

◆ spInstallInitInfo()

void spInstallInitInfo ( spREAL ,
char *   
)

◆ spLargestElement()

spREAL spLargestElement ( char *  eMatrix)

Definition at line 1097 of file sputils.cpp.

◆ spMNA_Preorder()

void spMNA_Preorder ( char *  eMatrix)

Definition at line 162 of file sputils.cpp.

◆ spMultiply()

void spMultiply ( char *  eMatrix,
spREAL RHS,
spREAL Solution,
std::optional< spREAL * >  iRHS = std::nullopt,
std::optional< spREAL * >  iSolution = std::nullopt 
)

Definition at line 401 of file sputils.cpp.

◆ spMultTransposed()

void spMultTransposed ( char *  eMatrix,
spREAL RHS,
spREAL Solution,
std::optional< spREAL * >  iRHS = std::nullopt,
std::optional< spREAL * >  iSolution = std::nullopt 
)

Definition at line 468 of file sputils.cpp.

◆ spNorm()

spREAL spNorm ( char *  eMatrix)

Definition at line 1001 of file sputils.cpp.

◆ spOrderAndFactor()

int spOrderAndFactor ( char *  ,
spREAL  [],
spREAL  ,
spREAL  ,
int   
)

◆ spPartition()

void spPartition ( char *  eMatrix,
int  Mode 
)

Definition at line 434 of file spfactor.cpp.

◆ spPrint()

void spPrint ( char *  eMatrix,
int  PrintReordered,
int  Data,
int  Header 
)

Definition at line 126 of file spoutput.cpp.

◆ spPseudoCondition()

spREAL spPseudoCondition ( char *  eMatrix)

Definition at line 718 of file sputils.cpp.

◆ spRoundoff()

spREAL spRoundoff ( char *  eMatrix,
spREAL  Rho 
)

Definition at line 1172 of file sputils.cpp.

◆ spScale()

void spScale ( char *  ,
spREAL  [],
spREAL  [] 
)

◆ spSetReal()

void spSetReal ( char *  eMatrix)

Definition at line 658 of file spalloc.cpp.

◆ spSolve()

void spSolve ( char *  eMatrix,
spREAL RHS,
spREAL Solution,
std::optional< spREAL * >  iRHS = std::nullopt,
std::optional< spREAL * >  iSolution = std::nullopt 
)

Definition at line 104 of file spsolve.cpp.

◆ spSolveTransposed()

void spSolveTransposed ( char *  eMatrix,
spREAL RHS,
spREAL Solution,
std::optional< spREAL * >  iRHS = std::nullopt,
std::optional< spREAL * >  iSolution = std::nullopt 
)

Definition at line 225 of file spsolve.cpp.

◆ spStripFills()

void spStripFills ( char *  eMatrix)

Definition at line 629 of file sputils.cpp.

◆ spWhereSingular()

void spWhereSingular ( char *  eMatrix,
int *  pRow,
int *  pCol 
)

Definition at line 607 of file spalloc.cpp.