|
IPCC
1.0
|
Class for Geometric unit cell. More...
#include "GeometricUnitCell.h"

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 () |
| CGeometricAtom * | GetSubElementAt (double fIndex) |
| Get atom count in unit cell. More... | |
| CGeometricAtom * | GetSubElementByID (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< CGeometricAtom > | m_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... | |
| CGeometricUnitCell::CGeometricUnitCell | ( | ) |
Definition at line 18 of file GeometricUnitCell.cpp.
References _X, _Y, _Z, m_bPeriodicElement, m_fAssignedIndex, and m_fUnitCellID.
| CGeometricUnitCell::~CGeometricUnitCell | ( | ) |
Definition at line 28 of file GeometricUnitCell.cpp.
References FinalSubElement().

|
private |
Adding periodic direction.
| periodicDirection | Periodic direction |
Definition at line 629 of file GeometricUnitCell.cpp.
References CGeometricAtomFactory::GetAtomCountInUnitcell(), and m_vectInternalAtom.

| void CGeometricUnitCell::ArrangeAtom | ( | CCommandFileParser::LPINPUT_CMD_PARAM | lpParam | ) |
Set atoms information(coordination, type) in unit cell.
| lpParam | Input 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().


| void CGeometricUnitCell::BuildNeighborInformation | ( | double * | pfAssignCount, |
| std::vector< CGeometricAtom * > * | pSurfaceList | ||
| ) |
Build neighbor information to each atom.
| pfAssignCount | Assign count of shape |
| pSurfaceList | Surface 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().

|
static |
Calulating unit cell index.
| fXAssignedIndex | x direction index |
| fYAssignedIndex | y direciton index |
| fZAssignedIndex | z direction index |
| fAssignedCount | Assigend count of shape |
Definition at line 308 of file GeometricUnitCell.cpp.
Referenced by CheckingNeighborCandiate(), and CGeometricShape::PeriodicUnitCellNumbering().

| void CGeometricUnitCell::CheckingNeighborCandiate | ( | double | fAssignedCount[3], |
| bool | bFrontFace, | ||
| bool | bBackEnd | ||
| ) |
Find neigbhor candidate for neighbor in atom. Maxium 26 unitcell index can be assigned.
| fAssignedCount | Assign index array |
| bFrontFace | Is this shape is front end face |
| bBackEnd | Is this shape is back end face |
Definition at line 223 of file GeometricUnitCell.cpp.
References _X, _Y, _Z, CalculatingIndex(), m_fAssignedIndex, and m_vectNeighborCellID.

| void CGeometricUnitCell::CopyInnerAtomIndex | ( | CGeometricUnitCell | srcUnitCell | ) |
Copy atom id from source. This functino for periodic atom setting.
| srcUnitCell | Source unit cell |
Definition at line 316 of file GeometricUnitCell.cpp.
References CGeometricAtom::GetID(), GetSubElementAt(), GetSubElementSize(), m_vectInternalAtom, and SetID().

| void CGeometricUnitCell::Deserialize | ( | double * | pBuffer | ) |
Convert double buffer to unit cell data.
| pBuffer | Source 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().


|
private |
Finalizing SubElement.
Definition at line 296 of file GeometricUnitCell.cpp.
References m_vectInternalAtom.
Referenced by ~CGeometricUnitCell().

|
private |
Finding neighbor in same unit cell.
| pUnitcell | Searching target unit cell | |
| pCompare1 | First comparing target atom | |
| type1 | First compparing target atom type | |
| pNeighborRelation | Neighbor relation rule | |
| [out] | nCheckFill | finding result of first comparing target atom's neighbor |
Definition at line 507 of file GeometricUnitCell.cpp.
References GetSubElementAt(), GetSubElementSize(), CGeometricAtom::GetType(), IsMachedNeighborRule(), and CGeometricAtom::SetNeighbor().
Referenced by BuildNeighborInformation().


|
inline |
Definition at line 40 of file GeometricUnitCell.h.
References m_fAssignedIndex.
|
inline |
Definition at line 30 of file GeometricUnitCell.h.
References m_coordination.
|
inline |
Set unit cell ID.
Definition at line 35 of file GeometricUnitCell.h.
References m_fUnitCellID.
Referenced by BuildNeighborInformation(), and GetSubElementByID().

|
inlinestatic |
Definition at line 25 of file GeometricUnitCell.h.
References m_fLength.
Referenced by CGeometricShape::ArrangeUnitCell(), and CGeometricShape::CalculateUnitcellCount().

|
inline |
Definition at line 46 of file GeometricUnitCell.h.
References m_vectNeighborCellID.
| CGeometricAtom * CGeometricUnitCell::GetSubElementAt | ( | double | fIndex | ) |
Get atom count in unit cell.
Return atom in unitcell by sequence
| fIndex | Index of atom |
Definition at line 270 of file GeometricUnitCell.cpp.
References m_vectInternalAtom.
Referenced by CopyInnerAtomIndex(), and FindingNeighborInUnitcell().

| CGeometricAtom * CGeometricUnitCell::GetSubElementByID | ( | double | fID | ) |
Return atom in unitcell by atom ID.
| fID | Index of atom |
Definition at line 282 of file GeometricUnitCell.cpp.
References GetID(), and m_vectInternalAtom.

|
inlinestatic |
Reset SubElement ID to Zero.
Definition at line 27 of file GeometricUnitCell.h.
Referenced by CGeometricShape::ConstructMapInfo(), and CGeometricShape::ExchangeAtomInfoBetweenNode().

|
inline |
Definition at line 43 of file GeometricUnitCell.h.
References m_vectInternalAtom.
Referenced by CopyInnerAtomIndex(), and FindingNeighborInUnitcell().

|
private |
Checking neighbor with rule.
| pCompare1 | First comparing target atom | |
| pCompare2 | Second comparing target atom | |
| pNeighborRelation | Neighbor relation rule | |
| [out] | nCheckFill | finding result of first comparing target atom's neighbor |
Definition at line 476 of file GeometricUnitCell.cpp.
References ATOM_DEFAULT_INDEX, CGeometricAtom::GetCoordination(), CGeometricAtom::GetNeighborAtomID(), and CGeometricCoordination::SetOffset().
Referenced by BuildNeighborInformation(), and FindingNeighborInUnitcell().


|
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)
| ShapeCoordination | Coordination of shape |
| fLength | Length of shape |
| szShape | Form of shape |
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().


