IPCC  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CGeometricUnitCell Class Reference

Class for Geometric unit cell. More...

#include "GeometricUnitCell.h"

Collaboration diagram for CGeometricUnitCell:
Collaboration graph

Public Member Functions

 CGeometricUnitCell ()
 
 ~CGeometricUnitCell ()
 
CGeometricCoordination GetCoordination ()
 
void SetCoordination (CGeometricCoordination coordination)
 Get coordination of unit cell. More...
 
void SetCoordination (double *pfCoordination)
 Set coordination of unit cell. More...
 
void SetCoordination (double fXCoordination, double fYCoordination, double fZCoordination)
 Set coordination of unit cell. More...
 
void SetID (double fID)
 
double GetID ()
 Set unit cell ID. More...
 
void ShiftID (double fShift)
 Get unit cell ID. More...
 
void ArrangeAtom (CCommandFileParser::LPINPUT_CMD_PARAM lpParam)
 Set atoms information(coordination, type) in unit cell. More...
 
unsigned int NumberingSubElement (CGeometricCoordination ShapeCoordination, double fLength[3], int nShapeType, char *pszDomainMatName)
 Assign atom ID to sub element(atoms in unit cell) More...
 
void SetSubDomainMaterial (CCommandFileParser::LPINPUT_CMD_PARAM lpParam)
 Set atoms information(coordination, type) in unit cell. More...
 
double * GetAssignedIndex ()
 
void SetAssignIndex (double fXAssignIndex, double fYAssignIndex, double fZAssignIndex)
 Get Assign index. More...
 
void CheckingNeighborCandiate (double fAssignedCount[3], bool bFrontFace, bool bBackEnd)
 Find neigbhor candidate for neighbor in atom. Maxium 26 unitcell index can be assigned. More...
 
int GetSubElementSize ()
 
CGeometricAtomGetSubElementAt (double fIndex)
 Get atom count in unit cell. More...
 
CGeometricAtomGetSubElementByID (double fID)
 Return atom in unitcell by atom ID. More...
 
std::vector< double > * GetNeighborCellID ()
 
void ShiftAtomID (double fShift)
 Get neighbor unit cell ID. More...
 
void SetUnitcellList (std::vector< CGeometricUnitCell > *pVect, std::vector< CGeometricUnitCell > *pVectPrev, std::vector< CGeometricUnitCell > *pVectNext)
 Set unit cell list of shape to each unit cell. More...
 
void BuildNeighborInformation (double *pfAssignCount, std::vector< CGeometricAtom * > *pSurfaceList)
 Build neighbor information to each atom. More...
 
void Serialize (double *pBuffer)
 Convert unit cell data to double buffer. More...
 
void Deserialize (double *pBuffer)
 Convert double buffer to unit cell data. More...
 
void SetPeriodic (bool bPeriodic, int periodicDirection)
 To mark unit cell is periodic condition. More...
 
bool IsPeriodicUnitCell ()
 Check this unit cell is periodic condition or not. More...
 
void CopyInnerAtomIndex (CGeometricUnitCell srcUnitCell)
 Copy atom id from source. This functino for periodic atom setting. More...
 

Static Public Member Functions

static void SetLength (double fLength[3], double fOriginLength[3])
 Set unit cell length. More...
 
static double GetLength (AXIS_DEFINE index)
 
static void ResetSubElementID ()
 Get unit cell length. More...
 
static double GetSubElementID ()
 Reset SubElement ID to Zero. More...
 
static double CalculatingIndex (double fXAssignedIndex, double fYAssignedIndex, double fZAssignedIndex, double fAssignedCount[3])
 Calulating unit cell index. More...
 
static void SetFullFillIndex (int nIndex)
 Changing Full fill neighbor index. More...
 

Static Public Attributes

static int m_nFullFillIndex = 15
 Get SubElement ID. It means new atom id. More...
 

Private Member Functions

int IsMachedNeighborRule (CGeometricAtom *pCompare1, CGeometricAtom *pCompare2, std::vector< CGeometricCoordination > *pNeighborRelation, int &nCheckFill)
 Checking neighbor with rule. More...
 
void FinalSubElement ()
 Finalizing SubElement. More...
 
bool FindingNeighborInUnitcell (CGeometricUnitCell *pUnitcell, CGeometricAtom *pCompare1, CGeometricAtom::ATOM_TYPE type1, std::vector< CGeometricCoordination > *pNeighborRelation, int &nCheckFill)
 Finding neighbor in same unit cell. More...
 
void SetPeriodicDirection (int periodicDirection)
 Set periodic direction. More...
 
void AddPeridoicDirection (CGeometricAtom::PERIODIC_DIRECTION periodicDirection)
 Adding periodic direction. More...
 

Private Attributes

double m_fAssignedIndex [3]
 Assign index. More...
 
std::vector< CGeometricUnitCell > * m_vectUnitCellInShape
 Unit cell list in shape. More...
 
std::vector< CGeometricUnitCell > * m_vectUnitCellInPrev
 Front side unit cell list in shape. More...
 
std::vector< CGeometricUnitCell > * m_vectUnitCellInNext
 Back side unit cell list in shape. More...
 
CGeometricCoordination m_coordination
 Coordination of unit cell. More...
 
std::vector< CGeometricAtomm_vectInternalAtom
 Atom in unit cell. More...
 
std::vector< double > m_vectNeighborCellID
 Neighbor unit cell list. More...
 
double m_fUnitCellID
 Unit cell ID. More...
 
bool m_bPeriodicElement
 Periodic element flag. More...
 
int m_periodicDirection
 Periodic direction information. More...
 

Static Private Attributes

static double m_fLength [3]
 Unit cell length. More...
 
static double m_SubElementID = ATOM_DEFAULT_INDEX + 1
 Maxium atom ID in shape. More...
 

Detailed Description

Class for Geometric unit cell.

Date
03/Oct/2014

Definition at line 18 of file GeometricUnitCell.h.

Constructor & Destructor Documentation

CGeometricUnitCell::CGeometricUnitCell ( )

Definition at line 18 of file GeometricUnitCell.cpp.

References _X, _Y, _Z, m_bPeriodicElement, m_fAssignedIndex, and m_fUnitCellID.

19 {
20  m_fUnitCellID = -1;
21  m_bPeriodicElement = false;
22 
23  m_fAssignedIndex[_X] = 0;
24  m_fAssignedIndex[_Y] = 0;
25  m_fAssignedIndex[_Z] = 0;
26 }
Definition: Global.h:113
bool m_bPeriodicElement
Periodic element flag.
Definition: Global.h:113
Definition: Global.h:113
double m_fUnitCellID
Unit cell ID.
double m_fAssignedIndex[3]
Assign index.
CGeometricUnitCell::~CGeometricUnitCell ( )

