|
IPCC
1.0
|
This class includes functions for Hamiltonian building. More...
#include "KNHamiltonianBuilder.h"

Public Member Functions | |
| CKNHamiltonianBuilder () | |
| ~CKNHamiltonianBuilder () | |
Static Public Member Functions | |
| static bool | BuildHamiltonian (CKNCommandFileParser::LPINPUT_CMD_PARAM lpParam, LPNEIGHBOR_MAP_INFO lpMapInfo, CKNMatrixOperation::CKNCSR *pCSRResult, unsigned int fAtomStartID) |
| Build Hamiltonian matrxi from mapinfo data. More... | |
| static void | ResetPeriodicBinding (CKNMatrixOperation::CKNCSR *pResult, LPNEIGHBOR_MAP_INFO lpMapInfo) |
| Reset Hamiltonian before applying phase. More... | |
| static void | FinalizeMatrixBuffer () |
| Release all temporary buffer. More... | |
Static Private Member Functions | |
| static void | BuildHccDiagonalFor10Band (CKNMatrixOperation::CKNVector *pVector, LPGEO_PARAMETER lpParameter) |
| Build cation diagonal basic element. More... | |
| static void | BuildHaaDiagonalFor10Band (CKNMatrixOperation::CKNVector *pVector, LPGEO_PARAMETER lpParameter) |
| Build aion diagonal basic element. More... | |
| static void | BuildHonsiteBasicMatrixFor10Band (CKNMatrixOperation::CKNDMatrix *pMatrixHonsiteAnion, CKNMatrixOperation::CKNDMatrix *pMatrixHonsiteCation, LPGEO_PARAMETER lpParameter) |
| Build aion and cation basic element. More... | |
| static void | BuildOffsiteMatrixFor10Band (GEO_PARAMETER ¶meter, CKNMatrixOperation::CKNDMatrix *pMatrixACNbr, MATERIAL_INDEX materialFrom, MATERIAL_INDEX materialDest, CKNGeometricAtom::ATOM_TYPE type) |
| Build offdiable elements. More... | |
| static bool | FillMatrixFor10Band (CKNMatrixOperation::CKNCSR *pResult, CKNCommandFileParser::LPINPUT_CMD_PARAM lpParam, LPNEIGHBOR_MAP_INFO lpMapInfo) |
| Fill Hamiltonian matrix. More... | |
| static void | BuildACCANeighborFor10Band (CKNMatrixOperation::CKNDMatrix *pMatrixACNbr, CKNMatrixOperation::CKNDMatrix *pMatrixCANbr, CKNCommandFileParser::LPINPUT_CMD_PARAM lpParam) |
| Build aion to cation, cation to aion direction calculation elements. More... | |
| static void | InitMatirxsFor10BandFillMatrix (CKNMatrixOperation::CKNDMatrix *pMatrixTransAnion, CKNMatrixOperation::CKNDMatrix *pMatrixTransAnionTranspos, CKNMatrixOperation::CKNDMatrix *pMatrixTransCation, CKNMatrixOperation::CKNDMatrix *pMatrixTransCationTranspos, CKNMatrixOperation::CKNDMatrix *pMatrixTempSpinUp, CKNMatrixOperation::CKNDMatrix *pMatrixTempSpinUpResult, CKNMatrixOperation::CKNDMatrix *pMatrixHonsiteAnion, CKNMatrixOperation::CKNDMatrix *pMatrixHonsiteCation) |
| Initializing matrix for 10 band basis Hamiltonian. More... | |
| static void | RotateTransMatrixFor10Band () |
| Rotating 10 band basis anion and cation base matrix. More... | |
| static void | InitTransMatrixFor10Band () |
| Initializing Trans matrix for 10 band basis Hamiltonian. More... | |
Static Private Attributes | |
| static unsigned int | m_fAtomIDStartIndex = 0 |
| Start index of atom in shape, using in MPI running enviroment. More... | |
| static unsigned int | m_nBandSize |
| Band size 5, 10, 20. More... | |
| static double | m_Trans_anion [4][4] |
| Trans matrix for anion. More... | |
| static double | m_Trans_cation [4][4] |
| Trans matrix for cation. More... | |
| static vector < CKNMatrixOperation::CKNDMatrix * > | m_vectMatrixNbr |
| Hamiltonian offdiagonal elements. More... | |
| static map< int, unsigned int > | m_mapMatrixIndex |
| Hamiltonian offdiagonal elements mapper. More... | |
This class includes functions for Hamiltonian building.
Definition at line 23 of file KNHamiltonianBuilder.h.
| CKNHamiltonianBuilder::CKNHamiltonianBuilder | ( | ) |
Definition at line 25 of file KNHamiltonianBuilder.cpp.
| CKNHamiltonianBuilder::~CKNHamiltonianBuilder | ( | ) |
Definition at line 30 of file KNHamiltonianBuilder.cpp.
|
staticprivate |
Build aion to cation, cation to aion direction calculation elements.
| [out] | pMatrixACNbr | Offdiagonal element of anion to ctaion compling |
| [out] | pMatrixCANbr | Offdiagonal element of ctaion to anion compling |
| paramter | Geometric parameters | |
| lpParam | Input parameters parsing from command file |
Definition at line 195 of file KNHamiltonianBuilder.cpp.
References CKNCommandFileParser::INPUT_CMD_PARAM::bNeedRotate, CKNMatrixOperation::CKNDMatrix::BuildMatrixFirst(), CKNGeometricShape::m_rotationMatrix, CKNMatrixOperation::MMMul(), CKNMatrixOperation::CKNDMatrix::SetElement(), and CKNMatrixOperation::CKNDMatrix::TrnasPos().
Referenced by FillMatrixFor10Band().


