|
IPCC
1.0
|
This class for describing vector for Lanczos method. More...
#include "MatrixOperation.h"

Classes | |
| struct | VECTOR_ELEMENT |
| Vector Element data. More... | |
Public Types | |
| typedef struct CMatrixOperation::CVector::VECTOR_ELEMENT * | LPVECTOR_ELEMENT |
Public Member Functions | |
| CVector () | |
| Constructor. More... | |
| ~CVector () | |
| Destructor. More... | |
| void | SetSize (unsigned int nSize) |
| Set Vector elements size. More... | |
| unsigned int | GetSize () |
| Return Vector elements size. More... | |
| void | SetAt (unsigned int nIndex, CComplex value) |
| Set element value in specific index, Call by value. More... | |
| void | SetAtEx (unsigned int nIndex, CComplex *pValue) |
| Set element value in specific index, Call by reference. More... | |
| void | SetAt (unsigned int nIndex, double fReal, double fImaginary) |
| Set element value in specific index. More... | |
| CComplex | GetAt (unsigned int nIndex) |
| Get element value from specific index. More... | |
| CComplex * | GetAtPt (unsigned int nIndex) |
| Get element value from specific index. More... | |
| void | ResetValue () |
| Reset every element to zero. More... | |
| void | ScalarMultiple (CComplex Scalar) |
| Scalar multiple operation. More... | |
| void | ScalarMultiple (double fScalar) |
| Scalar multiple operation. More... | |
| void | ScalarDivision (CComplex Scalar) |
| Scalar division operation. More... | |
| void | ScalarDivision (double fScalar) |
| Scalar division operation. More... | |
| void | BuildRandomVector () |
| Building vector that has random value elements. More... | |
| void | Normalize (bool bMPI=false) |
| Normalize vector with norm. More... | |
| double | GetNorm (bool bMPI=false) |
| Getting norm of vector. More... | |
| void | MinusVector (CVector *vector) |
| Do minus operation between vectors. More... | |
| void | PlusVector (CVector *vector) |
| Do plus operation between vectors. More... | |
| void | ScalarMultiThanMinusVector (double fScalar, CVector *vector) |
| Do minus operation after scalar multiple to operand between vectors. More... | |
| void | ReorthogonalizationVector (CVector *pVector, CComplex complex) |
| Do reorthogonalization. More... | |
| void | Finalize () |
| Free allocated memory for vector elements. More... | |
| bool | InsertVector (unsigned int nStartIndex, CMatrixOperation::CVector *pVector) |
| bool | Serialize (double *pBuffer, bool bStore) |
| Serialize vector. More... | |
| CComplex | operator* (CVector &vector) |
| operation overload for dot product with reference parameter More... | |
| CComplex | operator* (CVector *vector) |
| operation overload for dot product with pointer parameter More... | |
| CVector | operator- (CVector &vector) |
| operation overload for vector minus operation with reference parameter More... | |
| CVector | operator- (CVector *vector) |
| operation overload for vector minus operation with pointer parameter More... | |
| CVector | operator+ (CVector &vector) |
| operation overload for vector plus operation with reference parameter More... | |
| CVector | operator+ (CVector *vector) |
| operation overload for vector plus operation with pointer parameter More... | |
| void | operator= (CVector &vector) |
| operation overload for subsitution with reference parameter More... | |
| void | operator= (CVector *vector) |
| operation overload for subsitution with pointer parameter More... | |
Private Attributes | |
| double_vector_t | m_vectValueRealBuffer |
| A member variable for saving none zero elements. More... | |
| double_vector_t | m_vectValueImaginaryBuffer |
| A member variable for saving none zero elements. More... | |
| unsigned int | m_nValueCount |
| A numbers of elements. More... | |
| CComplex | m_rtnTemp |
| Temporary variable for return value. More... | |
Friends | |
| class | CLanczosMethod |
| class | CMatrixOperation |
| class | CMPIManager |
| class | CSPLoop |
This class for describing vector for Lanczos method.
Definition at line 56 of file MatrixOperation.h.
| typedef struct CMatrixOperation::CVector::VECTOR_ELEMENT * CMatrixOperation::CVector::LPVECTOR_ELEMENT |
| CMatrixOperation::CVector::CVector | ( | ) |
Constructor.
CVector Class member function - Start
Definition at line 27 of file MatrixOperation.cpp.
References m_nValueCount.
| CMatrixOperation::CVector::~CVector | ( | ) |
| void CMatrixOperation::CVector::BuildRandomVector | ( | ) |
Building vector that has random value elements.
Definition at line 200 of file MatrixOperation.cpp.
| void CMatrixOperation::CVector::Finalize | ( | ) |
Free allocated memory for vector elements.
Definition at line 364 of file MatrixOperation.cpp.
Referenced by CLanczosMethod::AppendEigenVector(), CLanczosResultAudit::AuditResult_EV(), CHamiltonianBuilder::BuildHonsiteBasicMatrixFor10Band(), CHamiltonianBuilder::BuildOffsiteMatrixFor10Band(), CLanczosMethod::DoResidualCheck(), CSPLoop::Finalize(), CLanczosMethod::LanczosIteration(), CLanczosMethod::LanczosIterationLoop(), CLanczosMethod::MergeDegeneratedEigenvalues(), CMatrixOperation::MVMulOptimal(), CMatrixOperation::MVMulOptimal_Nooffload(), CLanczosMethod::ReleaseResult(), and CLanczosMethod::SortSolution().