Definition at line 28 of file GeometricUnitCell.cpp.

References FinalSubElement().

29 {
31 }
void FinalSubElement()
Finalizing SubElement.

Here is the call graph for this function:

Member Function Documentation

void CGeometricUnitCell::AddPeridoicDirection ( CGeometricAtom::PERIODIC_DIRECTION  periodicDirection)
private

Adding periodic direction.

Parameters
periodicDirectionPeriodic direction

Definition at line 629 of file GeometricUnitCell.cpp.

References CGeometricAtomFactory::GetAtomCountInUnitcell(), and m_vectInternalAtom.

630 {
632 
633  for (i = 0; i < nSize; ++i)
634  m_vectInternalAtom[i].AddPeridoicDirection(periodicDirection);
635 }
void AddPeridoicDirection(CGeometricAtom::PERIODIC_DIRECTION periodicDirection)
Adding periodic direction.
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
static int GetAtomCountInUnitcell()

Here is the call graph for this function:

void CGeometricUnitCell::ArrangeAtom ( CCommandFileParser::LPINPUT_CMD_PARAM  lpParam)

Set atoms information(coordination, type) in unit cell.

Parameters
lpParamInput parameter parsing from command file

Definition at line 69 of file GeometricUnitCell.cpp.

References CGeometricAtom::A, CGeometricAtom::C, CGeometricAtomFactory::GetMaterialNumber(), m_coordination, CGeometricAtomFactory::m_vectAtomList_1, CGeometricAtomFactory::m_vectAtomList_2, m_vectInternalAtom, CGeometricAtom::SetCoordination(), CGeometricAtom::SetDomainMaterial(), CGeometricAtom::SetDomainNumber(), CGeometricCoordination::SetOffset(), CGeometricAtom::SetType(), and CCommandFileParser::INPUT_CMD_PARAM::szDomainMat.

Referenced by CGeometricShape::ArrangeUnitCell().

70 {
71  int i, nSize;
72 
74  for (i = 0; i < nSize; ++i)
75  {
76  CGeometricCoordination AtomCoordnation = CGeometricAtomFactory::m_vectAtomList_1[i].GetCoordination();
77  CGeometricAtom SubElement;
78 
79  AtomCoordnation.SetOffset(m_coordination);
82  SubElement.SetCoordination(AtomCoordnation);
83  SubElement.SetDomainNumber(1);
84  m_vectInternalAtom.push_back(SubElement);
85  }
86 
88  for (i = 0; i < nSize; ++i)
89  {
90  CGeometricCoordination AtomCoordnation = CGeometricAtomFactory::m_vectAtomList_2[i].GetCoordination();
91  CGeometricAtom SubElement;
92 
93  AtomCoordnation.SetOffset(m_coordination);
94  SubElement.SetCoordination(AtomCoordnation);
97  SubElement.SetDomainNumber(1);
98  m_vectInternalAtom.push_back(SubElement);
99  }
100 }
CGeometricCoordination m_coordination
Coordination of unit cell.
static MATERIAL_INDEX GetMaterialNumber(char *pszMaterialName, CGeometricAtom::ATOM_TYPE type)
Get total atom counts in unit cell.
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
Class for coordination.
void SetOffset(CGeometricCoordination coord)
To offset coordination.
void SetDomainMaterial(MATERIAL_INDEX number)
Set atom material information.
Definition: GeometricAtom.h:31
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.
void SetDomainNumber(int nDomainNumber)
Definition: GeometricAtom.h:32
char szDomainMat[NMAXDOMAIN][1024]
Material type.
static std::vector< CGeometricAtom > m_vectAtomList_1
Get total Neighbor count in unit cell.
static std::vector< CGeometricAtom > m_vectAtomList_2
Atom array for cation.

Here is the call graph for this function:

Here is the caller graph for this function:

void CGeometricUnitCell::BuildNeighborInformation ( double *  pfAssignCount,
std::vector< CGeometricAtom * > *  pSurfaceList 
)

Build neighbor information to each atom.

Parameters
pfAssignCountAssign count of shape
pSurfaceListSurface atom list

Finding internally first

Finding neighbor unitcell internal

Definition at line 350 of file GeometricUnitCell.cpp.

References _X, _Y, _Z, CGeometricAtom::A, ATOM_DEFAULT_INDEX, FindingNeighborInUnitcell(), GetID(), CGeometricAtom::GetNeighborAtomID(), CGeometricAtom::GetNeighborCount(), CGeometricAtom::GetType(), IsMachedNeighborRule(), m_nFullFillIndex, m_vectInternalAtom, m_vectNeighborCellID, CGeometricAtomFactory::m_vectNeighborRelation1To2, CGeometricAtomFactory::m_vectNeighborRelation2To1, m_vectUnitCellInNext, m_vectUnitCellInPrev, m_vectUnitCellInShape, and CGeometricAtom::SetNeighbor().

