IPCC  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IGeometricUnitCellInfo Class Referenceabstract

Iterface for Unitcell information. More...

#include "IGeometricUnitCellInfo.h"

Inheritance diagram for IGeometricUnitCellInfo:
Inheritance graph
Collaboration diagram for IGeometricUnitCellInfo:
Collaboration graph

Public Member Functions

void InitCoordination ()
 Initial Coordination information. More...
 
virtual void SetAtomCoordination ()=0
 Atom coordination setting. More...
 
virtual void SetNeighborCoordination ()=0
 Neighbor atom coordiantion setting. More...
 
virtual void SetUnitCellSize (double fUnitcellSize[3])=0
 Unitcell size setting. More...
 
int GetA2CNeighborCount ()
 Get neigbhor relation count. More...
 
int GetC2ANeighborCount ()
 Get neigbhor relation count. More...
 
 IGeometricUnitCellInfo ()
 
 ~IGeometricUnitCellInfo ()
 
unsigned int GetAnionCount ()
 
unsigned int GetCationCount ()
 Get anion count in Unitcell. More...
 
double * GetUnitcCellSize ()
 Get cation count in Unitcell. More...
 
CGeometricCoordination GetAtomCoordination (CGeometricAtom::ATOM_TYPE atomType, unsigned int nIndex)
 Get Unitcell size x, y, z direction axis. More...
 
CGeometricCoordination GetNeighborCoordination (CGeometricAtom::NEIGHOR_RELATION neighborType, unsigned int nIndex)
 Get neigbhor atom coordination from Unitcell. More...
 
void RotateNeighbor (CMatrixOperation::CDMatrix *pRotationMatrix)
 Rotating neighbor coordination. More...
 
void RotateAxis (CMatrixOperation::CDMatrix *pRotationMatrix)
 Rotating axis. More...
 

Protected Member Functions

void SetAtomCoordination (CGeometricAtom::ATOM_TYPE type, double x, double y, double z)
 Set single atom coordination. More...
 
void SetNeighborCoordination (CGeometricAtom::NEIGHOR_RELATION type, double x, double y, double z)
 Set single neighbor coordination. More...
 

Protected Attributes

double m_UnitCellSize [3]
 Unitcell size x, y, z direction axis. More...
 
double m_NeigbhorOriginSize [3]
 For neighbor distance calculation. More...
 
std::vector< CGeometricAtomm_vectAtomList_1
 Atom list in Unitcell for anion. More...
 
std::vector< CGeometricAtomm_vectAtomList_2
 Atom list in Unitcell for cation. More...
 
std::vector
< CGeometricCoordination
m_vectNeighborRelation1To2
 Neighbor relation list in Unitcell for anion to cation. More...
 
std::vector
< CGeometricCoordination
m_vectNeighborRelation2To1
 Neighbor relation list in Unitcell for cation to anion. More...
 

Detailed Description

Iterface for Unitcell information.

Date
03/Oct/2014

Definition at line 17 of file IGeometricUnitCellInfo.h.

Constructor & Destructor Documentation

IGeometricUnitCellInfo::~IGeometricUnitCellInfo ( )

Definition at line 18 of file IGeometricUnitCellInfo.cpp.

19 {
20 }

Member Function Documentation

int IGeometricUnitCellInfo::GetA2CNeighborCount ( )
inline

Get neigbhor relation count.

Definition at line 24 of file IGeometricUnitCellInfo.h.

References m_vectNeighborRelation1To2.

Referenced by CGeometricShape::SetAtomAndNeighborInformation().

Here is the caller graph for this function:

unsigned int IGeometricUnitCellInfo::GetAnionCount ( )
inline

Definition at line 42 of file IGeometricUnitCellInfo.h.

References m_vectAtomList_1.

Referenced by CGeometricShape::SetAtomAndNeighborInformation().

42 { return m_vectAtomList_1.size(); };
std::vector< CGeometricAtom > m_vectAtomList_1
Atom list in Unitcell for anion.

Here is the caller graph for this function:

CGeometricCoordination IGeometricUnitCellInfo::GetAtomCoordination ( CGeometricAtom::ATOM_TYPE  atomType,
unsigned int  nIndex 
)

Get Unitcell size x, y, z direction axis.

Get atom coordination from Unitcell

Parameters
atomTypeAtom type, anion or cation
nIndexAtom Index
Returns
Atom coordination

Definition at line 27 of file IGeometricUnitCellInfo.cpp.

References CGeometricAtom::A, CGeometricAtom::C, m_vectAtomList_1, and m_vectAtomList_2.

Referenced by CGeometricShape::SetAtomAndNeighborInformation().

28 {
30 
31  switch (atomType)
32  {
33  case CGeometricAtom::A:
34  if (nIndex < 0 || nIndex >= m_vectAtomList_1.size())
35  return dumy;
36  return m_vectAtomList_1[nIndex].GetCoordination();
37  break;
38  case CGeometricAtom::C:
39  if (nIndex < 0 || nIndex >= m_vectAtomList_2.size())
40  return dumy;
41  return m_vectAtomList_2[nIndex].GetCoordination();
42  break;
43  }
44 
45  return dumy;
46 }
Class for coordination.
std::vector< CGeometricAtom > m_vectAtomList_2
Atom list in Unitcell for cation.
std::vector< CGeometricAtom > m_vectAtomList_1
Atom list in Unitcell for anion.

Here is the caller graph for this function:

int IGeometricUnitCellInfo::GetC2ANeighborCount ( )
inline

Get neigbhor relation count.

Definition at line 25 of file IGeometricUnitCellInfo.h.

References m_vectNeighborRelation2To1.

Referenced by CGeometricShape::SetAtomAndNeighborInformation().

Here is the caller graph for this function:

unsigned int IGeometricUnitCellInfo::GetCationCount ( )
inline

Get anion count in Unitcell.

Definition at line 43 of file IGeometricUnitCellInfo.h.

References m_vectAtomList_2.

Referenced by CGeometricShape::SetAtomAndNeighborInformation().

43 { return m_vectAtomList_2.size(); };
std::vector< CGeometricAtom > m_vectAtomList_2
Atom list in Unitcell for cation.

Here is the caller graph for this function:

CGeometricCoordination IGeometricUnitCellInfo::GetNeighborCoordination ( CGeometricAtom::NEIGHOR_RELATION  neighborType,
unsigned int  nIndex 
)

Get neigbhor atom coordination from Unitcell.

Parameters
neighborTypeNeighbor Atom type, anion or cation
nIndexAtom Index
Returns
Atom coordination

Definition at line 53 of file IGeometricUnitCellInfo.cpp.

References CGeometricAtom::A2C, CGeometricAtom::C2A, m_vectNeighborRelation1To2, and m_vectNeighborRelation2To1.

Referenced by CGeometricShape::SetAtomAndNeighborInformation().

54 {
56 
57  switch (neighborType)
58  {
60  if (nIndex < 0 || nIndex >= m_vectNeighborRelation1To2.size())
61  return dumy;
62  return m_vectNeighborRelation1To2[nIndex];
63  break;
65  if (nIndex < 0 || nIndex >= m_vectNeighborRelation2To1.size())
66  return dumy;
67  return m_vectNeighborRelation2To1[nIndex];
68  break;
69  }
70 
71  return dumy;
72 }
std::vector< CGeometricCoordination > m_vectNeighborRelation2To1
Neighbor relation list in Unitcell for cation to anion.
std::vector< CGeometricCoordination > m_vectNeighborRelation1To2
Neighbor relation list in Unitcell for anion to cation.
Class for coordination.

Here is the caller graph for this function:

double* IGeometricUnitCellInfo::GetUnitcCellSize ( )
inline

Get cation count in Unitcell.

Definition at line 44 of file IGeometricUnitCellInfo.h.

References m_UnitCellSize.

Referenced by CGeometricShape::MapElecAtomOnPoissonGrid(), and CGeometricShape::SetAtomAndNeighborInformation().

44 { return m_UnitCellSize; };
double m_UnitCellSize[3]
Unitcell size x, y, z direction axis.

Here is the caller graph for this function:

void IGeometricUnitCellInfo::InitCoordination ( )

Initial Coordination information.

Definition at line 178 of file IGeometricUnitCellInfo.cpp.

References m_vectAtomList_1, m_vectAtomList_2, m_vectNeighborRelation1To2, and m_vectNeighborRelation2To1.

Referenced by CGeometricShape::SetAtomAndNeighborInformation().

179 {
180  m_vectAtomList_1.clear();
181  m_vectAtomList_2.clear();
184 }
std::vector< CGeometricCoordination > m_vectNeighborRelation2To1
Neighbor relation list in Unitcell for cation to anion.
std::vector< CGeometricCoordination > m_vectNeighborRelation1To2
Neighbor relation list in Unitcell for anion to cation.
std::vector< CGeometricAtom > m_vectAtomList_2
Atom list in Unitcell for cation.
std::vector< CGeometricAtom > m_vectAtomList_1
Atom list in Unitcell for anion.

Here is the caller graph for this function:

void IGeometricUnitCellInfo::RotateAxis ( CMatrixOperation::CDMatrix pRotationMatrix)

Rotating axis.

Parameters
pRotationMatrixRotation matrix