|
staticprivate |
Build aion diagonal basic element.
| [out] | pVector | Diagonal elements of Anion |
| paramter | Geometric parameters |
Definition at line 58 of file KNHamiltonianBuilder.cpp.
References GEO_PARAMETER::fEda, GEO_PARAMETER::fEpa, GEO_PARAMETER::fEsa, GEO_PARAMETER::fEstara, and CKNMatrixOperation::CKNVector::SetAt().
Referenced by BuildHonsiteBasicMatrixFor10Band().


|
static |
Build Hamiltonian matrxi from mapinfo data.
| lpParam | Input parameters parsing from command file | |
| lpMapInfo | Atom map information | |
| [out] | CKNMatrixOperation | Empty CSR instance |
| fAtomStartID | For MPI env., Setting start row index for current node |
Definition at line 245 of file KNHamiltonianBuilder.cpp.
References FillMatrixFor10Band(), NEIGHBOR_MAP_INFO::fItemCount, m_fAtomIDStartIndex, m_nBandSize, and CKNCommandFileParser::INPUT_CMD_PARAM::nBandSize.
Referenced by CKNTBMS_Solver::Launching_TBMS_Solver().


|
staticprivate |
Build cation diagonal basic element.
| [out] | pVector | Diagonal elements of Cation |
| paramter | Geometric parameters |
Definition at line 39 of file KNHamiltonianBuilder.cpp.
References GEO_PARAMETER::fEdc, GEO_PARAMETER::fEpc, GEO_PARAMETER::fEsc, GEO_PARAMETER::fEstarc, and CKNMatrixOperation::CKNVector::SetAt().
Referenced by BuildHonsiteBasicMatrixFor10Band().


|
staticprivate |
Build aion and cation basic element.
| [out] | pMatrixHonsiteAnion | Onsite matrix block for anion |
| [out] | pMatrixHonsiteCation | Onsite matrix block for cation |
| lpParameter | Geometric parameters |
Definition at line 78 of file KNHamiltonianBuilder.cpp.
References BuildHaaDiagonalFor10Band(), BuildHccDiagonalFor10Band(), CKNMatrixOperation::CKNVector::Finalize(), CKNMatrixOperation::CKNDMatrix::SetDiagonal(), and CKNMatrixOperation::CKNVector::SetSize().
Referenced by FillMatrixFor10Band().


