44 #define spINSIDE_SPARSE
110 int I, *pExtOrder, Size;
118 Intermediate =
Matrix->Intermediate;
128 pExtOrder = &
Matrix->IntToExtRowMap[Size];
129 for (I = Size; I > 0; I--)
130 Intermediate[I] =
RHS[*(pExtOrder--)];
133 for (I = 1; I <= Size; I++) {
135 if ((Temp = Intermediate[I]) != 0.0) {
137 Intermediate[I] = (Temp *= pPivot->
Real);
140 while (pElement !=
NULL) {
141 Intermediate[pElement->
Row] -= Temp * pElement->
Real;
148 for (I = Size; I > 0; I--) {
149 Temp = Intermediate[I];
150 pElement =
Matrix->Diag[I]->NextInRow;
151 while (pElement !=
NULL) {
152 Temp -= pElement->
Real * Intermediate[pElement->
Col];
155 Intermediate[I] = Temp;
159 pExtOrder = &
Matrix->IntToExtColMap[Size];
160 for (I = Size; I > 0; I--)
161 Solution[*(pExtOrder--)] = Intermediate[I];
230 int I, *pExtOrder, Size;
239 Intermediate =
Matrix->Intermediate;
248 pExtOrder = &
Matrix->IntToExtColMap[Size];
249 for (I = Size; I > 0; I--)
250 Intermediate[I] =
RHS[*(pExtOrder--)];
253 for (I = 1; I <= Size; I++) {
255 if ((Temp = Intermediate[I]) != 0.0) {
256 pElement =
Matrix->Diag[I]->NextInRow;
257 while (pElement !=
NULL) {
258 Intermediate[pElement->
Col] -= Temp * pElement->
Real;
265 for (I = Size; I > 0; I--) {
267 Temp = Intermediate[I];
269 while (pElement !=
NULL) {
270 Temp -= pElement->
Real * Intermediate[pElement->
Row];
273 Intermediate[I] = Temp * pPivot->
Real;
277 pExtOrder = &
Matrix->IntToExtRowMap[Size];
278 for (I = Size; I > 0; I--)
279 Solution[*(pExtOrder--)] = Intermediate[I];
struct MatrixFrame * MatrixPtr
#define IS_FACTORED(matrix)
#define ASSERT(condition)
void spSolve(char *eMatrix, RealVector RHS, RealVector Solution, std::optional< RealVector > iRHS, std::optional< RealVector > iSolution)
void spSolveTransposed(char *eMatrix, RealVector RHS, RealVector Solution, std::optional< RealVector > iRHS, std::optional< RealVector > iSolution)
struct MatrixElement * NextInCol
struct MatrixElement * NextInRow