351 {
352  double i, j, nSecondIndex, nSize;
353  int nCheckFill = 0;
354  int nMatchingIndex;
355  CGeometricAtom *pCompare1, *pCompare2, *pAtom;
356  CGeometricAtom::ATOM_TYPE type1, type2;
357  std::vector<CGeometricCoordination> *pNeighborRelation = NULL;
358  bool bFindAll = false;
359 
360  nSize = m_vectInternalAtom.size();
361  for (i = 0; i < nSize; ++i)
362  {
363  if (ATOM_DEFAULT_INDEX == m_vectInternalAtom[(unsigned int)i].GetID())
364  continue;
365 
366  pCompare1 = &m_vectInternalAtom[(unsigned int)i];
367  type1 = pCompare1->GetType();
368 
369  if (CGeometricAtom::A == type1)
371  else
373 
374  bFindAll = false;
375  nCheckFill = 0;
377  nSecondIndex = -1;
378  for (j = 0; j < nSize - 1; ++j)
379  {
380  nSecondIndex++;
381 
382  if (nSecondIndex == i)
383  nSecondIndex++;
384 
385  pCompare2 = &m_vectInternalAtom[(unsigned int)nSecondIndex];
386 
387  type2 = pCompare2->GetType();
388  if (type1 == type2)
389  continue;
390 
391  nMatchingIndex = IsMachedNeighborRule(pCompare1, pCompare2, pNeighborRelation, nCheckFill);
392 
393  if (-1 != nMatchingIndex)
394  {
395  pCompare1->SetNeighbor(nMatchingIndex, pCompare2);
396  nCheckFill |= (int)(pow((double)2, (int)nMatchingIndex));
397  }
398 
399  if (m_nFullFillIndex == nCheckFill)
400  {
401  bFindAll = true;
402  break;
403  }
404  }
405 
406  if (bFindAll)
407  continue;
408 
410  int nNeighborUnitcellSize = m_vectNeighborCellID.size();
411 
412  for (j = 0; j < nNeighborUnitcellSize; ++j)
413  {
414  double fNeighborID = m_vectNeighborCellID[(unsigned int)j];
415  CGeometricUnitCell NeighborCell;
416 
417 #ifndef DISABLE_MPI_ROUTINE
418  if (fNeighborID < 0)
419  {
420  if( m_vectUnitCellInPrev->size() > 0 )
421  {
422  NeighborCell = m_vectUnitCellInPrev->at((int)fNeighborID + (int)(floor(pfAssignCount[_Y]) * floor(pfAssignCount[_Z])));
423  bFindAll = FindingNeighborInUnitcell(&NeighborCell, pCompare1, type1, pNeighborRelation, nCheckFill);
424  }
425  }
426  else if (fNeighborID >= m_vectUnitCellInShape->size())
427  {
428  if( m_vectUnitCellInNext->size() > 0 )
429  {
430  NeighborCell = m_vectUnitCellInNext->at((int)fNeighborID - (int)(floor(pfAssignCount[_X]) * floor(pfAssignCount[_Y]) * floor(pfAssignCount[_Z])));
431  bFindAll = FindingNeighborInUnitcell(&NeighborCell, pCompare1, type1, pNeighborRelation, nCheckFill);
432  }
433  }
434  else
435 #endif //DISABLE_MPI_ROUTINE
436  {
437  NeighborCell = m_vectUnitCellInShape->at((unsigned int)fNeighborID);
438  bFindAll = FindingNeighborInUnitcell(&NeighborCell, pCompare1, type1, pNeighborRelation, nCheckFill);
439  }
440 
441  if (bFindAll)
442  break;
443  }
444 
446  if (bFindAll)
447  continue;
448  }
449 
450  for (i = 0; i < nSize; ++i)
451  {
452  int nNeighborSize;
453  if (ATOM_DEFAULT_INDEX == m_vectInternalAtom[(unsigned int)i].GetID())
454  continue;
455 
456  pAtom = &m_vectInternalAtom[(unsigned int)i];
457  nNeighborSize = pAtom->GetNeighborCount();
458  for (j = 0; j < nNeighborSize; ++j)
459  {
460  if (ATOM_DEFAULT_INDEX == pAtom->GetNeighborAtomID(j))
461  {
462  pSurfaceList->push_back(pAtom);
463  break;
464  }
465  }
466  }
467 }
void SetNeighbor(unsigned int nIndex, CGeometricAtom *pNeighbor)
Set neighbor information.
static std::vector< CGeometricCoordination > m_vectNeighborRelation2To1
Neighbor relationship from cation to anion.
Definition: Global.h:113
double GetID()
Set unit cell ID.
double GetNeighborAtomID(unsigned int nIndex)
Get neighbor atom count.
Definition: Global.h:113
int IsMachedNeighborRule(CGeometricAtom *pCompare1, CGeometricAtom *pCompare2, std::vector< CGeometricCoordination > *pNeighborRelation, int &nCheckFill)
Checking neighbor with rule.
std::vector< CGeometricUnitCell > * m_vectUnitCellInNext
Back side unit cell list in shape.
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
std::vector< CGeometricUnitCell > * m_vectUnitCellInShape
Unit cell list in shape.
static int m_nFullFillIndex
Get SubElement ID. It means new atom id.
std::vector< double > m_vectNeighborCellID
Neighbor unit cell list.
unsigned int GetNeighborCount()
Definition: GeometricAtom.h:42
Class for Atom.
Definition: GeometricAtom.h:15
static std::vector< CGeometricCoordination > m_vectNeighborRelation1To2
Neighbor relationship from anion to cation.
#define ATOM_DEFAULT_INDEX
Atom index default value that empty atom instance.
Definition: Global.h:52
Definition: Global.h:113
std::vector< CGeometricUnitCell > * m_vectUnitCellInPrev
Front side unit cell list in shape.
ATOM_TYPE GetType()
Definition: GeometricAtom.h:33
Class for Geometric unit cell.
bool FindingNeighborInUnitcell(CGeometricUnitCell *pUnitcell, CGeometricAtom *pCompare1, CGeometricAtom::ATOM_TYPE type1, std::vector< CGeometricCoordination > *pNeighborRelation, int &nCheckFill)
Finding neighbor in same unit cell.

Here is the call graph for this function:

double CGeometricUnitCell::CalculatingIndex ( double  fXAssignedIndex,
double  fYAssignedIndex,
double  fZAssignedIndex,
double  fAssignedCount[3] 
)
static

Calulating unit cell index.

Parameters
fXAssignedIndexx direction index
fYAssignedIndexy direciton index
fZAssignedIndexz direction index
fAssignedCountAssigend count of shape
Returns
Unitcell index

Definition at line 308 of file GeometricUnitCell.cpp.

Referenced by CheckingNeighborCandiate(), and CGeometricShape::PeriodicUnitCellNumbering().

309 {
310  return fXAssignedIndex * floor(fAssignedCount[1]) * floor(fAssignedCount[2]) + fYAssignedIndex * floor(fAssignedCount[2]) + fZAssignedIndex;
311 }

Here is the caller graph for this function:

void CGeometricUnitCell::CheckingNeighborCandiate ( double  fAssignedCount[3],
bool  bFrontFace,
bool  bBackEnd 
)

Find neigbhor candidate for neighbor in atom. Maxium 26 unitcell index can be assigned.

Parameters
fAssignedCountAssign index array
bFrontFaceIs this shape is front end face
bBackEndIs this shape is back end face

Definition at line 223 of file GeometricUnitCell.cpp.

References _X, _Y, _Z, CalculatingIndex(), m_fAssignedIndex, and m_vectNeighborCellID.

224 {
225  double cx[3], cy[3], cz[3];
226  int cxCount = 1, cyCount = 1, czCount = 1;
227  int x, y, z;
228 
229  cx[0] = m_fAssignedIndex[_X];
230  cy[0] = m_fAssignedIndex[_Y];
231  cz[0] = m_fAssignedIndex[_Z];
232 
233  if (cx[0] > 0 || (cx[0] == 0 && false == bFrontFace))
234  cx[cxCount++] = cx[0] - 1;
235 
236  if (cy[0] > 0)
237  cy[cyCount++] = cy[0] - 1;
238 
239  if (cz[0] > 0)
240  cz[czCount++] = cz[0] - 1;
241 
242  if (cx[0] < fAssignedCount[_X] - 1 || (cx[0] == fAssignedCount[_X] - 1 && false == bBackEnd))
243  cx[cxCount++] = cx[0] + 1;
244 
245  if (cy[0] < fAssignedCount[_Y] - 1)
246  cy[cyCount++] = cy[0] + 1;
247 
248  if (cz[0] < fAssignedCount[_Z] - 1)
249  cz[czCount++] = cz[0] + 1;
250 
251  for (x = 0; x < cxCount; ++x)
252  {
253  for (y = 0; y < cyCount; ++y)
254  {
255  for (z = 0; z < czCount; ++z)
256  {
257  if (0 == x && 0 == y && 0 == z)
258  continue;
259 
260  m_vectNeighborCellID.push_back(CalculatingIndex(cx[x], cy[y], cz[z], fAssignedCount));
261  }
262  }
263  }
264 }
Definition: Global.h:113
static double CalculatingIndex(double fXAssignedIndex, double fYAssignedIndex, double fZAssignedIndex, double fAssignedCount[3])
Calulating unit cell index.
Definition: Global.h:113
std::vector< double > m_vectNeighborCellID
Neighbor unit cell list.
Definition: Global.h:113
double m_fAssignedIndex[3]
Assign index.

Here is the call graph for this function:

void CGeometricUnitCell::CopyInnerAtomIndex ( CGeometricUnitCell  srcUnitCell)

Copy atom id from source. This functino for periodic atom setting.

Parameters
srcUnitCellSource unit cell

Definition at line 316 of file GeometricUnitCell.cpp.

References CGeometricAtom::GetID(), GetSubElementAt(), GetSubElementSize(), m_vectInternalAtom, and SetID().

317 {
318  int i, nSize = srcUnitCell.GetSubElementSize();
319  for (i = 0; i < nSize; ++i)
320  m_vectInternalAtom[i].SetID(srcUnitCell.GetSubElementAt(i)->GetID());
321 }
double GetID()
Definition: GeometricAtom.h:27
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
void SetID(double fID)
CGeometricAtom * GetSubElementAt(double fIndex)
Get atom count in unit cell.

Here is the call graph for this function:

void CGeometricUnitCell::Deserialize ( double *  pBuffer)

Convert double buffer to unit cell data.

Parameters
pBufferSource data buffer for serialization

Definition at line 559 of file GeometricUnitCell.cpp.

References CGeometricAtom::A, CGeometricAtom::C, CGeometricAtomFactory::GetAtomCountInUnitcell(), m_vectInternalAtom, CGeometricAtom::SetCoordination(), CGeometricAtom::SetID(), CGeometricAtom::SetPeriodic(), CGeometricAtom::SetPeriodicDirection(), and CGeometricAtom::SetType().

Referenced by CGeometricShape::Deserialize().

560 {
562  int nPos = 0;
563 
564  for( i = 0; i < nSize;++i)
565  {
566  CGeometricAtom atom;
567 
568  atom.SetID(pBuffer[nPos++]);
569  if( 0 == pBuffer[nPos++])
570  atom.SetType(CGeometricAtom::A, (MATERIAL_INDEX)((int)pBuffer[nPos++]));
571  else
572  atom.SetType(CGeometricAtom::C, (MATERIAL_INDEX)((int)pBuffer[nPos++]));
573 
574  atom.SetPeriodic((bool)pBuffer[nPos++]);
575 
576  double x = pBuffer[nPos++];
577  double y = pBuffer[nPos++];
578  double z = pBuffer[nPos++];
579  atom.SetCoordination(x, y, z);
580  atom.SetPeriodicDirection((int)pBuffer[nPos++]);
581  m_vectInternalAtom.push_back(atom);
582  }
583 }
void SetPeriodicDirection(int periodicDirection)
Definition: GeometricAtom.h:51
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
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.
MATERIAL_INDEX
Definition: Global.h:114
void SetPeriodic(bool bPeriodic)
Definition: GeometricAtom.h:46
static int GetAtomCountInUnitcell()
void SetID(double fID)
Set atom ID.

Here is the call graph for this function:

Here is the caller graph for this function:

void CGeometricUnitCell::FinalSubElement ( )
private

Finalizing SubElement.

Definition at line 296 of file GeometricUnitCell.cpp.

References m_vectInternalAtom.

Referenced by ~CGeometricUnitCell().

297 {
298  m_vectInternalAtom.clear();
299 }
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.

Here is the caller graph for this function:

bool CGeometricUnitCell::FindingNeighborInUnitcell ( CGeometricUnitCell pUnitcell,
CGeometricAtom pCompare1,
CGeometricAtom::ATOM_TYPE  type1,
std::vector< CGeometricCoordination > *  pNeighborRelation,
int &  nCheckFill 
)
private

Finding neighbor in same unit cell.

Parameters
pUnitcellSearching target unit cell
pCompare1First comparing target atom
type1First compparing target atom type
pNeighborRelationNeighbor relation rule
[out]nCheckFillfinding result of first comparing target atom's neighbor
Returns
Finding neighbor all or not yet

Definition at line 507 of file GeometricUnitCell.cpp.

References GetSubElementAt(), GetSubElementSize(), CGeometricAtom::GetType(), IsMachedNeighborRule(), and CGeometricAtom::SetNeighbor().

Referenced by BuildNeighborInformation().

508 {
509  int i, nSize = pUnitcell->GetSubElementSize();
511  int nMatchingIndex;
512 
513  for (i = 0; i < nSize; ++i)
514  {
515  CGeometricAtom *pCompare2 = pUnitcell->GetSubElementAt(i);
516  type2 = pCompare2->GetType();
517  /*if (type1 == type2)
518  continue;*/
519 
520  nMatchingIndex = IsMachedNeighborRule(pCompare1, pCompare2, pNeighborRelation, nCheckFill);
521 
522  if (-1 != nMatchingIndex)
523  {
524  pCompare1->SetNeighbor(nMatchingIndex, pCompare2);
525  nCheckFill |= (int)(pow((double)2, (int)nMatchingIndex));
526  }
527 
528  if (15 == nCheckFill)
529  return true;
530  }
531 
532  return false;
533 }
void SetNeighbor(unsigned int nIndex, CGeometricAtom *pNeighbor)
Set neighbor information.
int IsMachedNeighborRule(CGeometricAtom *pCompare1, CGeometricAtom *pCompare2, std::vector< CGeometricCoordination > *pNeighborRelation, int &nCheckFill)
Checking neighbor with rule.
Class for Atom.
Definition: GeometricAtom.h:15
ATOM_TYPE GetType()
Definition: GeometricAtom.h:33
CGeometricAtom * GetSubElementAt(double fIndex)
Get atom count in unit cell.

Here is the call graph for this function:

Here is the caller graph for this function:

double* CGeometricUnitCell::GetAssignedIndex ( )
inline

Definition at line 40 of file GeometricUnitCell.h.

References m_fAssignedIndex.

40 { return m_fAssignedIndex; };
double m_fAssignedIndex[3]
Assign index.
CGeometricCoordination CGeometricUnitCell::GetCoordination ( )
inline

Definition at line 30 of file GeometricUnitCell.h.

References m_coordination.

30 { return m_coordination; };
CGeometricCoordination m_coordination
Coordination of unit cell.
double CGeometricUnitCell::GetID ( )
inline

Set unit cell ID.

Definition at line 35 of file GeometricUnitCell.h.

References m_fUnitCellID.

Referenced by BuildNeighborInformation(), and GetSubElementByID().

35 { return m_fUnitCellID; };
double m_fUnitCellID
Unit cell ID.

Here is the caller graph for this function:

static double CGeometricUnitCell::GetLength ( AXIS_DEFINE  index)
inlinestatic

Definition at line 25 of file GeometricUnitCell.h.

References m_fLength.

Referenced by CGeometricShape::ArrangeUnitCell(), and CGeometricShape::CalculateUnitcellCount().

25 { return m_fLength[index]; };
static double m_fLength[3]
Unit cell length.

Here is the caller graph for this function:

std::vector<double>* CGeometricUnitCell::GetNeighborCellID ( )
inline

Definition at line 46 of file GeometricUnitCell.h.

References m_vectNeighborCellID.

46 { return &m_vectNeighborCellID; };
std::vector< double > m_vectNeighborCellID
Neighbor unit cell list.
CGeometricAtom * CGeometricUnitCell::GetSubElementAt ( double  fIndex)

Get atom count in unit cell.

Return atom in unitcell by sequence

Parameters
fIndexIndex of atom
Returns
Pointer of atom instance

Definition at line 270 of file GeometricUnitCell.cpp.

References m_vectInternalAtom.

Referenced by CopyInnerAtomIndex(), and FindingNeighborInUnitcell().

271 {
272  if (fIndex >= m_vectInternalAtom.size())
273  return NULL;
274 
275  return &m_vectInternalAtom[(int)floor(fIndex)];
276 }
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.

Here is the caller graph for this function:

CGeometricAtom * CGeometricUnitCell::GetSubElementByID ( double  fID)

Return atom in unitcell by atom ID.

Parameters
fIDIndex of atom
Returns
Pointer of atom instance

Definition at line 282 of file GeometricUnitCell.cpp.

References GetID(), and m_vectInternalAtom.

283 {
284  int nSize, i;
285 
286  nSize = m_vectInternalAtom.size();
287  for( i = 0 ;i < nSize ; ++ i )
288  {
289  if( fID == m_vectInternalAtom[i].GetID() )
290  return &m_vectInternalAtom[i];
291  }
292 
293  return NULL;
294 }
double GetID()
Set unit cell ID.
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.

Here is the call graph for this function:

static double CGeometricUnitCell::GetSubElementID ( )
inlinestatic

Reset SubElement ID to Zero.

Definition at line 27 of file GeometricUnitCell.h.

Referenced by CGeometricShape::ConstructMapInfo(), and CGeometricShape::ExchangeAtomInfoBetweenNode().

27 { return m_SubElementID;};
static double m_SubElementID
Maxium atom ID in shape.

Here is the caller graph for this function:

int CGeometricUnitCell::GetSubElementSize ( )
inline

Definition at line 43 of file GeometricUnitCell.h.

References m_vectInternalAtom.

Referenced by CopyInnerAtomIndex(), and FindingNeighborInUnitcell().

43 { return m_vectInternalAtom.size(); };
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.

Here is the caller graph for this function:

int CGeometricUnitCell::IsMachedNeighborRule ( CGeometricAtom pCompare1,
CGeometricAtom pCompare2,
std::vector< CGeometricCoordination > *  pNeighborRelation,
int &  nCheckFill 
)
private

Checking neighbor with rule.

Parameters
pCompare1First comparing target atom
pCompare2Second comparing target atom
pNeighborRelationNeighbor relation rule
[out]nCheckFillfinding result of first comparing target atom's neighbor
Returns
Neighbor index

Definition at line 476 of file GeometricUnitCell.cpp.

References ATOM_DEFAULT_INDEX, CGeometricAtom::GetCoordination(), CGeometricAtom::GetNeighborAtomID(), and CGeometricCoordination::SetOffset().

Referenced by BuildNeighborInformation(), and FindingNeighborInUnitcell().

477 {
478  int i, nSize;
479  CGeometricCoordination coordination1;
480  CGeometricCoordination coordination2 = pCompare2->GetCoordination();
481 
482  nSize = pNeighborRelation->size();
483  for (i = 0; i < nSize; ++i)
484  {
485  double fNeighbor = pCompare1->GetNeighborAtomID(i);
486  if (ATOM_DEFAULT_INDEX != fNeighbor)
487  continue;
488 
489  coordination1 = pCompare1->GetCoordination();
490  coordination1.SetOffset(pNeighborRelation->at(i));
491 
492  if (coordination2 == coordination1)
493  return i;
494  }
495 
496  return -1;
497 }
double GetNeighborAtomID(unsigned int nIndex)
Get neighbor atom count.
Class for coordination.
void SetOffset(CGeometricCoordination coord)
To offset coordination.
#define ATOM_DEFAULT_INDEX
Atom index default value that empty atom instance.
Definition: Global.h:52
CGeometricCoordination GetCoordination()
Definition: GeometricAtom.h:37

Here is the call graph for this function:

Here is the caller graph for this function:

bool CGeometricUnitCell::IsPeriodicUnitCell ( )
inline

Check this unit cell is periodic condition or not.

Definition at line 53 of file GeometricUnitCell.h.

References m_bPeriodicElement.

unsigned int CGeometricUnitCell::NumberingSubElement ( CGeometricCoordination  ShapeCoordination,
double  fLength[3],
int  nShapeType,
char *  pszDomainMatName 
)

Assign atom ID to sub element(atoms in unit cell)

Parameters
ShapeCoordinationCoordination of shape
fLengthLength of shape
szShapeForm of shape
Returns
Atom count

Definition at line 155 of file GeometricUnitCell.cpp.

References _X, _Y, _Z, BOX_SHAPE, CYLINDER_SHAPE, GENERAL_TOLERANCE, CGeometricCoordination::GetCoordination(), CGeometricAtomFactory::GetMaterialNumber(), m_SubElementID, and m_vectInternalAtom.

Referenced by CGeometricShape::ArrangeUnitCell().