|
staticprivate |
Build offdiable elements.
| parameter | Geometric parameters |
| pMatrixNbr1 | Offdiagonal element for neighbor 1 |
| pMatrixNbr2 | Offdiagonal element for neighbor 2 |
| pMatrixNbr3 | Offdiagonal element for neighbor 3 |
| pMatrixNbr4 | Offdiagonal element for neighbor 4 |
Definition at line 98 of file KNHamiltonianBuilder.cpp.
References CKNGeometricAtom::A, CKNMaterialParam::BuildMaterialParam(), CKNMatrixOperation::CKNDMatrix::BuildMatrixFirst(), CKNTwoCenterl::BuildTwoCenterlParam(), CKNGeometricAtom::C, CKNMatrixOperation::CKNVector::Finalize(), GEO_PARAMETER::fL, GEO_PARAMETER::fM, GEO_PARAMETER::fN, GEO_PARAMETER::fVd1ad1c, GEO_PARAMETER::fVd1ad2c, GEO_PARAMETER::fVd1ad3c, GEO_PARAMETER::fVd1ad4c, GEO_PARAMETER::fVd1ad5c, GEO_PARAMETER::fVd1apxc, GEO_PARAMETER::fVd1apyc, GEO_PARAMETER::fVd1apzc, GEO_PARAMETER::fVd1asc, GEO_PARAMETER::fVd1astc, GEO_PARAMETER::fVd1cd1a, GEO_PARAMETER::fVd1cd2a, GEO_PARAMETER::fVd1cd3a, GEO_PARAMETER::fVd1cd4a, GEO_PARAMETER::fVd1cd5a, GEO_PARAMETER::fVd1cpxa, GEO_PARAMETER::fVd1cpya, GEO_PARAMETER::fVd1cpza, GEO_PARAMETER::fVd1csa, GEO_PARAMETER::fVd1csta, GEO_PARAMETER::fVd2ad1c, GEO_PARAMETER::fVd2ad2c, GEO_PARAMETER::fVd2ad3c, GEO_PARAMETER::fVd2ad4c, GEO_PARAMETER::fVd2ad5c, GEO_PARAMETER::fVd2apxc, GEO_PARAMETER::fVd2apyc, GEO_PARAMETER::fVd2apzc, GEO_PARAMETER::fVd2asc, GEO_PARAMETER::fVd2astc, GEO_PARAMETER::fVd2cd1a, GEO_PARAMETER::fVd2cd2a, GEO_PARAMETER::fVd2cd3a, GEO_PARAMETER::fVd2cd4a, GEO_PARAMETER::fVd2cd5a, GEO_PARAMETER::fVd2cpxa, GEO_PARAMETER::fVd2cpya, GEO_PARAMETER::fVd2cpza, GEO_PARAMETER::fVd2csa, GEO_PARAMETER::fVd2csta, GEO_PARAMETER::fVd3ad1c, GEO_PARAMETER::fVd3ad2c, GEO_PARAMETER::fVd3ad3c, GEO_PARAMETER::fVd3ad4c, GEO_PARAMETER::fVd3ad5c, GEO_PARAMETER::fVd3apxc, GEO_PARAMETER::fVd3apyc, GEO_PARAMETER::fVd3apzc, GEO_PARAMETER::fVd3asc, GEO_PARAMETER::fVd3astc, GEO_PARAMETER::fVd3cd1a, GEO_PARAMETER::fVd3cd2a, GEO_PARAMETER::fVd3cd3a, GEO_PARAMETER::fVd3cd4a, GEO_PARAMETER::fVd3cd5a, GEO_PARAMETER::fVd3cpxa, GEO_PARAMETER::fVd3cpya, GEO_PARAMETER::fVd3cpza, GEO_PARAMETER::fVd3csa, GEO_PARAMETER::fVd3csta, GEO_PARAMETER::fVd4ad1c, GEO_PARAMETER::fVd4ad2c, GEO_PARAMETER::fVd4ad3c, GEO_PARAMETER::fVd4ad4c, GEO_PARAMETER::fVd4ad5c, GEO_PARAMETER::fVd4apxc, GEO_PARAMETER::fVd4apyc, GEO_PARAMETER::fVd4apzc, GEO_PARAMETER::fVd4asc, GEO_PARAMETER::fVd4astc, GEO_PARAMETER::fVd4cd1a, GEO_PARAMETER::fVd4cd2a, GEO_PARAMETER::fVd4cd3a, GEO_PARAMETER::fVd4cd4a, GEO_PARAMETER::fVd4cd5a, GEO_PARAMETER::fVd4cpxa, GEO_PARAMETER::fVd4cpya, GEO_PARAMETER::fVd4cpza, GEO_PARAMETER::fVd4csa, GEO_PARAMETER::fVd4csta, GEO_PARAMETER::fVd5ad1c, GEO_PARAMETER::fVd5ad2c, GEO_PARAMETER::fVd5ad3c, GEO_PARAMETER::fVd5ad4c, GEO_PARAMETER::fVd5ad5c, GEO_PARAMETER::fVd5apxc, GEO_PARAMETER::fVd5apyc, GEO_PARAMETER::fVd5apzc, GEO_PARAMETER::fVd5asc, GEO_PARAMETER::fVd5astc, GEO_PARAMETER::fVd5cd1a, GEO_PARAMETER::fVd5cd2a, GEO_PARAMETER::fVd5cd3a, GEO_PARAMETER::fVd5cd4a, GEO_PARAMETER::fVd5cd5a, GEO_PARAMETER::fVd5cpxa, GEO_PARAMETER::fVd5cpya, GEO_PARAMETER::fVd5cpza, GEO_PARAMETER::fVd5csa, GEO_PARAMETER::fVd5csta, GEO_PARAMETER::fVpxad1c, GEO_PARAMETER::fVpxad2c, GEO_PARAMETER::fVpxad3c, GEO_PARAMETER::fVpxad4c, GEO_PARAMETER::fVpxad5c, GEO_PARAMETER::fVpxapxc, GEO_PARAMETER::fVpxapyc, GEO_PARAMETER::fVpxapzc, GEO_PARAMETER::fVpxasc, GEO_PARAMETER::fVpxastc, GEO_PARAMETER::fVpxcd1a, GEO_PARAMETER::fVpxcd2a, GEO_PARAMETER::fVpxcd3a, GEO_PARAMETER::fVpxcd4a, GEO_PARAMETER::fVpxcd5a, GEO_PARAMETER::fVpxcpxa, GEO_PARAMETER::fVpxcpya, GEO_PARAMETER::fVpxcpza, GEO_PARAMETER::fVpxcsa, GEO_PARAMETER::fVpxcsta, GEO_PARAMETER::fVpyad1c, GEO_PARAMETER::fVpyad2c, GEO_PARAMETER::fVpyad3c, GEO_PARAMETER::fVpyad4c, GEO_PARAMETER::fVpyad5c, GEO_PARAMETER::fVpyapxc, GEO_PARAMETER::fVpyapyc, GEO_PARAMETER::fVpyapzc, GEO_PARAMETER::fVpyasc, GEO_PARAMETER::fVpyastc, GEO_PARAMETER::fVpycd1a, GEO_PARAMETER::fVpycd2a, GEO_PARAMETER::fVpycd3a, GEO_PARAMETER::fVpycd4a, GEO_PARAMETER::fVpycd5a, GEO_PARAMETER::fVpycpxa, GEO_PARAMETER::fVpycpya, GEO_PARAMETER::fVpycpza, GEO_PARAMETER::fVpycsa, GEO_PARAMETER::fVpycsta, GEO_PARAMETER::fVpzad1c, GEO_PARAMETER::fVpzad2c, GEO_PARAMETER::fVpzad3c, GEO_PARAMETER::fVpzad4c, GEO_PARAMETER::fVpzad5c, GEO_PARAMETER::fVpzapxc, GEO_PARAMETER::fVpzapyc, GEO_PARAMETER::fVpzapzc, GEO_PARAMETER::fVpzasc, GEO_PARAMETER::fVpzastc, GEO_PARAMETER::fVpzcd1a, GEO_PARAMETER::fVpzcd2a, GEO_PARAMETER::fVpzcd3a, GEO_PARAMETER::fVpzcd4a, GEO_PARAMETER::fVpzcd5a, GEO_PARAMETER::fVpzcpxa, GEO_PARAMETER::fVpzcpya, GEO_PARAMETER::fVpzcpza, GEO_PARAMETER::fVpzcsa, GEO_PARAMETER::fVpzcsta, GEO_PARAMETER::fVsad1c, GEO_PARAMETER::fVsad2c, GEO_PARAMETER::fVsad3c, GEO_PARAMETER::fVsad4c, GEO_PARAMETER::fVsad5c, GEO_PARAMETER::fVsapxc, GEO_PARAMETER::fVsapyc, GEO_PARAMETER::fVsapzc, GEO_PARAMETER::fVsasc, GEO_PARAMETER::fVsastc, GEO_PARAMETER::fVscd1a, GEO_PARAMETER::fVscd2a, GEO_PARAMETER::fVscd3a, GEO_PARAMETER::fVscd4a, GEO_PARAMETER::fVscd5a, GEO_PARAMETER::fVscpxa, GEO_PARAMETER::fVscpya, GEO_PARAMETER::fVscpza, GEO_PARAMETER::fVscsa, GEO_PARAMETER::fVscsta, GEO_PARAMETER::fVstad1c, GEO_PARAMETER::fVstad2c, GEO_PARAMETER::fVstad3c, GEO_PARAMETER::fVstad4c, GEO_PARAMETER::fVstad5c, GEO_PARAMETER::fVstapxc, GEO_PARAMETER::fVstapyc, GEO_PARAMETER::fVstapzc, GEO_PARAMETER::fVstasc, GEO_PARAMETER::fVstastc, GEO_PARAMETER::fVstcd1a, GEO_PARAMETER::fVstcd2a, GEO_PARAMETER::fVstcd3a, GEO_PARAMETER::fVstcd4a, GEO_PARAMETER::fVstcd5a, GEO_PARAMETER::fVstcpxa, GEO_PARAMETER::fVstcpya, GEO_PARAMETER::fVstcpza, GEO_PARAMETER::fVstcsa, GEO_PARAMETER::fVstcsta, CKNMatrixOperation::CKNVector::GetAt(), CKNMatrixOperation::CKNVector::GetNorm(), CKNComplex::GetRealNumber(), CKNMatrixOperation::CKNDMatrix::GetRowByVector(), m_mapMatrixIndex, m_nBandSize, and m_vectMatrixNbr.
Referenced by FillMatrixFor10Band().


