ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
test_grad_degen.cpp File Reference
#include <gtest/gtest.h>
#include <cmath>
#include <vector>
#include "source_base/matrix.h"
#include "../grad_degen.h"
Include dependency graph for test_grad_degen.cpp:

Functions

 TEST (GradMatrixDegenerate, PolarizationRecoversBilinearForm)
 The whole point: route A2 reproduces the bilinear form exactly, off-diagonal included.
 TEST (GradMatrixDegenerate, IsSymmetric)
 G is symmetric by construction; assert it so a future refactor cannot lose it silently.
 TEST (GradMatrixDegenerate, RotationCovariance)
 TEST (GradMatrixDegenerate, TraceIsBasisInvariantButDiagonalIsNot)
 TEST (GradMatrixDegenerate, CombineNormalizedKeepsNorm)
 TEST (GradMatrixDegenerate, PairOrder)
 TEST (GradMatrixDegenerate, GroupingCollectsMultiplets)
 TEST (GradMatrixDegenerate, GroupingSortsAndHandlesEdgeCases)
 TEST (GradMatrixDegenerate, GroupingDoesNotChain)
 TEST (GradMatrixDegenerate, AssemblesModuleBaseMatrix)
 The template has to work on the type the driver actually uses.

Function Documentation

◆ TEST() [1/10]

TEST ( GradMatrixDegenerate ,
AssemblesModuleBaseMatrix  )

The template has to work on the type the driver actually uses.

Here is the call graph for this function:

◆ TEST() [2/10]

TEST ( GradMatrixDegenerate ,
CombineNormalizedKeepsNorm  )
Here is the call graph for this function:

◆ TEST() [3/10]

TEST ( GradMatrixDegenerate ,
GroupingCollectsMultiplets  )
Here is the call graph for this function:

◆ TEST() [4/10]

TEST ( GradMatrixDegenerate ,
GroupingDoesNotChain  )

Anchoring to the group's first member, not the predecessor: a ladder of steps each below thr must NOT chain into one group whose total spread exceeds it.

Here is the call graph for this function:

◆ TEST() [5/10]

TEST ( GradMatrixDegenerate ,
GroupingSortsAndHandlesEdgeCases  )
Here is the call graph for this function:

◆ TEST() [6/10]

TEST ( GradMatrixDegenerate ,
IsSymmetric  )

G is symmetric by construction; assert it so a future refactor cannot lose it silently.

◆ TEST() [7/10]

TEST ( GradMatrixDegenerate ,
PairOrder  )
Here is the call graph for this function:

◆ TEST() [8/10]

TEST ( GradMatrixDegenerate ,
PolarizationRecoversBilinearForm  )

The whole point: route A2 reproduces the bilinear form exactly, off-diagonal included.

◆ TEST() [9/10]

TEST ( GradMatrixDegenerate ,
RotationCovariance  )

Section 5.4.5(ii), the strongest check: rotating the basis of the degenerate subspace must rotate G, $G'=U^\top G U$. This is what would fail if the pipeline were not a pure quadratic form, and it needs no finite differences.

◆ TEST() [10/10]

TEST ( GradMatrixDegenerate ,
TraceIsBasisInvariantButDiagonalIsNot  )

The trace is basis-invariant while the individual diagonal elements are not – the reason the validation tables compare group means (section 1.1).