156 {
157  double cx, cy, cz;
158  int i, nSize = m_vectInternalAtom.size();
159  unsigned int count = 0;
160 
161  for (i = 0; i < nSize; ++i)
162  {
163  CGeometricCoordination coordination = m_vectInternalAtom[i].GetCoordination();
164 
165  cx = coordination.GetCoordination(_X);
166  cy = coordination.GetCoordination(_Y);
167  cz = coordination.GetCoordination(_Z);
168 
169  if (cx < 0 || cx > ShapeCoordination.GetCoordination(_X) + fLength[_X])
170  {
171  if( fabs(cx - (ShapeCoordination.GetCoordination(_X) + fLength[_X])) > GENERAL_TOLERANCE)
172  {
173  //printf("cx: %10.10f, cy: %10.10f, cz %10.10f\n", cx, cy, cz);
174  continue;
175  }
176  }
177 
178  switch (nShapeType)
179  {
180  case BOX_SHAPE:
181  if (cy < 0 || cy > ShapeCoordination.GetCoordination(_Y) + fLength[_Y])
182  continue;
183 
184  if (cz < 0 || cz > ShapeCoordination.GetCoordination(_Z) + fLength[_Z])
185  continue;
186  break;
187  case CYLINDER_SHAPE:
188  if ((pow((cy - (fLength[_Y] / 2)), 2) / pow(fLength[_Y] / 2, 2)) +
189  pow((cz - (fLength[_Z] / 2)), 2) / pow(fLength[_Z] / 2, 2) > 1)
190  continue;
191  break;
192  }
193 
194  count++;
195 
196  MATERIAL_INDEX nMaterialType;
197 
198  nMaterialType = CGeometricAtomFactory::GetMaterialNumber(pszDomainMatName, m_vectInternalAtom[i].GetType());
199  m_vectInternalAtom[i].SetMaterial(nMaterialType);
201  }
202 
203  return count;
204 }
#define GENERAL_TOLERANCE
General tolerance definition.
Definition: Global.h:47
static MATERIAL_INDEX GetMaterialNumber(char *pszMaterialName, CGeometricAtom::ATOM_TYPE type)
Get total atom counts in unit cell.
Definition: Global.h:113
Definition: Global.h:113
#define BOX_SHAPE
Definition: Global.h:93
static double m_SubElementID
Maxium atom ID in shape.
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
Class for coordination.
MATERIAL_INDEX
Definition: Global.h:114
Definition: Global.h:113
double GetCoordination(AXIS_DEFINE coord)
Get coordination specific axis.
#define CYLINDER_SHAPE
Definition: Global.h:94

Here is the call graph for this function:

Here is the caller graph for this function:

static void CGeometricUnitCell::ResetSubElementID ( )
inlinestatic

Get unit cell length.

Definition at line 26 of file GeometricUnitCell.h.

References m_SubElementID.

Referenced by CGeometricShape::ArrangeUnitCell().

26 { m_SubElementID = 0; };
static double m_SubElementID
Maxium atom ID in shape.

Here is the caller graph for this function:

void CGeometricUnitCell::Serialize ( double *  pBuffer)

Convert unit cell data to double buffer.

Parameters
[out]pBufferData buffer to save serialization result

Definition at line 538 of file GeometricUnitCell.cpp.

References _X, _Y, _Z, and m_vectInternalAtom.

539 {
540  int i, nSize = m_vectInternalAtom.size();
541  int nPos = 0;
542 
543  for( i = 0; i < nSize;++i)
544  {
545  pBuffer[nPos++] = m_vectInternalAtom[i].GetID();
546  pBuffer[nPos++] = (double)m_vectInternalAtom[i].GetType();
547  pBuffer[nPos++] = (double)m_vectInternalAtom[i].GetMaterialNumber();
548  pBuffer[nPos++] = (double)m_vectInternalAtom[i].IsPeriodicAtom();
549  pBuffer[nPos++] = m_vectInternalAtom[i].GetCoordination().GetCoordination(_X);
550  pBuffer[nPos++] = m_vectInternalAtom[i].GetCoordination().GetCoordination(_Y);
551  pBuffer[nPos++] = m_vectInternalAtom[i].GetCoordination().GetCoordination(_Z);
552  pBuffer[nPos++] = (double)m_vectInternalAtom[i].GetPeriodicDirection();
553  }
554 }
Definition: Global.h:113
Definition: Global.h:113
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
Definition: Global.h:113
void CGeometricUnitCell::SetAssignIndex ( double  fXAssignIndex,
double  fYAssignIndex,
double  fZAssignIndex 
)

Get Assign index.

Assign index set to unit cell. This index will be used for boundary check, neighbor unit cell finding

Parameters
fXAssignIndexAssign index of x
fYAssignIndexAssign index of y
fZAssignIndexAssign index of z

Definition at line 211 of file GeometricUnitCell.cpp.

References _X, _Y, _Z, and m_fAssignedIndex.

Referenced by CGeometricShape::ArrangeUnitCell().

212 {
213  m_fAssignedIndex[_X] = floor(fXAssignIndex);
214  m_fAssignedIndex[_Y] = floor(fYAssignIndex);
215  m_fAssignedIndex[_Z] = floor(fZAssignIndex);
216 }
Definition: Global.h:113
Definition: Global.h:113
Definition: Global.h:113
double m_fAssignedIndex[3]
Assign index.

Here is the caller graph for this function:

void CGeometricUnitCell::SetCoordination ( CGeometricCoordination  coordination)

Get coordination of unit cell.

Set coordination of unit cell

Parameters
coordinationCoordination

Definition at line 43 of file GeometricUnitCell.cpp.

References CGeometricCoordination::GetCoordinationAll(), m_coordination, and CGeometricCoordination::SetCoordination().

Referenced by CGeometricShape::ArrangeUnitCell().

44 {
46 }
CGeometricCoordination m_coordination
Coordination of unit cell.
void SetCoordination(CGeometricCoordination coordination)
Get coordination with double buffer.

Here is the call graph for this function:

Here is the caller graph for this function:

void CGeometricUnitCell::SetCoordination ( double *  pfCoordination)

Set coordination of unit cell.

Parameters
pfCoordinationCoordination buffer

Definition at line 51 of file GeometricUnitCell.cpp.

References m_coordination, and CGeometricCoordination::SetCoordination().

52 {
53  m_coordination.SetCoordination(pfCoordination);
54 }
CGeometricCoordination m_coordination
Coordination of unit cell.
void SetCoordination(CGeometricCoordination coordination)
Get coordination with double buffer.

Here is the call graph for this function:

void CGeometricUnitCell::SetCoordination ( double  fXCoordination,
double  fYCoordination,
double  fZCoordination 
)