|
staticprivate |
Fill Hamiltonian matrix.
| [out] | CKNMatrixOperation | CSR instance |
| lpParam | Input parameters parsing from command file | |
| lpMapInfo | Atom map information |
Definition at line 276 of file KNHamiltonianBuilder.cpp.
References CKNGeometricAtom::A, ATOM_DEFAULT_INDEX, CKNCommandFileParser::INPUT_CMD_PARAM::bNeedRotate, BuildACCANeighborFor10Band(), BuildHonsiteBasicMatrixFor10Band(), CKNMaterialParam::BuildMaterialParam(), CKNMatrixOperation::CKNDMatrix::BuildMatrixFirst(), BuildOffsiteMatrixFor10Band(), CKNGeometricAtom::C, NEIGHBOR_MAP_INFO::fItemCount, CKNMatrixOperation::CKNDMatrix::GetElement(), CKNComplex::GetRealNumber(), CKNMatrixOperation::CKNDMatrix::GetSmallMatrix(), InitMatirxsFor10BandFillMatrix(), InitTransMatrixFor10Band(), m_fAtomIDStartIndex, m_mapMatrixIndex, m_vectMatrixNbr, CKNMatrixOperation::MMMul(), CKNMatrixOperation::FILL_MATRIX_DATA::nColumnIndex, NEIGHBOR_MAP_INFO::pAtomType, NEIGHBOR_MAP_INFO::pDomainMaterialNumber, NEIGHBOR_MAP_INFO::pfNeighbor, NEIGHBOR_MAP_INFO::pMaterialNumber, CKNMatrixOperation::FILL_MATRIX_DATA::pMatrix, NEIGHBOR_MAP_INFO::pNeighborMaterial, CKNMatrixOperation::CKNCSR::PushMatrixConcurrent(), RotateTransMatrixFor10Band(), CKNMatrixOperation::CKNDMatrix::ScalarDivision(), CKNMatrixOperation::CKNDMatrix::SetElement(), CKNComplex::SetRealNumber(), and CKNMatrixOperation::CKNDMatrix::TrnasPos().
Referenced by BuildHamiltonian().