| CComplex CMatrixOperation::CVector::GetAt | ( | unsigned int | nIndex | ) |
Get element value from specific index.
| nIndex | Specific element index that want to get |
Definition at line 99 of file MatrixOperation.cpp.
References ERROR_OUT_OF_RANGE, and CComplex::SetComplexNumber().
Referenced by CMatrixOperation::AddVectors(), CLanczosResultAudit::AuditResult_WF(), CHamiltonianBuilder::BuildOffsiteMatrixFor10Band(), CGeometricShape::BuildPEBiasVector(), CGeometricShape::BuildPEWaveVector(), CLanczosMethod::BuildWaveFunction(), CLanczosMethod::CalculateEigenVector(), CMatrixOperation::CCSR::DiagonalOperation(), CSPLoop::executeSPLoop(), InsertVector(), CMatrixOperation::MVMul(), operator*(), CMatrixOperation::CCSR::operator*(), operator+(), operator-(), CLanczosMethod::RecalcuWaveFunction(), IGeometricUnitCellInfo::RotateAxis(), IGeometricUnitCellInfo::RotateNeighbor(), CHamiltonianBuilder::RotateTransMatrixFor10Band(), CLanczosMethod::SaveLanczosResult(), CMatrixOperation::ScalarMulVectors(), CMatrixOperation::CDMatrix::SetColumnElement(), CMatrixOperation::CDMatrix::SetDiagonal(), CMatrixOperation::CDMatrix::SetRowElement(), CUtility::ShowDoubleVector(), and CMatrixOperation::SubstractVectors().


| CComplex * CMatrixOperation::CVector::GetAtPt | ( | unsigned int | nIndex | ) |
Get element value from specific index.
| nIndex | Specific element index that want to get |
Definition at line 83 of file MatrixOperation.cpp.
References ERROR_OUT_OF_RANGE.
Referenced by MinusVector(), and PlusVector().

| double CMatrixOperation::CVector::GetNorm | ( | bool | bMPI = false | ) |
Getting norm of vector.
| bMPI | Currently running under MPI or not |
Definition at line 231 of file MatrixOperation.cpp.
References CMPIManager::AllReduceDouble(), and LOOP_OPTIMIZE_COUNT.
Referenced by CLanczosResultAudit::AuditResult_EV(), CHamiltonianBuilder::BuildOffsiteMatrixFor10Band(), CLanczosMethod::DoResidualCheck(), CMatrixOperation::IsSame(), CLanczosMethod::LanczosIterationLoop(), CLanczosMethod::MergeDegeneratedEigenvalues(), and CSPLoop::SolvePoisson().


|
inline |
Return Vector elements size.
Definition at line 71 of file MatrixOperation.h.
References m_nValueCount.
Referenced by CMatrixOperation::AddVectors(), CLanczosMethod::AppendEigenVector(), CMatrixOperation::CCSR::DiagonalOperation(), InsertVector(), CLanczosMethod::MergeDegeneratedEigenvalues(), MinusVector(), CMatrixOperation::MVMul(), operator*(), CMatrixOperation::CCSR::operator*(), operator+(), operator-(), operator=(), PlusVector(), ReorthogonalizationVector(), CLanczosMethod::SaveLanczosResult(), ScalarMultiThanMinusVector(), CMatrixOperation::ScalarMulVectors(), CMatrixOperation::CDMatrix::SetColumnElement(), CMatrixOperation::CDMatrix::SetDiagonal(), CMatrixOperation::CDMatrix::SetRowElement(), CUtility::ShowDoubleVector(), CSPLoop::SolveSchroedinger(), CMatrixOperation::SubstractVectors(), and CMatrixOperation::VVDot().

| bool CMatrixOperation::CVector::InsertVector | ( | unsigned int | nStartIndex, |
| CMatrixOperation::CVector * | pVector | ||
| ) |
| nStartIndex | Start index that position of want to insert |
| pVector | Source vector |
Definition at line 377 of file MatrixOperation.cpp.
References GetAt(), CComplex::GetImaginaryNumber(), CComplex::GetRealNumber(), and GetSize().

| void CMatrixOperation::CVector::MinusVector | ( | CVector * | vector | ) |
Do minus operation between vectors.
| vector | vector that is used in minus operation |
Definition at line 321 of file MatrixOperation.cpp.
References ERROR_WRONG_ORDER_OPERATION, GetAtPt(), CComplex::GetImaginaryNumber(), CComplex::GetRealNumber(), and GetSize().
Referenced by CLanczosResultAudit::AuditResult_EV(), CLanczosMethod::DoResidualCheck(), CMatrixOperation::Gram_schmidt(), CMatrixOperation::IsSame(), and CLanczosMethod::MergeDegeneratedEigenvalues().


| void CMatrixOperation::CVector::Normalize | ( | bool | bMPI = false | ) |
Normalize vector with norm.
| bMPI | Operation with MPI environment or not |
Definition at line 215 of file MatrixOperation.cpp.
Referenced by CMatrixOperation::Gram_schmidt(), and CLanczosMethod::LanczosIteration().

operation overload for dot product with reference parameter
| vector | Vector operand |
Definition at line 442 of file MatrixOperation.cpp.
References ERROR_WRONG_ORDER_OPERATION, GetAt(), and GetSize().

operation overload for dot product with pointer parameter
| vector | Vector operand |
Definition at line 433 of file MatrixOperation.cpp.
References operator*().

| CMatrixOperation::CVector CMatrixOperation::CVector::operator+ | ( | CVector & | vector | ) |
operation overload for vector plus operation with reference parameter
| vector | Vector operand |
Definition at line 506 of file MatrixOperation.cpp.
References ERROR_WRONG_ORDER_OPERATION, GetAt(), GetSize(), SetAt(), and SetSize().

| CMatrixOperation::CVector CMatrixOperation::CVector::operator+ | ( | CVector * | vector | ) |
operation overload for vector plus operation with pointer parameter
| vector | Vector operand |
Definition at line 497 of file MatrixOperation.cpp.
| CMatrixOperation::CVector CMatrixOperation::CVector::operator- | ( | CVector & | vector | ) |
operation overload for vector minus operation with reference parameter
| vector | Vector operand |
Definition at line 473 of file MatrixOperation.cpp.
References ERROR_WRONG_ORDER_OPERATION, GetAt(), GetSize(), SetAt(), and SetSize().

| CMatrixOperation::CVector CMatrixOperation::CVector::operator- | ( | CVector * | vector | ) |
operation overload for vector minus operation with pointer parameter
| vector | Vector operand |
Definition at line 464 of file MatrixOperation.cpp.
| void CMatrixOperation::CVector::operator= | ( | CVector & | vector | ) |
operation overload for subsitution with reference parameter
| vector | Vector operand |
Definition at line 539 of file MatrixOperation.cpp.
References GetSize(), m_vectValueImaginaryBuffer, and m_vectValueRealBuffer.

| void CMatrixOperation::CVector::operator= | ( | CVector * | vector | ) |
operation overload for subsitution with pointer parameter
| vector | Vector operand |
Definition at line 530 of file MatrixOperation.cpp.
| void CMatrixOperation::CVector::PlusVector | ( | CVector * | vector | ) |
Do plus operation between vectors.
| vector | vector that is used in plus operation |
Definition at line 344 of file MatrixOperation.cpp.
References ERROR_WRONG_ORDER_OPERATION, GetAtPt(), CComplex::GetImaginaryNumber(), CComplex::GetRealNumber(), and GetSize().
Referenced by CSPLoop::executeSPLoop().


Do reorthogonalization.
| pVector | Target vector for orthogonalization |
| complex | Input scalar |
Definition at line 292 of file MatrixOperation.cpp.
References ERROR_WRONG_ORDER_OPERATION, CComplex::GetImaginaryNumber(), CComplex::GetRealNumber(), GetSize(), m_vectValueImaginaryBuffer, and m_vectValueRealBuffer.

| void CMatrixOperation::CVector::ResetValue | ( | ) |
Reset every element to zero.
Definition at line 113 of file MatrixOperation.cpp.
| void CMatrixOperation::CVector::ScalarDivision | ( | CComplex | Scalar | ) |
Scalar division operation.
| Scalar | Scalar value that want to use in operation |
Definition at line 163 of file MatrixOperation.cpp.
References CComplex::GetImaginaryNumber(), CComplex::GetRealNumber(), and CComplex::SetComplexNumber().
Referenced by CLanczosMethod::LanczosIterationLoop(), and operator/().


| void CMatrixOperation::CVector::ScalarDivision | ( | double | fScalar | ) |
Scalar division operation.
| fScalar | Scalar value that want to use in operation |
Definition at line 181 of file MatrixOperation.cpp.
| void CMatrixOperation::CVector::ScalarMultiple | ( | CComplex | Scalar | ) |
Scalar multiple operation.
| Scalar | Scalar value that want to use in operation |
Definition at line 128 of file MatrixOperation.cpp.
References CComplex::GetImaginaryNumber(), CComplex::GetRealNumber(), and CComplex::SetComplexNumber().
Referenced by CLanczosResultAudit::AuditResult_EV(), CLanczosMethod::DoResidualCheck(), CMatrixOperation::Gram_schmidt(), CLanczosMethod::MergeDegeneratedEigenvalues(), and operator*().


| void CMatrixOperation::CVector::ScalarMultiple | ( | double | fScalar | ) |
Scalar multiple operation.
| fScalar | Scalar value that want to use in operation |
Definition at line 148 of file MatrixOperation.cpp.
| void CMatrixOperation::CVector::ScalarMultiThanMinusVector | ( | double | fScalar, |
| CVector * | vector | ||
| ) |
Do minus operation after scalar multiple to operand between vectors.
| fScalar | Scalar factor |
| vector | Vector operand for minus operation |
Definition at line 263 of file MatrixOperation.cpp.
References ERROR_WRONG_ORDER_OPERATION, GetSize(), m_vectValueImaginaryBuffer, and m_vectValueRealBuffer.
Referenced by CLanczosMethod::LanczosIterationLoop().


| bool CMatrixOperation::CVector::Serialize | ( | double * | pBuffer, |
| bool | bStore | ||
| ) |
Serialize vector.
| pBuffer | Saving/Loading buffer |
| bStore | Saving(true) or Loading(false) |
Definition at line 400 of file MatrixOperation.cpp.
Referenced by CMPIManager::ReceiveVectorSync(), and CMPIManager::SendVectorSync().

| void CMatrixOperation::CVector::SetAt | ( | unsigned int | nIndex, |
| CComplex | value | ||
| ) |
Set element value in specific index, Call by value.
| nIndex | Specific element index that want to set |
| value | element value |
Definition at line 53 of file MatrixOperation.cpp.
References CComplex::GetImaginaryNumber(), and CComplex::GetRealNumber().
Referenced by CMatrixOperation::AddVectors(), CTBMS_Solver::ApplyPhPotential(), CHamiltonianBuilder::BuildHaaDiagonalFor10Band(), CHamiltonianBuilder::BuildHccDiagonalFor10Band(), CZincblendeParam::BuildMatrix(), CGeometricShape::BuildPEBiasVector(), CGeometricShape::BuildPEWaveVector(), CLanczosMethod::BuildWaveFunction(), CLanczosMethod::CalculateEigenVector(), CMatrixOperation::CCSR::DiagonalOperation(), CSPLoop::executeSPLoop(), CSPLoop::GetChargeProfile(), CMatrixOperation::CDMatrix::GetColumnByVector(), CMatrixOperation::CDMatrix::GetRowByVector(), CLanczosMethod::LanczosIteration(), CMatrixOperation::MVMul(), CMatrixOperation::CCSR::operator*(), operator+(), operator-(), CLanczosMethod::RecalcuWaveFunction(), IGeometricUnitCellInfo::RotateAxis(), IGeometricUnitCellInfo::RotateNeighbor(), CHamiltonianBuilder::RotateTransMatrixFor10Band(), CMatrixOperation::ScalarMulVectors(), and CMatrixOperation::SubstractVectors().


