21 #ifndef MatrixSolver_H
22 #define MatrixSolver_H
33 double x_LBC,
double x_UBC,
34 string x_LBC_type,
string x_UBC_type,
40 int x_size,
int y_size,
43 string &x_LBC_type,
string &x_UBC_type,
44 string &y_LBC_type,
string &y_UBC_type,
45 int ix,
int iy,
int in);
51 int x_size,
int y_size,
54 string x_LBC_type,
string x_UBC_type,
55 string y_LBC_type,
string y_UBC_type,
65 string FirstDerivative,
string SecondDerivative,
69 double multiplicator);
76 string FirstDerivative,
string SecondDerivative,
81 double multiplicator);
85 string FirstDerivative,
string SecondDerivative,
90 double multiplicator);
94 string FirstDerivative,
string SecondDerivative,
104 string FirstDerivative,
string SecondDerivative,
114 bool tridag(
double a[],
double b[],
double c[],
double r[],
double u[],
long n);
120 extern void dgbsv_(
long int *n,
long int *kl,
long int *ku,
long int *nrhs,
double *ab,
long int *ldab,
long int *ipiv,
double *b,
long int *ldb,
long int *info);
126 int x_size,
int y_size,
129 string x_LBC_type,
string x_UBC_type,
130 string y_LBC_type,
string y_UBC_type,
136 int x_size,
int y_size,
139 string x_LBC_type,
string x_UBC_type,
140 string y_LBC_type,
string y_UBC_type,
146 int x_size,
int y_size,
149 string x_LBC_type,
string x_UBC_type,
150 string y_LBC_type,
string y_UBC_type,
156 int x_size,
int y_size,
159 string x_LBC_type,
string x_UBC_type,
160 string y_LBC_type,
string y_UBC_type,
166 int x_size,
int y_size,
169 string x_LBC_type,
string x_UBC_type,
170 string y_LBC_type,
string y_UBC_type,
176 int x_size,
int y_size,
179 string x_LBC_type,
string x_UBC_type,
180 string y_LBC_type,
string y_UBC_type,
void AnySecondDerivativeApproximation_2D(CalculationMatrix &matr_A, int ix, int iy, string FirstDerivative, string SecondDerivative, Matrix2D< double > &x, Matrix2D< double > &y, Matrix2D< double > &Coef1, Matrix2D< double > &Coef2, double multiplicator)
Definition: MatrixSolver.cpp:1322
Matrix 1D, 2D, 3D and 4D and operations with them.
bool MakeModelMatrix_2D_ADI3_y(CalculationMatrix &matr_A, CalculationMatrix &matr_B, CalculationMatrix &matr_C, Matrix2D< double > &x, Matrix2D< double > &y, int x_size, int y_size, Matrix1D< double > x_LBC, Matrix1D< double > x_UBC, Matrix1D< double > y_LBC, Matrix1D< double > y_UBC, string x_LBC_type, string x_UBC_type, string y_LBC_type, string y_UBC_type, Matrix2D< double > &Dxx, Matrix2D< double > &Dyy, Matrix2D< double > &Dxy, Matrix2D< double > &Dyx, Matrix2D< double > &G, double dt)
THIS FUNCTION IS CURRENTLY NOT BEING USED.
Definition: MatrixSolver.cpp:891
bool tridag(double a[], double b[], double c[], double r[], double u[], long n)
Solve the AU=R system of equations, where A - tridiagonal matrix nxn with diagonals a[]...
Definition: MatrixSolver.cpp:1445
void AnySecondDerivativeApproximation_2D_y(CalculationMatrix &matr_A, int ix, int iy, string FirstDerivative, string SecondDerivative, Matrix2D< double > &x, Matrix2D< double > &y, Matrix2D< double > &Coef1, Matrix2D< double > &Coef2, double multiplicator)
Definition: MatrixSolver.cpp:1379
bool MakeModelMatrix_2D_ADI3_x(CalculationMatrix &matr_A, CalculationMatrix &matr_B, CalculationMatrix &matr_C, Matrix2D< double > &x, Matrix2D< double > &y, int x_size, int y_size, Matrix1D< double > x_LBC, Matrix1D< double > x_UBC, Matrix1D< double > y_LBC, Matrix1D< double > y_UBC, string x_LBC_type, string x_UBC_type, string y_LBC_type, string y_UBC_type, Matrix2D< double > &Dxx, Matrix2D< double > &Dyy, Matrix2D< double > &Dxy, Matrix2D< double > &Dyx, Matrix2D< double > &G, double dt)
THIS FUNCTION IS CURRENTLY NOT BEING USED.
Definition: MatrixSolver.cpp:760
void SecondDerivativeApproximation_2D_y(CalculationMatrix &matr_A, int ix, int iy, string FirstDerivative, string SecondDerivative, Matrix2D< double > &x, Matrix2D< double > &y, Matrix2D< double > &D, Matrix2D< double > &G, double multiplicator)
Definition: MatrixSolver.cpp:1264
bool MakeModelMatrix_2D_ADI1_y(CalculationMatrix &matr_A, CalculationMatrix &matr_B, CalculationMatrix &matr_C, Matrix2D< double > &x, Matrix2D< double > &y, int x_size, int y_size, Matrix1D< double > x_LBC, Matrix1D< double > x_UBC, Matrix1D< double > y_LBC, Matrix1D< double > y_UBC, string x_LBC_type, string x_UBC_type, string y_LBC_type, string y_UBC_type, Matrix2D< double > &Dxx, Matrix2D< double > &Dyy, Matrix2D< double > &Dxy, Matrix2D< double > &Dyx, Matrix2D< double > &G, double dt)
THIS FUNCTION IS CURRENTLY NOT BEING USED.
Definition: MatrixSolver.cpp:335
A matrix used primarily for diagonalized calculations.
Definition: Matrix.h:472
A matrix of 1 dimensions that is immutable.
Definition: Matrix.h:49
bool AddBoundaries_1D(CalculationMatrix &matr_A, CalculationMatrix &matr_B, CalculationMatrix &matr_C, Matrix1D< double > &x, int x_size, double x_LBC, double x_UBC, string x_LBC_type, string x_UBC_type, int ix)
Definition: MatrixSolver.cpp:63
void dgbsv_(long int *n, long int *kl, long int *ku, long int *nrhs, double *ab, long int *ldab, long int *ipiv, double *b, long int *ldb, long int *info)
Lapack function for matrix inversion declaration.
Diagonals of matrix stored as map (diagonal number, 1d diagonal array)
void SecondDerivativeApproximation_1D(CalculationMatrix &matr_A, int ix, string FirstDerivative, string SecondDerivative, Matrix1D< double > &x, Matrix1D< double > &D, Matrix1D< double > &G, double multiplicator)
Definition: MatrixSolver.cpp:1109
A matrix of 2 dimensions that is immutable.
Definition: Matrix.h:139
void SecondDerivativeApproximation_2D(CalculationMatrix &matr_A, int ix, int iy, string FirstDerivative, string SecondDerivative, Matrix2D< double > &x, Matrix2D< double > &y, Matrix2D< double > &D, Matrix2D< double > &G, double multiplicator)
Definition: MatrixSolver.cpp:1195
void AddBoundary(DiagMatrix &Matrix_A, string type, int in, int id1, double dh)
Definition: MatrixSolver.cpp:43
bool AddBoundaries_2D(CalculationMatrix &matr_A, CalculationMatrix &matr_B, CalculationMatrix &matr_C, Matrix2D< double > &x, Matrix2D< double > &y, int x_size, int y_size, Matrix1D< double > x_LBC, Matrix1D< double > x_UBC, Matrix1D< double > y_LBC, Matrix1D< double > y_UBC, string &x_LBC_type, string &x_UBC_type, string &y_LBC_type, string &y_UBC_type, int ix, int iy, int in)
Definition: MatrixSolver.cpp:123
void GetDerivativeVector_2D(string derivativeType, int &dx, int &dy)
Definition: MatrixSolver.cpp:1169
bool MakeModelMatrix_2D_ADI2_x(CalculationMatrix &matr_A, CalculationMatrix &matr_B, CalculationMatrix &matr_C, Matrix2D< double > &x, Matrix2D< double > &y, int x_size, int y_size, Matrix1D< double > x_LBC, Matrix1D< double > x_UBC, Matrix1D< double > y_LBC, Matrix1D< double > y_UBC, string x_LBC_type, string x_UBC_type, string y_LBC_type, string y_UBC_type, Matrix2D< double > &Dxx, Matrix2D< double > &Dyy, Matrix2D< double > &Dxy, Matrix2D< double > &Dyx, Matrix2D< double > &G, double dt)
THIS FUNCTION IS CURRENTLY NOT BEING USED.
Definition: MatrixSolver.cpp:448
bool MakeModelMatrix_2D(CalculationMatrix &matr_A, CalculationMatrix &matr_B, CalculationMatrix &matr_C, Matrix2D< double > &x, Matrix2D< double > &y, int x_size, int y_size, Matrix1D< double > &x_LBC, Matrix1D< double > &x_UBC, Matrix1D< double > &y_LBC, Matrix1D< double > &y_UBC, string x_LBC_type, string x_UBC_type, string y_LBC_type, string y_UBC_type, Matrix2D< double > &Dxx, Matrix2D< double > &Dyy, Matrix2D< double > &Dxy, Matrix2D< double > &Dyx, Matrix2D< double > &G, Matrix2D< double > Sources, Matrix2D< double > Losses, double dt)
FUNCITON NOT IMPLEMENTED.
bool MakeModelMatrix_2D_ADI1_x(CalculationMatrix &matr_A, CalculationMatrix &matr_B, CalculationMatrix &matr_C, Matrix2D< double > &x, Matrix2D< double > &y, int x_size, int y_size, Matrix1D< double > x_LBC, Matrix1D< double > x_UBC, Matrix1D< double > y_LBC, Matrix1D< double > y_UBC, string x_LBC_type, string x_UBC_type, string y_LBC_type, string y_UBC_type, Matrix2D< double > &Dxx, Matrix2D< double > &Dyy, Matrix2D< double > &Dxy, Matrix2D< double > &Dyx, Matrix2D< double > &G, double dt)
THIS FUNCTION IS CURRENTLY NOT BEING USED.
Definition: MatrixSolver.cpp:225
void Lapack(DiagMatrix &A, Matrix1D< double > &B, Matrix1D< double > &X)
Definition: MatrixSolver.cpp:1018
bool MakeModelMatrix_2D_ADI2_y(CalculationMatrix &matr_A, CalculationMatrix &matr_B, CalculationMatrix &matr_C, Matrix2D< double > &x, Matrix2D< double > &y, int x_size, int y_size, Matrix1D< double > x_LBC, Matrix1D< double > x_UBC, Matrix1D< double > y_LBC, Matrix1D< double > y_UBC, string x_LBC_type, string x_UBC_type, string y_LBC_type, string y_UBC_type, Matrix2D< double > &Dxx, Matrix2D< double > &Dyy, Matrix2D< double > &Dxy, Matrix2D< double > &Dyx, Matrix2D< double > &G, double dt)
THIS FUNCTION IS CURRENTLY NOT BEING USED.
Definition: MatrixSolver.cpp:604