Set coordination of unit cell.

Parameters
fXCoordinationx Coordination
fYCoordinationy Coordination
fZCoordinationz Coordination

Definition at line 61 of file GeometricUnitCell.cpp.

References m_coordination, and CGeometricCoordination::SetCoordination().

62 {
63  m_coordination.SetCoordination(fXCoordination, fYCoordination, fZCoordination);
64 }
CGeometricCoordination m_coordination
Coordination of unit cell.
void SetCoordination(CGeometricCoordination coordination)
Get coordination with double buffer.

Here is the call graph for this function:

static void CGeometricUnitCell::SetFullFillIndex ( int  nIndex)
inlinestatic

Changing Full fill neighbor index.

Definition at line 56 of file GeometricUnitCell.h.

References m_nFullFillIndex.

void CGeometricUnitCell::SetID ( double  fID)
inline

Definition at line 34 of file GeometricUnitCell.h.

References m_fUnitCellID.

Referenced by CGeometricShape::ArrangeUnitCell(), CopyInnerAtomIndex(), and CGeometricShape::Deserialize().

34 { m_fUnitCellID = fID; };
double m_fUnitCellID
Unit cell ID.

Here is the caller graph for this function:

void CGeometricUnitCell::SetLength ( double  fLength[3],
double  fOriginLength[3] 
)
static

Set unit cell length.

Definition at line 33 of file GeometricUnitCell.cpp.

References _X, _Y, _Z, and m_fLength.

Referenced by CGeometricShape::SetAtomAndNeighborInformation().

34 {
35  m_fLength[_X] = fOriginLength[_X];
36  m_fLength[_Y] = fOriginLength[_Y];
37  m_fLength[_Z] = fOriginLength[_Z];
38 }
static double m_fLength[3]
Unit cell length.
Definition: Global.h:113
Definition: Global.h:113
Definition: Global.h:113

Here is the caller graph for this function:

void CGeometricUnitCell::SetPeriodic ( bool  bPeriodic,
int  periodicDirection 
)

To mark unit cell is periodic condition.

Parameters
bPeriodicPeriodic flag
periodicDirectionPeriodic direction

Definition at line 589 of file GeometricUnitCell.cpp.

References CGeometricAtomFactory::GetAtomCountInUnitcell(), m_bPeriodicElement, m_periodicDirection, and m_vectInternalAtom.

Referenced by CGeometricShape::ArrangeUnitCell().

590 {
592  int nPos = 0;
593 
594  m_bPeriodicElement = bPeriodic;
595  m_periodicDirection = periodicDirection;
596  for (i = 0; i < nSize; ++i)
597  {
598  m_vectInternalAtom[i].SetPeriodic(bPeriodic);
599  m_vectInternalAtom[i].SetPeriodicDirection(periodicDirection);
600  }
601 }
int m_periodicDirection
Periodic direction information.
bool m_bPeriodicElement
Periodic element flag.
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
static int GetAtomCountInUnitcell()

Here is the call graph for this function:

Here is the caller graph for this function:

void CGeometricUnitCell::SetPeriodicDirection ( int  periodicDirection)
private

Set periodic direction.

Parameters
periodicDirectionPeriodic direction

Definition at line 618 of file GeometricUnitCell.cpp.

References CGeometricAtomFactory::GetAtomCountInUnitcell(), and m_vectInternalAtom.

619 {
621 
622  for (i = 0; i < nSize; ++i)
623  m_vectInternalAtom[i].SetPeriodicDirection(periodicDirection);
624 }
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
static int GetAtomCountInUnitcell()
void SetPeriodicDirection(int periodicDirection)
Set periodic direction.

Here is the call graph for this function:

void CGeometricUnitCell::SetSubDomainMaterial ( CCommandFileParser::LPINPUT_CMD_PARAM  lpParam)

Set atoms information(coordination, type) in unit cell.

Parameters
lpParamInput parameter parsing from command file

Definition at line 105 of file GeometricUnitCell.cpp.

References _X, _Y, _Z, BOX_SHAPE, CYLINDER_SHAPE, CCommandFileParser::INPUT_CMD_PARAM::fOrigin, CCommandFileParser::INPUT_CMD_PARAM::fShapeLength, CGeometricCoordination::GetCoordination(), CGeometricAtomFactory::GetMaterialNumber(), m_vectInternalAtom, CCommandFileParser::INPUT_CMD_PARAM::nShape, CCommandFileParser::INPUT_CMD_PARAM::nSubDomainNumber, and CCommandFileParser::INPUT_CMD_PARAM::szDomainMat.

Referenced by CGeometricShape::ArrangeUnitCell().

106 {
107  double cx, cy, cz;
108  int i, j, nSize = m_vectInternalAtom.size();
109 
110  for (j = 0; j < lpParam->nSubDomainNumber; ++j)
111  {
112  for (i = 0; i < nSize; ++i)
113  {
114  CGeometricCoordination coordination = m_vectInternalAtom[i].GetCoordination();
115 
116  cx = coordination.GetCoordination(_X);
117  cy = coordination.GetCoordination(_Y);
118  cz = coordination.GetCoordination(_Z);
119 
120  if (cx < lpParam->fOrigin[j+1][0] || cx > (lpParam->fOrigin[j+1][0] + lpParam->fShapeLength[j+1][0]))
121  continue;
122 
123  switch (lpParam->nShape[j + 1])
124  {
125  case BOX_SHAPE:
126  if (cy < lpParam->fOrigin[j + 1][1] || cy >(lpParam->fOrigin[j + 1][1] + lpParam->fShapeLength[j + 1][1]))
127  continue;
128 
129  if (cz < lpParam->fOrigin[j + 1][2] || cz >(lpParam->fOrigin[j + 1][2] + lpParam->fShapeLength[j + 1][2]))
130  continue;
131  break;
132  case CYLINDER_SHAPE:
133  if ((pow(((cy - lpParam->fOrigin[j + 1][_Y]) - (lpParam->fShapeLength[j + 1][_Y] / 2)), 2) / pow(lpParam->fShapeLength[j + 1][_Y] / 2, 2)) +
134  pow(((cz - lpParam->fOrigin[j + 1][_Z]) - (lpParam->fShapeLength[j + 1][_Z] / 2)), 2) / pow(lpParam->fShapeLength[j + 1][_Z] / 2, 2) > 1)
135  continue;
136  break;
137  }
138 
139  MATERIAL_INDEX nMaterialType;
140 
141  nMaterialType = CGeometricAtomFactory::GetMaterialNumber(lpParam->szDomainMat[j + 1], m_vectInternalAtom[i].GetType());
142  m_vectInternalAtom[i].SetMaterial(nMaterialType);
143  m_vectInternalAtom[i].SetDomainNumber(j+2);
144  }
145  }
146 
147 }
int nShape[NMAXDOMAIN]
Geometric Shape.
static MATERIAL_INDEX GetMaterialNumber(char *pszMaterialName, CGeometricAtom::ATOM_TYPE type)
Get total atom counts in unit cell.
double fOrigin[NMAXDOMAIN][3]
Coordinator original coordinate.
Definition: Global.h:113
double fShapeLength[NMAXDOMAIN][3]
Shap length x, y, z, direction.
Definition: Global.h:113
#define BOX_SHAPE
Definition: Global.h:93
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
Class for coordination.
MATERIAL_INDEX
Definition: Global.h:114
Definition: Global.h:113
int nSubDomainNumber
Numbers of Subdomain, except main domain.
double GetCoordination(AXIS_DEFINE coord)
Get coordination specific axis.
char szDomainMat[NMAXDOMAIN][1024]
Material type.
#define CYLINDER_SHAPE
Definition: Global.h:94

