Qucs-core
0.0.18
|
#include <eqnsys.h>
Public Member Functions | |
eqnsys () | |
Constructor creates an unnamed instance of the eqnsys class. More... | |
eqnsys (eqnsys &) | |
~eqnsys () | |
Destructor deletes the eqnsys class object. More... | |
void | setAlgo (int a) |
int | getAlgo (void) |
void | passEquationSys (tmatrix< nr_type_t > *, tvector< nr_type_t > *, tvector< nr_type_t > *) |
void | solve (void) |
Private Attributes | |
int | update |
int | algo |
int | pivoting |
int * | rMap |
int * | cMap |
int | N |
nr_double_t * | nPvt |
tmatrix< nr_type_t > * | A |
tmatrix< nr_type_t > * | V |
tvector< nr_type_t > * | B |
tvector< nr_type_t > * | X |
tvector< nr_type_t > * | R |
tvector< nr_type_t > * | T |
tvector< nr_double_t > * | S |
tvector< nr_double_t > * | E |
qucs::eqnsys< nr_type_t >::eqnsys | ( | ) |
Constructor creates an unnamed instance of the eqnsys class.
Definition at line 51 of file eqnsys.cpp.
qucs::eqnsys< nr_type_t >::eqnsys | ( | eqnsys< nr_type_t > & | e | ) |
The copy constructor creates a new instance of the eqnsys class based on the given eqnsys object.
Definition at line 80 of file eqnsys.cpp.
qucs::eqnsys< nr_type_t >::~eqnsys | ( | ) |
Destructor deletes the eqnsys class object.
Definition at line 65 of file eqnsys.cpp.
|
private |
Annihilates near-zero singular values.
Definition at line 1239 of file eqnsys.cpp.
|
private |
The function computes the convergence criteria for iterative methods like Jacobi or Gauss-Seidel as defined by Schmidt and v.Mises.
Definition at line 692 of file eqnsys.cpp.
|
private |
Helper function for the above ensure_diagonal_MNA() function. It looks for the pairs of 1 and -1 on the given row and column index.
Definition at line 756 of file eqnsys.cpp.
|
private |
This function diagonalizes the upper bidiagonal matrix fromed by the diagonal S and the super-diagonal vector E. Both vectors are real valued. Thus real valued calculations even when solving a complex valued equation systems is possible except for the matrix updates of U and V'.
Definition at line 1372 of file eqnsys.cpp.
|
private |
The function tries to ensure that there are non-zero diagonal elements in the equation system matrix A. This is required for iterative solution methods.
Definition at line 706 of file eqnsys.cpp.
|
private |
The function ensures that there are non-zero diagonal elements in the equation system matrix A. It achieves this condition for non-singular matrices which have been produced by the modified nodal analysis. It takes advantage of the fact that the zero diagonal elements have pairs of 1 and -1 on the same column and row.
Definition at line 717 of file eqnsys.cpp.
|
private |
The following function computes the euclidian norm of the given column vector of the matrix A starting from the given row.
Definition at line 847 of file eqnsys.cpp.
|
private |
The following function computes the euclidian norm of the given row vector of the matrix A starting from the given column.
Definition at line 859 of file eqnsys.cpp.
|
private |
This function decomposes the left hand matrix into an upper U and lower L matrix. The algorithm is called LU decomposition (Crout's definition). The function performs the actual LU decomposition of the matrix A using (implicit) partial row pivoting.
Definition at line 319 of file eqnsys.cpp.
|
private |
This function decomposes the left hand matrix into an upper U and lower L matrix. The algorithm is called LU decomposition (Doolittle's definition). The function performs the actual LU decomposition of the matrix A using (implicit) partial row pivoting.
Definition at line 385 of file eqnsys.cpp.
|
private |
The function decomposes the matrix A into two matrices, the orthonormal matrix Q and the upper triangular matrix R. The original matrix is replaced by the householder vectors in the lower triangular and the upper triangular R matrix (including the diagonal). The householder vectors are normalized to have one in their first position.
Definition at line 949 of file eqnsys.cpp.
|
private |
The function decomposes the matrix A into two matrices, the orthonormal matrix Q and the upper triangular matrix R. The original matrix is replaced by the householder vectors in the lower triangular (including the diagonal) and the upper triangular R matrix with its diagonal elements stored in the R vector.
Definition at line 884 of file eqnsys.cpp.
|
private |
The function decomposes the matrix A into three other matrices U, S and V'. The matrix A is overwritten by the U matrix, S is stored in a separate vector and V in a separate matrix.
Definition at line 1278 of file eqnsys.cpp.
|
inline |
|
private |
Definition at line 1345 of file eqnsys.cpp.
|
private |
Definition at line 1356 of file eqnsys.cpp.
|
private |
Applies the householder vector stored in the given column to the right-hand columns using the given normalization factor.
Definition at line 1173 of file eqnsys.cpp.
|
private |
Applies the householder vector stored in the given row to the downward rows using the given normalization factor.
Definition at line 1190 of file eqnsys.cpp.
|
private |
The function does exactly the same as householder_apply_right() except that it applies the householder transformations to another matrix.
Definition at line 1214 of file eqnsys.cpp.
|
private |
The function creates the left-hand householder vector for a given column which eliminates the column except the first element. The householder vector is normalized to have one in the first position. The diagonal element is replaced by the applied householder vector and the vector itself is located in the free matrix positions. The function returns the normalization factor.
Definition at line 1091 of file eqnsys.cpp.
|
private |
The function creates the right-hand householder vector for a given row which eliminates the row except the first element. The householder vector is normalized to have one in the first position. The super-diagonal element is replaced by the applied householder vector and the vector itself is located in the free matrix positions. The function returns the normalization factor.
Definition at line 1149 of file eqnsys.cpp.
|
private |
The function computes a Householder vector to zero-out the matrix entries in the given column, stores it in the annihilated vector space (in a packed form) and applies the transformation to the remaining right-hand columns.
Definition at line 1117 of file eqnsys.cpp.
|
private |
The function computes a Householder vector to zero-out the matrix entries in the given row, stores it in the annihilated vector space (in a packed form) and applies the transformation to the remaining downward rows.
Definition at line 1132 of file eqnsys.cpp.
void qucs::eqnsys< nr_type_t >::passEquationSys | ( | tmatrix< nr_type_t > * | nA, |
tvector< nr_type_t > * | refX, | ||
tvector< nr_type_t > * | nB | ||
) |
With this function the describing matrices for the equation system is passed to the equation system solver class. Matrix A is the left hand side of the equation system and B the right hand side vector. The reference pointer to the X vector is going to be the solution vector. The B vector will be locally copied.
Definition at line 99 of file eqnsys.cpp.
|
private |
The function tries to raise the absolute value of diagonal elements by swapping rows and thereby make the A matrix diagonally dominant.
Definition at line 777 of file eqnsys.cpp.
|
inline |
void qucs::eqnsys< nr_type_t >::solve | ( | void | ) |
Depending on the algorithm applied to the equation system solver the function stores the solution of the system into the matrix pointed to by the X matrix reference.
Definition at line 124 of file eqnsys.cpp.
|
private |
The function solves the equation system applying Gaussian elimination with full column pivoting only (no row pivoting).
Definition at line 194 of file eqnsys.cpp.
|
private |
The function solves the equation system applying a modified Gaussian elimination with full column pivoting only (no row pivoting).
Definition at line 234 of file eqnsys.cpp.
|
private |
Simple matrix inversion is used to solve the equation system.
Definition at line 183 of file eqnsys.cpp.
|
private |
The function solves the equation system using a full-step iterative method (called Jacobi's method) or a single-step method (called Gauss-Seidel) depending on the given algorithm. If the current X vector (the solution vector) is the solution within a Newton-Raphson iteration it is a good initial guess and the method is very likely to converge. On divergence the method falls back to LU decomposition.
Definition at line 509 of file eqnsys.cpp.
|
private |
The function uses LU decomposition and the appropriate forward and backward substitutions in order to solve the linear equation system. It is very useful when dealing with equation systems where the left hand side (the A matrix) does not change but the right hand side (the B vector) only.
Definition at line 288 of file eqnsys.cpp.
|
private |
The other LU decomposition.
Definition at line 302 of file eqnsys.cpp.
|
private |
This function uses the QR decomposition using householder transformations in order to solve the given equation system.
Definition at line 811 of file eqnsys.cpp.
|
private |
The function uses the QR decomposition using householder transformations in order to solve the given under-determined equation system in its minimum norm (least square) sense.
Definition at line 820 of file eqnsys.cpp.
|
private |
This function uses the QR decomposition using householder transformations in order to solve the given equation system.
Definition at line 803 of file eqnsys.cpp.
|
private |
The function solves the linear equation system using a single-step iterative algorithm. It is a modification of the Gauss-Seidel method and is called successive over relaxation. The function uses an adaptive scheme to adjust the relaxation parameter.
Definition at line 598 of file eqnsys.cpp.
|
private |
This function solves the equation system AX = B using the singular value decomposition (Golub-Reinsch-SVD).
Definition at line 1231 of file eqnsys.cpp.
|
private |
The function is used in order to run the forward and backward substitutions using the LU decomposed matrix (Crout's definition - Uii are ones).
Definition at line 456 of file eqnsys.cpp.
|
private |
The function is used in order to run the forward and backward substitutions using the LU decomposed matrix (Doolittle's definition - Lii are ones). This function is here because of transposed LU matrices as used in the AC noise analysis.
Definition at line 481 of file eqnsys.cpp.
|
private |
The function uses the householder vectors in order to compute Q'B, then the equation system RX = B is solved by backward substitution.
Definition at line 1024 of file eqnsys.cpp.
|
private |
The function uses the householder vectors in order to the solve the equation system R'X = B by forward substitution, then QX is computed to obtain the least square solution of the under-determined equation system AX = B.
Definition at line 1054 of file eqnsys.cpp.
|
private |
The function uses the householder vectors in order to compute Q'B, then the equation system RX = B is solved by backward substitution.
Definition at line 998 of file eqnsys.cpp.
|
private |
The function uses the singular value decomposition A = USV' to solve the equation system AX = B by simple matrix multiplications. Remember that the factorization actually computed U, S and V'.
Definition at line 1252 of file eqnsys.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |