IPCC  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
KNZincblendeParam.cpp
Go to the documentation of this file.
1 
7 #include "KNZincblendeParam.h"
8 
9 
11 {
12 }
13 
14 
16 {
17 }
18 
23 {
24  BuildCoord();
30  CalculateLatticeCoonstants(parameter);
31 }
32 
34 {
35  double parameterBuffer[4][3] = { { 0.5, 0.5, 0 },
36  { 0.5, 0, 0.5 },
37  { 0, 0.5, 0.5 },
38  { 0, 0, 0 } };
39  m_nBasisVectors = 4;
40  BuildMatrix(3, 3, &m_matrixBasis_Vector, parameterBuffer);
41 }
42 
44 {
45  double parameterBuffer[4][3] = { { -1, -1, -1 },
46  { -1, 1, 1 },
47  { 1, -1, 1 },
48  { 1, 1, -1 } };
49 
50  m_nAtomBonds = 4;
51  BuildMatrix(4, 3, &m_matrixType2_Bond_Vector, parameterBuffer);
52 }
53 
55 {
56  double parameterBuffer[4][3] = { { 1, 1, 1 },
57  { 1, -1, -1 },
58  { -1, 1, -1 },
59  { -1, -1, 1 } };
60 
61  BuildMatrix(4, 3, &m_matrixType1_Bond_Vector, parameterBuffer);
62 }
63 
65 {
70 }
71 
73 {
74  double parameterBuffer[4][3] = { { 1, 0, 0 },
75  { 0, 1, 0 },
76  { 0, 0, 1 },
77  { 0, 0, 0 } };
78 
79  BuildMatrix(3, 3, &m_matrixCrystal_Original_Axis, parameterBuffer);
80 }
81 
86 {
87  CKNComplex ax, ay, az;
88  CKNComplex ax_square, ay_square, az_square;
89  double sqrt_real;
90 
91 
95 
96  ax_square = ax * ax;
97  ay_square = ay * ay;
98  az_square = az * az;
99 
100  sqrt_real = sqrt(ax_square.GetRealNumber() + ay_square.GetRealNumber() + az_square.GetRealNumber());
101  parameter.fL = ax_square.GetRealNumber() / sqrt_real;
102  parameter.fM = ay_square.GetRealNumber() / sqrt_real;
103  parameter.fN = az_square.GetRealNumber() / sqrt_real;
104 }
105 
107 {
108  double parameterBuffer[4][3] = { { 0, 0, 0 },
109  { 0.25, 0.25, 0.25},
110  { 0, 0, 0 },
111  { 0, 0, 0 }};
112  BuildMatrix(2, 3, &m_matrixCoord, parameterBuffer);
113 }
114 
115 
116 void CKNZincblendeParam::BuildMatrix(int nRowCount, int nColumnCount, CKNMatrixOperation::CKNDMatrix *pMatrix, double parameterBuffer[4][3])
117 {
118  int i, j;
120 
121  pMatrix->BuildMatrixFirst(nRowCount, nColumnCount);
122  vectorTemp.SetSize(nColumnCount);
123  for (i = 0; i < nRowCount; i++)
124  {
125  for (j = 0; j < nColumnCount; j++)
126  {
127  vectorTemp.SetAt(j, parameterBuffer[i][j], 0);
128  }
129  pMatrix->SetRowElement(vectorTemp, i);
130  }
131 }
void SetSize(unsigned int nSize)
Set Vector elements size.
Class for calculating zincblend parameter.
Data and operation representation of Matrix.
int m_nAtomBonds
Atom count.
double GetRealNumber() const
Get real part.
Definition: KNComplex.h:26
unsigned int GetRowCount()
Get matrix row counts.
CKNMatrixOperation::CKNDMatrix m_matrixCrystal_Original_Axis
void ScalarMultiple(CKNComplex Scalar)
Scalar multiple operation.
CKNMatrixOperation::CKNDMatrix m_matrixCoord
Matrix for coordination.
CKNMatrixOperation::CKNDMatrix m_matrixBasis_Vector
void BuildZincblendParam(GEO_PARAMETER &parameter)
Calculating zincblend parameter.
CKNMatrixOperation::CKNDMatrix m_matrixType1_Bond_Vector
bool SetElement(unsigned int nRow, unsigned int nColumn, CKNComplex element)
Set matrix elements value.
unsigned int GetColumnCount()
Get matrix column counts.
CKNMatrixOperation::CKNDMatrix m_matrixType2_Bond_Vector
void CalculateLatticeCoonstants(GEO_PARAMETER &parameter)
CKNMatrixOperation::CKNDMatrix m_matrixBond_Vector
bool SetRowElement(CKNVector vector, unsigned int nRowIndex)
Set matrix element with row, column index.
CKNComplex GetElement(unsigned int nRowIndex, unsigned int nColumnIndex)
Get matrix element with row, column index.
void BuildMatrix(int nRowCount, int nColumnCount, CKNMatrixOperation::CKNDMatrix *pMatrix, double parameterBuffer[4][3])
void SetAt(unsigned int nIndex, CKNComplex value)
Set element value in specific index, Call by value.
This class for complex operation and saving value.
Definition: KNComplex.h:18
Structure for saving geometric parameter.
bool BuildMatrixFirst(unsigned int nRow, unsigned int nColumn)
Building matrix elements.
This class for describing vector for Lanczos method.