Here is the call graph for this function:

Here is the caller graph for this function:

void CGeometricUnitCell::SetUnitcellList ( std::vector< CGeometricUnitCell > *  pVect,
std::vector< CGeometricUnitCell > *  pVectPrev,
std::vector< CGeometricUnitCell > *  pVectNext 
)

Set unit cell list of shape to each unit cell.

Parameters
pVectvector of unit cell
pVectPrevvector of previous unit cell
pVectNextvector of next unit cell

Definition at line 608 of file GeometricUnitCell.cpp.

References m_vectUnitCellInNext, m_vectUnitCellInPrev, and m_vectUnitCellInShape.

Referenced by CGeometricShape::ArrangeUnitCell().

609 {
610  m_vectUnitCellInShape = pVect;
611  m_vectUnitCellInPrev = pVectPrev;
612  m_vectUnitCellInNext = pVectNext;
613 }
std::vector< CGeometricUnitCell > * m_vectUnitCellInNext
Back side unit cell list in shape.
std::vector< CGeometricUnitCell > * m_vectUnitCellInShape
Unit cell list in shape.
std::vector< CGeometricUnitCell > * m_vectUnitCellInPrev
Front side unit cell list in shape.

Here is the caller graph for this function:

void CGeometricUnitCell::ShiftAtomID ( double  fShift)

Get neighbor unit cell ID.

Shift atom ID by given fShift value

Parameters
fShiftShift value

Definition at line 326 of file GeometricUnitCell.cpp.

References m_vectInternalAtom, and ShiftID().

327 {
328  int i, nSize = m_vectInternalAtom.size();
329 
330  for (i = 0; i < nSize; ++i)
331  m_vectInternalAtom[i].ShiftID(fShift);
332 }
std::vector< CGeometricAtom > m_vectInternalAtom
Atom in unit cell.
void ShiftID(double fShift)
Get unit cell ID.

Here is the call graph for this function:

void CGeometricUnitCell::ShiftID ( double  fShift)

Get unit cell ID.

Shift subelement(atom) ID

Parameters
fShiftShift value

Definition at line 337 of file GeometricUnitCell.cpp.

References m_fUnitCellID, and m_vectNeighborCellID.

Referenced by ShiftAtomID().

338 {
339  int i, nSize = m_vectNeighborCellID.size();
340 
341  m_fUnitCellID += fShift;
342  for (i = 0; i < nSize; ++i)
343  m_vectNeighborCellID[i] += fShift;
344 }
std::vector< double > m_vectNeighborCellID
Neighbor unit cell list.
double m_fUnitCellID
Unit cell ID.

Here is the caller graph for this function:

Member Data Documentation

bool CGeometricUnitCell::m_bPeriodicElement
private

Periodic element flag.

Definition at line 75 of file GeometricUnitCell.h.

Referenced by CGeometricUnitCell(), IsPeriodicUnitCell(), and SetPeriodic().

CGeometricCoordination CGeometricUnitCell::m_coordination
private

Coordination of unit cell.

Definition at line 71 of file GeometricUnitCell.h.

Referenced by ArrangeAtom(), GetCoordination(), and SetCoordination().

double CGeometricUnitCell::m_fAssignedIndex[3]
private

Assign index.

Definition at line 67 of file GeometricUnitCell.h.

Referenced by CGeometricUnitCell(), CheckingNeighborCandiate(), GetAssignedIndex(), and SetAssignIndex().

double CGeometricUnitCell::m_fLength
staticprivate

Unit cell length.

Definition at line 65 of file GeometricUnitCell.h.

Referenced by GetLength(), and SetLength().

double CGeometricUnitCell::m_fUnitCellID
private

Unit cell ID.

Definition at line 74 of file GeometricUnitCell.h.

Referenced by CGeometricUnitCell(), GetID(), SetID(), and ShiftID().

int CGeometricUnitCell::m_nFullFillIndex = 15
static

Get SubElement ID. It means new atom id.

Check Neighbor relation check index 15 = 4 neighbors, 63 = 6 neighbors

Definition at line 27 of file GeometricUnitCell.h.

Referenced by BuildNeighborInformation(), and SetFullFillIndex().

int CGeometricUnitCell::m_periodicDirection
private

Periodic direction information.

Definition at line 76 of file GeometricUnitCell.h.

Referenced by SetPeriodic().

double CGeometricUnitCell::m_SubElementID = ATOM_DEFAULT_INDEX + 1
staticprivate

Maxium atom ID in shape.

Definition at line 66 of file GeometricUnitCell.h.

Referenced by NumberingSubElement(), and ResetSubElementID().

std::vector<double> CGeometricUnitCell::m_vectNeighborCellID
private

Neighbor unit cell list.

Definition at line 73 of file GeometricUnitCell.h.

Referenced by BuildNeighborInformation(), CheckingNeighborCandiate(), GetNeighborCellID(), and ShiftID().

std::vector<CGeometricUnitCell>* CGeometricUnitCell::m_vectUnitCellInNext
private

Back side unit cell list in shape.

Definition at line 70 of file GeometricUnitCell.h.

Referenced by BuildNeighborInformation(), and SetUnitcellList().

std::vector<CGeometricUnitCell>* CGeometricUnitCell::m_vectUnitCellInPrev
private

Front side unit cell list in shape.

Definition at line 69 of file GeometricUnitCell.h.

Referenced by BuildNeighborInformation(), and SetUnitcellList().

std::vector<CGeometricUnitCell>* CGeometricUnitCell::m_vectUnitCellInShape
private

Unit cell list in shape.

Definition at line 68 of file GeometricUnitCell.h.

Referenced by BuildNeighborInformation(), and SetUnitcellList().


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