|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <gtest/gtest.h>#include <stdexcept>#include <cmath>#include <vector>#include "../grad_degen.h"Functions | |
| TEST (JTDirection, ReductionIdentityHolds) | |
| TEST (JTDirection, IsGlobalOverTheSubspace) | |
| TEST (JTDirection, DegenerateCaseGivesTheCommonGradient) | |
| TEST (JTDirection, ScalesLinearly) | |
| Homogeneity: scaling G scales the slope and leaves the direction alone. | |
| TEST (JTDirection, SymmetricSplitReconstructs) | |
| TEST (JTDirection, ZeroGradientReturnsAValidStationaryBranch) | |
| TEST (JTDirection, RejectsUnsupportedDimensionsBeforeEnumeration) | |
| TEST | ( | JTDirection | , |
| DegenerateCaseGivesTheCommonGradient | ) |
A multiplet whose every G block is a multiple of the identity has no Jahn-Teller direction to find: all branches share one gradient, so |q(v)| is the same for every v and nothing splits. The search must still return that common direction rather than something arbitrary.
| TEST | ( | JTDirection | , |
| IsGlobalOverTheSubspace | ) |
Optimality: no other unit mixing may give a larger branch-gradient norm. Brute-forced over the subspace sphere, which is the independent check that the alternating iteration converged to the global optimum and not merely to a stationary point.
| TEST | ( | JTDirection | , |
| ReductionIdentityHolds | ) |
The identity the whole search rests on: min_{|u|=1} lambda_min(M(u)) = -max_{|v|=1} |q(v)|. Checked against a brute-force scan of the left-hand side over directions built from the returned optimum, so a wrong reduction cannot pass.
| TEST | ( | JTDirection | , |
| RejectsUnsupportedDimensionsBeforeEnumeration | ) |
| TEST | ( | JTDirection | , |
| ScalesLinearly | ) |
Homogeneity: scaling G scales the slope and leaves the direction alone.
| TEST | ( | JTDirection | , |
| SymmetricSplitReconstructs | ) |
The symmetric / Jahn-Teller split must reconstruct the branch gradient, and the symmetric part must be the multiplet average – independent of which branch was chosen.
| TEST | ( | JTDirection | , |
| ZeroGradientReturnsAValidStationaryBranch | ) |