|
inlinestatic |
Get unit cell length.
Definition at line 26 of file GeometricUnitCell.h.
References m_SubElementID.
Referenced by CGeometricShape::ArrangeUnitCell().

| void CGeometricUnitCell::Serialize | ( | double * | pBuffer | ) |
Convert unit cell data to double buffer.
| [out] | pBuffer | Data buffer to save serialization result |
Definition at line 538 of file GeometricUnitCell.cpp.
References _X, _Y, _Z, and m_vectInternalAtom.
| 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
| fXAssignIndex | Assign index of x |
| fYAssignIndex | Assign index of y |
| fZAssignIndex | Assign index of z |
Definition at line 211 of file GeometricUnitCell.cpp.
References _X, _Y, _Z, and m_fAssignedIndex.
Referenced by CGeometricShape::ArrangeUnitCell().

| void CGeometricUnitCell::SetCoordination | ( | CGeometricCoordination | coordination | ) |
Get coordination of unit cell.
Set coordination of unit cell
| coordination | Coordination |
Definition at line 43 of file GeometricUnitCell.cpp.
References CGeometricCoordination::GetCoordinationAll(), m_coordination, and CGeometricCoordination::SetCoordination().
Referenced by CGeometricShape::ArrangeUnitCell().


| void CGeometricUnitCell::SetCoordination | ( | double * | pfCoordination | ) |
Set coordination of unit cell.
| pfCoordination | Coordination buffer |
Definition at line 51 of file GeometricUnitCell.cpp.
References m_coordination, and CGeometricCoordination::SetCoordination().

| void CGeometricUnitCell::SetCoordination | ( | double | fXCoordination, |
| double | fYCoordination, | ||
| double | fZCoordination | ||
| ) |
Set coordination of unit cell.
| fXCoordination | x Coordination |
| fYCoordination | y Coordination |
| fZCoordination | z Coordination |
Definition at line 61 of file GeometricUnitCell.cpp.
References m_coordination, and CGeometricCoordination::SetCoordination().

|
inlinestatic |
Changing Full fill neighbor index.
Definition at line 56 of file GeometricUnitCell.h.
References m_nFullFillIndex.
|
inline |
Definition at line 34 of file GeometricUnitCell.h.
References m_fUnitCellID.
Referenced by CGeometricShape::ArrangeUnitCell(), CopyInnerAtomIndex(), and CGeometricShape::Deserialize().

|
static |
Set unit cell length.
Definition at line 33 of file GeometricUnitCell.cpp.
References _X, _Y, _Z, and m_fLength.
Referenced by CGeometricShape::SetAtomAndNeighborInformation().

| void CGeometricUnitCell::SetPeriodic | ( | bool | bPeriodic, |
| int | periodicDirection | ||
| ) |
To mark unit cell is periodic condition.
| bPeriodic | Periodic flag |
| periodicDirection | Periodic direction |
Definition at line 589 of file GeometricUnitCell.cpp.
References CGeometricAtomFactory::GetAtomCountInUnitcell(), m_bPeriodicElement, m_periodicDirection, and m_vectInternalAtom.
Referenced by CGeometricShape::ArrangeUnitCell().


|
private |
Set periodic direction.
| periodicDirection | Periodic direction |
Definition at line 618 of file GeometricUnitCell.cpp.
References CGeometricAtomFactory::GetAtomCountInUnitcell(), and m_vectInternalAtom.

| void CGeometricUnitCell::SetSubDomainMaterial | ( | CCommandFileParser::LPINPUT_CMD_PARAM | lpParam | ) |
Set atoms information(coordination, type) in unit cell.
| lpParam | Input 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().


| 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.
| pVect | vector of unit cell |
| pVectPrev | vector of previous unit cell |
| pVectNext | vector of next unit cell |
Definition at line 608 of file GeometricUnitCell.cpp.
References m_vectUnitCellInNext, m_vectUnitCellInPrev, and m_vectUnitCellInShape.
Referenced by CGeometricShape::ArrangeUnitCell().

| void CGeometricUnitCell::ShiftAtomID | ( | double | fShift | ) |
Get neighbor unit cell ID.
Shift atom ID by given fShift value
| fShift | Shift value |
Definition at line 326 of file GeometricUnitCell.cpp.
References m_vectInternalAtom, and ShiftID().

| void CGeometricUnitCell::ShiftID | ( | double | fShift | ) |
Get unit cell ID.
Shift subelement(atom) ID
| fShift | Shift value |
Definition at line 337 of file GeometricUnitCell.cpp.
References m_fUnitCellID, and m_vectNeighborCellID.
Referenced by ShiftAtomID().

|
private |
Periodic element flag.
Definition at line 75 of file GeometricUnitCell.h.
Referenced by CGeometricUnitCell(), IsPeriodicUnitCell(), and SetPeriodic().
|
private |
Coordination of unit cell.
Definition at line 71 of file GeometricUnitCell.h.
Referenced by ArrangeAtom(), GetCoordination(), and SetCoordination().
|
private |
Assign index.
Definition at line 67 of file GeometricUnitCell.h.
Referenced by CGeometricUnitCell(), CheckingNeighborCandiate(), GetAssignedIndex(), and SetAssignIndex().
|
staticprivate |
Unit cell length.
Definition at line 65 of file GeometricUnitCell.h.
Referenced by GetLength(), and SetLength().
|
private |
Unit cell ID.
Definition at line 74 of file GeometricUnitCell.h.
Referenced by CGeometricUnitCell(), GetID(), SetID(), and ShiftID().
|
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().
|
private |
Periodic direction information.
Definition at line 76 of file GeometricUnitCell.h.
Referenced by SetPeriodic().
|
staticprivate |
Maxium atom ID in shape.
Definition at line 66 of file GeometricUnitCell.h.
Referenced by NumberingSubElement(), and ResetSubElementID().
|
private |
Atom in unit cell.
Definition at line 72 of file GeometricUnitCell.h.
Referenced by AddPeridoicDirection(), ArrangeAtom(), BuildNeighborInformation(), CopyInnerAtomIndex(), Deserialize(), FinalSubElement(), GetSubElementAt(), GetSubElementByID(), GetSubElementSize(), NumberingSubElement(), Serialize(), SetPeriodic(), SetPeriodicDirection(), SetSubDomainMaterial(), and ShiftAtomID().
|
private |
Neighbor unit cell list.
Definition at line 73 of file GeometricUnitCell.h.
Referenced by BuildNeighborInformation(), CheckingNeighborCandiate(), GetNeighborCellID(), and ShiftID().
|
private |
Back side unit cell list in shape.
Definition at line 70 of file GeometricUnitCell.h.
Referenced by BuildNeighborInformation(), and SetUnitcellList().
|
private |
Front side unit cell list in shape.
Definition at line 69 of file GeometricUnitCell.h.
Referenced by BuildNeighborInformation(), and SetUnitcellList().
|
private |
Unit cell list in shape.
Definition at line 68 of file GeometricUnitCell.h.
Referenced by BuildNeighborInformation(), and SetUnitcellList().