| void CMatrixOperation::CVector::SetAt | ( | unsigned int | nIndex, |
| double | fReal, | ||
| double | fImaginary | ||
| ) |
Set element value in specific index.
| nIndex | Specific element index that want to set |
| fReal | Real number of element value |
| fImaginary | Imaginary number of element value |
Definition at line 68 of file MatrixOperation.cpp.
References ERROR_OUT_OF_RANGE, and THROW_END_EXIT.
| void CMatrixOperation::CVector::SetAtEx | ( | unsigned int | nIndex, |
| CComplex * | pValue | ||
| ) |
Set element value in specific index, Call by reference.
Definition at line 58 of file MatrixOperation.cpp.
References CComplex::GetImaginaryNumber(), and CComplex::GetRealNumber().

| void CMatrixOperation::CVector::SetSize | ( | unsigned int | nSize | ) |
Set Vector elements size.
| nSize | Vector elements size |
Definition at line 39 of file MatrixOperation.cpp.
Referenced by CLanczosMethod::AppendEigenVector(), CTBMS_Solver::ApplyPhPotential(), CLanczosResultAudit::AuditResult_EV(), CHamiltonianBuilder::BuildHonsiteBasicMatrixFor10Band(), CZincblendeParam::BuildMatrix(), CGeometricShape::BuildPEBiasVector(), CGeometricShape::BuildPEWaveVector(), CLanczosMethod::BuildWaveFunction(), CMatrixOperation::CCSR::DiagonalOperation(), CLanczosMethod::DoResidualCheck(), CSPLoop::executeSPLoop(), CMatrixOperation::CDMatrix::GetColumnByVector(), CMatrixOperation::CDMatrix::GetRowByVector(), CLanczosMethod::LanczosIteration(), CLanczosMethod::LanczosIterationLoop(), CLanczosMethod::MergeDegeneratedEigenvalues(), CMPIManager::MergeVector(), CMatrixOperation::MVMul(), CMatrixOperation::MVMulOptimal(), CMatrixOperation::MVMulOptimal_Nooffload(), CMatrixOperation::CCSR::operator*(), operator+(), operator-(), IGeometricUnitCellInfo::RotateAxis(), IGeometricUnitCellInfo::RotateNeighbor(), CHamiltonianBuilder::RotateTransMatrixFor10Band(), and CLanczosMethod::SortSolution().

|
friend |
Definition at line 109 of file MatrixOperation.h.
|
friend |
Definition at line 110 of file MatrixOperation.h.
|
friend |
Definition at line 111 of file MatrixOperation.h.
|
friend |
Definition at line 112 of file MatrixOperation.h.
|
private |
A numbers of elements.
Definition at line 106 of file MatrixOperation.h.
|
private |
Temporary variable for return value.
Definition at line 107 of file MatrixOperation.h.
|
private |
A member variable for saving none zero elements.
Definition at line 105 of file MatrixOperation.h.
Referenced by CLanczosMethod::LanczosIterationLoop(), CMPIManager::MergeVector(), CMPIManager::MergeVectorEx_Optimal(), CMPIManager::MergeVectorOptimal(), CMatrixOperation::MVMul(), CMatrixOperation::MVMulEx_Optimal(), CMatrixOperation::MVMulOptimal(), CMatrixOperation::MVMulOptimal_Nooffload(), operator=(), ReorthogonalizationVector(), ScalarMultiThanMinusVector(), and CMatrixOperation::VVDot().
|
private |
A member variable for saving none zero elements.
Definition at line 104 of file MatrixOperation.h.
Referenced by CSPLoop::executeSPLoop(), CLanczosMethod::LanczosIterationLoop(), CMPIManager::MergeVector(), CMPIManager::MergeVectorEx_Optimal(), CMPIManager::MergeVectorOptimal(), CMatrixOperation::MVMul(), CMatrixOperation::MVMulEx_Optimal(), CMatrixOperation::MVMulOptimal(), CMatrixOperation::MVMulOptimal_Nooffload(), operator=(), ReorthogonalizationVector(), ScalarMultiThanMinusVector(), CSPLoop::SolveSchroedinger(), and CMatrixOperation::VVDot().