|
static |
Release all temporary buffer.
Definition at line 550 of file KNHamiltonianBuilder.cpp.
References m_mapMatrixIndex, and m_vectMatrixNbr.
Referenced by CKNTBMS_Solver::Launching_TBMS_Solver().

|
staticprivate |
Initializing matrix for 10 band basis Hamiltonian.
| [out] | pMatrixTransAnion | Matrix for anion |
| [out] | pMatrixTransAnionTranspos | Transpos of Matrix for anion |
| [out] | pMatrixTransCation | Matrix for cation |
| [out] | pMatrixTransCationTranspos | Transpos of Matrix for cation |
| [out] | pMatrixTempSpinUp | Matrix for spin up |
| [out] | pMatrixTempSpinUpResult | Matrix for spin up result |
| [out] | pMatrixHonsiteAnion | Onsite matrix for anion |
| [out] | pMatrixHonsiteCation | Onsite matrix for cation |
Definition at line 518 of file KNHamiltonianBuilder.cpp.
References CKNMatrixOperation::CKNDMatrix::BuildMatrixFirst(), m_mapMatrixIndex, m_nBandSize, m_Trans_anion, m_Trans_cation, m_vectMatrixNbr, and CKNMatrixOperation::CKNDMatrix::SetElement().
Referenced by FillMatrixFor10Band().


