OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
TestGSLEigen.cpp File Reference

Unit tests for GSL eigenvalue computation. More...

#include <gtest/gtest.h>
#include <algorithm>
#include <cmath>
#include <vector>
#include "Utilities/GSLComplex.h"
#include "Utilities/GSLEigen.h"
#include "Utilities/GSLMatrix.h"
Include dependency graph for TestGSLEigen.cpp:

Go to the source code of this file.

Classes

class  GSLEigenTest
 

Functions

 TEST_F (GSLEigenTest, EigenNonsymm_Identity)
 
 TEST_F (GSLEigenTest, EigenNonsymm_Diagonal)
 
 TEST_F (GSLEigenTest, EigenNonsymmv_Identity)
 
 TEST_F (GSLEigenTest, EigenNonsymmv_Diagonal)
 
 TEST_F (GSLEigenTest, EigenNonsymm_ErrorHandling)
 
 TEST_F (GSLEigenTest, WorkspaceAllocation)
 

Detailed Description

Unit tests for GSL eigenvalue computation.

This file contains unit tests for GSL-compatible eigenvalue and eigenvector computation routines. The implementation uses a simplified QR algorithm for computing eigenvalues of non-symmetric matrices.

Test:
GSLEigenTest::EigenNonsymm_Identity Tests eigenvalue computation for the identity matrix. Verifies that all eigenvalues are 1.0 (with zero imaginary part) for the identity matrix, confirming that the eigenvalue algorithm correctly handles this special case.
Test:
GSLEigenTest::EigenNonsymm_Diagonal Tests eigenvalue computation for a diagonal matrix. Verifies that the computed eigenvalues match the diagonal elements (2, 3, 4), confirming that the algorithm correctly identifies eigenvalues for diagonalizable matrices.
Test:
GSLEigenTest::EigenNonsymmv_Identity Tests computation of both eigenvalues and eigenvectors for the identity matrix. Verifies that eigenvalues are correct and that eigenvectors are computed (though the implementation may use simplified eigenvector computation).
Test:
GSLEigenTest::EigenNonsymmv_Diagonal Tests eigenvalue and eigenvector computation for a diagonal matrix. Verifies that eigenvalues match diagonal elements and that the algorithm completes successfully.
Test:
GSLEigenTest::EigenNonsymm_ErrorHandling Tests error handling for invalid input (non-square matrix). Verifies that the function returns an error code when the input matrix dimensions are incompatible with eigenvalue computation.
Test:
GSLEigenTest::WorkspaceAllocation Tests allocation and deallocation of eigenvalue computation workspaces. Verifies that workspaces are correctly initialized with the specified size and that memory is properly managed.

Definition in file TestGSLEigen.cpp.

Function Documentation

◆ TEST_F() [1/6]

◆ TEST_F() [2/6]

TEST_F ( GSLEigenTest  ,
EigenNonsymm_ErrorHandling   
)

◆ TEST_F() [3/6]

◆ TEST_F() [4/6]

◆ TEST_F() [5/6]

◆ TEST_F() [6/6]

TEST_F ( GSLEigenTest  ,
WorkspaceAllocation   
)