G+Smo
24.08.0
Geometry + Simulation Modules
|
Utility class for PDE's solver related utils.
Static Public Member Functions | |
static T | conditionNumber (const gsMatrix< T > &matrix, bool removeSingularity=false) |
Finds the spectral condition number of a small matrix. More... | |
static T | conditionNumber (const gsSparseMatrix< T > &matrix) |
Finds the spectral condition number of a small matrix. | |
static T | convergenceRateLS (std::vector< T > const &error_list, std::vector< T > const &h_list) |
Finds the convergence rate for a list of errors and a list with elements sizes by the least square method. More... | |
|
inlinestatic |
Finds the spectral condition number of a small matrix.
Find the condition number of a matrix by fist finding the eigenvalues of the matrix and then dividing the highest (absolute) eigenvalue by the lowest (absolute) eigenvalue. This method is computationally expensive and will only work on small matrices. The method assumes that the eigenvalues are reel.
[in] | matrix | is a square matrix hows eigenvalues are found. |
[in] | removeSingularity | is true: ONE eigenvalue is removed to avoid inf condition number. |
|
inlinestatic |
Finds the convergence rate for a list of errors and a list with elements sizes by the least square method.
This function takes a list with errors and a list with elements sizes and find the convergence rate by fitting a straight line after taking the logarithm of the values. It uses the Least Square method to find the slope/gradient of the fitted line.
[in] | error_list | list for the errors (in decreasing order) |
[in] | h_list | list of the elements sizes (in decreasing order) PS: This method of finding convergence rate require some initial refinements |