|
staticprivate |
Initializing Trans matrix for 10 band basis Hamiltonian.
Definition at line 464 of file KNHamiltonianBuilder.cpp.
References m_Trans_anion, and m_Trans_cation.
Referenced by FillMatrixFor10Band().

|
static |
Reset Hamiltonian before applying phase.
| [out] | CKNMatrixOperation | CSR instance |
| lpMapInfo | Atom map information |
Definition at line 401 of file KNHamiltonianBuilder.cpp.
References ATOM_DEFAULT_INDEX, CKNGeometricAtom::C, NEIGHBOR_MAP_INFO::fItemCount, CKNMatrixOperation::CKNCSR::InsertMatrix(), m_mapMatrixIndex, m_nBandSize, m_vectMatrixNbr, NEIGHBOR_MAP_INFO::pAtomType, NEIGHBOR_MAP_INFO::pbPeriodicCondition, NEIGHBOR_MAP_INFO::pfNeighbor, NEIGHBOR_MAP_INFO::pMaterialNumber, and NEIGHBOR_MAP_INFO::pNeighborMaterial.
Referenced by CKNTBMS_Solver::Launching_TBMS_Solver().


|
staticprivate |
Rotating 10 band basis anion and cation base matrix.
Definition at line 432 of file KNHamiltonianBuilder.cpp.
References CKNMatrixOperation::CKNVector::GetAt(), CKNComplex::GetRealNumber(), CKNGeometricShape::m_rotationMatrix, m_Trans_anion, m_Trans_cation, CKNMatrixOperation::MVMul(), CKNMatrixOperation::CKNVector::SetAt(), and CKNMatrixOperation::CKNVector::SetSize().
Referenced by FillMatrixFor10Band().


|
staticprivate |
Start index of atom in shape, using in MPI running enviroment.
Definition at line 43 of file KNHamiltonianBuilder.h.
Referenced by BuildHamiltonian(), and FillMatrixFor10Band().
|
staticprivate |
Hamiltonian offdiagonal elements mapper.
Definition at line 50 of file KNHamiltonianBuilder.h.
Referenced by BuildOffsiteMatrixFor10Band(), FillMatrixFor10Band(), FinalizeMatrixBuffer(), InitMatirxsFor10BandFillMatrix(), and ResetPeriodicBinding().
|
staticprivate |
Band size 5, 10, 20.
Definition at line 44 of file KNHamiltonianBuilder.h.
Referenced by BuildHamiltonian(), BuildOffsiteMatrixFor10Band(), InitMatirxsFor10BandFillMatrix(), and ResetPeriodicBinding().
|
staticprivate |
Trans matrix for anion.
Definition at line 45 of file KNHamiltonianBuilder.h.
Referenced by InitMatirxsFor10BandFillMatrix(), InitTransMatrixFor10Band(), and RotateTransMatrixFor10Band().
|
staticprivate |
Trans matrix for cation.
Definition at line 46 of file KNHamiltonianBuilder.h.
Referenced by InitMatirxsFor10BandFillMatrix(), InitTransMatrixFor10Band(), and RotateTransMatrixFor10Band().
|
staticprivate |
Hamiltonian offdiagonal elements.
Definition at line 49 of file KNHamiltonianBuilder.h.
Referenced by BuildOffsiteMatrixFor10Band(), FillMatrixFor10Band(), FinalizeMatrixBuffer(), InitMatirxsFor10BandFillMatrix(), and ResetPeriodicBinding().