Definition at line 124 of file IGeometricUnitCellInfo.cpp.

References CMatrixOperation::CVector::GetAt(), CComplex::GetRealNumber(), m_UnitCellSize, CMatrixOperation::MVMul(), CMatrixOperation::CVector::SetAt(), and CMatrixOperation::CVector::SetSize().

125 {
126  CMatrixOperation::CVector Vector, Result;
127  int i;
128  double *fCoordination = NULL;
129 
130  Vector.SetSize(3);
131  Result.SetSize(3);
132 
133  for (i = 0; i < 3; ++i)
134  Vector.SetAt(i, m_UnitCellSize[i], 0);
135 
136  CMatrixOperation::MVMul(pRotationMatrix, &Vector, &Result);
137 
138  for (i = 0; i < 3; ++i)
139  m_UnitCellSize[i] = Result.GetAt(i).GetRealNumber();
140 }
double m_UnitCellSize[3]
Unitcell size x, y, z direction axis.
static void MVMul(CCSR *pAMatrix, CVector *pVector, CVector *pResult, int nLBIndex)
Matrix and vector multiple operation.
CComplex GetAt(unsigned int nIndex)
Get element value from specific index.
This class for describing vector for Lanczos method.
void SetAt(unsigned int nIndex, CComplex value)
Set element value in specific index, Call by value.
void SetSize(unsigned int nSize)
Set Vector elements size.
double GetRealNumber() const
Get real part.
Definition: Complex.h:24

Here is the call graph for this function:

void IGeometricUnitCellInfo::RotateNeighbor ( CMatrixOperation::CDMatrix pRotationMatrix)

Rotating neighbor coordination.

Parameters
pRotationMatrixRotation matrix

Definition at line 145 of file IGeometricUnitCellInfo.cpp.

References CMatrixOperation::CVector::GetAt(), CComplex::GetRealNumber(), m_vectNeighborRelation1To2, m_vectNeighborRelation2To1, CMatrixOperation::MVMul(), CMatrixOperation::CVector::SetAt(), and CMatrixOperation::CVector::SetSize().

Referenced by CGeometricShape::SetAtomAndNeighborInformation().

146 {
147  CMatrixOperation::CVector Vector, Result;
148  unsigned int i, j;
149  double *fCoordination = NULL;
150 
151  Vector.SetSize(3);
152  Result.SetSize(3);
153 
154  for (i = 0; i < m_vectNeighborRelation1To2.size() ; ++i)
155  {
156  fCoordination = m_vectNeighborRelation1To2[i].GetCoordinationAll();
157 
158  for (j = 0; j < 3; ++j)
159  Vector.SetAt(j, fCoordination[j], 0);
160 
161  CMatrixOperation::MVMul(pRotationMatrix, &Vector, &Result);
162  m_vectNeighborRelation1To2[i].SetCoordination(Result.GetAt(0).GetRealNumber(), Result.GetAt(1).GetRealNumber(), Result.GetAt(2).GetRealNumber());
163  }
164 
165  for (i = 0; i < m_vectNeighborRelation2To1.size(); ++i)
166  {
167  fCoordination = m_vectNeighborRelation2To1[i].GetCoordinationAll();
168 
169  for (j = 0; j < 3; ++j)
170  Vector.SetAt(j, fCoordination[j], 0);
171 
172  CMatrixOperation::MVMul(pRotationMatrix, &Vector, &Result);
173  m_vectNeighborRelation2To1[i].SetCoordination(Result.GetAt(0).GetRealNumber(), Result.GetAt(1).GetRealNumber(), Result.GetAt(2).GetRealNumber());
174  }
175 
176 }
static void MVMul(CCSR *pAMatrix, CVector *pVector, CVector *pResult, int nLBIndex)
Matrix and vector multiple operation.
std::vector< CGeometricCoordination > m_vectNeighborRelation2To1
Neighbor relation list in Unitcell for cation to anion.
std::vector< CGeometricCoordination > m_vectNeighborRelation1To2
Neighbor relation list in Unitcell for anion to cation.
CComplex GetAt(unsigned int nIndex)
Get element value from specific index.
This class for describing vector for Lanczos method.
void SetAt(unsigned int nIndex, CComplex value)
Set element value in specific index, Call by value.
void SetSize(unsigned int nSize)
Set Vector elements size.
double GetRealNumber() const
Get real part.
Definition: Complex.h:24

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void IGeometricUnitCellInfo::SetAtomCoordination ( )
pure virtual
void IGeometricUnitCellInfo::SetAtomCoordination ( CGeometricAtom::ATOM_TYPE  type,
double  x,
double  y,
double  z 
)
protected

Set single atom coordination.

Parameters
typeAtom type
xx coordination
yy coordination
zz coordination

Definition at line 80 of file IGeometricUnitCellInfo.cpp.

References CGeometricAtom::A, ATOM_NUM_BASE, CGeometricAtom::C, m_vectAtomList_1, m_vectAtomList_2, CGeometricAtom::SetCoordination(), and CGeometricAtom::SetType().

81 {
82  CGeometricAtom atom;
83 
84  atom.SetType(type, ATOM_NUM_BASE);
85  atom.SetCoordination(x, y, z);
86 
87  switch (type)
88  {
89  case CGeometricAtom::A:
90  m_vectAtomList_1.push_back(atom);
91  break;
92  case CGeometricAtom::C:
93  m_vectAtomList_2.push_back(atom);
94  break;
95  }
96 }
Class for Atom.
Definition: GeometricAtom.h:15
void SetType(ATOM_TYPE type, MATERIAL_INDEX number)
Set atom information.
void SetCoordination(CGeometricCoordination coordination)
Get atom coordination.
std::vector< CGeometricAtom > m_vectAtomList_2
Atom list in Unitcell for cation.
std::vector< CGeometricAtom > m_vectAtomList_1
Atom list in Unitcell for anion.

Here is the call graph for this function:

virtual void IGeometricUnitCellInfo::SetNeighborCoordination ( )
pure virtual
void IGeometricUnitCellInfo::SetNeighborCoordination ( CGeometricAtom::NEIGHOR_RELATION  type,
double  x,
double  y,
double  z 
)
protected

Set single neighbor coordination.

Parameters
typeNeighbor relationship type
xx axis distance
yy axis distance
zz axis distance

Definition at line 104 of file IGeometricUnitCellInfo.cpp.

References CGeometricAtom::A2C, CGeometricAtom::C2A, m_vectNeighborRelation1To2, m_vectNeighborRelation2To1, and CGeometricCoordination::SetCoordination().

105 {
106  CGeometricCoordination relationCoordnation;
107 
108  relationCoordnation.SetCoordination(x, y, z);
109 
110  switch (type)
111  {
112  case CGeometricAtom::A2C:
113  m_vectNeighborRelation1To2.push_back(relationCoordnation);
114  break;
115  case CGeometricAtom::C2A:
116  m_vectNeighborRelation2To1.push_back(relationCoordnation);
117  break;
118  }
119 }
std::vector< CGeometricCoordination > m_vectNeighborRelation2To1
Neighbor relation list in Unitcell for cation to anion.
std::vector< CGeometricCoordination > m_vectNeighborRelation1To2
Neighbor relation list in Unitcell for anion to cation.
Class for coordination.
void SetCoordination(CGeometricCoordination coordination)
Get coordination with double buffer.

Here is the call graph for this function:

virtual void IGeometricUnitCellInfo::SetUnitCellSize ( double  fUnitcellSize[3])
pure virtual

Unitcell size setting.

Implemented in CGeometricUnitCellInfo_cubic, and CGeometricUnitCellInfo_zincblende.

Referenced by CGeometricShape::SetAtomAndNeighborInformation().

Here is the caller graph for this function:

Member Data Documentation

double IGeometricUnitCellInfo::m_NeigbhorOriginSize[3]
protected
std::vector<CGeometricAtom> IGeometricUnitCellInfo::m_vectAtomList_1
protected

Atom list in Unitcell for anion.

Definition at line 33 of file IGeometricUnitCellInfo.h.

Referenced by GetAnionCount(), GetAtomCoordination(), InitCoordination(), and SetAtomCoordination().

std::vector<CGeometricAtom> IGeometricUnitCellInfo::m_vectAtomList_2
protected

Atom list in Unitcell for cation.

Definition at line 34 of file IGeometricUnitCellInfo.h.

Referenced by GetAtomCoordination(), GetCationCount(), InitCoordination(), and SetAtomCoordination().

std::vector<CGeometricCoordination> IGeometricUnitCellInfo::m_vectNeighborRelation1To2
protected

Neighbor relation list in Unitcell for anion to cation.

Definition at line 35 of file IGeometricUnitCellInfo.h.

Referenced by GetA2CNeighborCount(), GetNeighborCoordination(), InitCoordination(), RotateNeighbor(), and SetNeighborCoordination().

std::vector<CGeometricCoordination> IGeometricUnitCellInfo::m_vectNeighborRelation2To1
protected

Neighbor relation list in Unitcell for cation to anion.

Definition at line 36 of file IGeometricUnitCellInfo.h.

Referenced by GetC2ANeighborCount(), GetNeighborCoordination(), InitCoordination(), RotateNeighbor(), and SetNeighborCoordination().


The documentation for this class was generated from the following files: