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

Public Member Functions | |
| CKNGeometricUnitCell () | |
| ~CKNGeometricUnitCell () | |
| CKNGeometricCoordination | GetCoordination () |
| void | SetCoordination (CKNGeometricCoordination 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 (CKNCommandFileParser::LPINPUT_CMD_PARAM lpParam) |
| Set atoms information(coordination, type) in unit cell. More... | |
| unsigned int | NumberingSubElement (CKNGeometricCoordination ShapeCoordination, double fLength[3], int nShapeType, char *pszDomainMatName) |
| Assign atom ID to sub element(atoms in unit cell) More... | |
| void | SetSubDomainMaterial (CKNCommandFileParser::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 () |
| CKNGeometricAtom * | GetSubElementAt (double fIndex) |
| Get atom count in unit cell. More... | |
| CKNGeometricAtom * | 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< CKNGeometricUnitCell > *pVect, std::vector< CKNGeometricUnitCell > *pVectPrev, std::vector< CKNGeometricUnitCell > *pVectNext) |
| Set unit cell list of shape to each unit cell. More... | |
| void | BuildNeighborInformation (double *pfAssignCount, std::vector< CKNGeometricAtom * > *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 (CKNGeometricUnitCell 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 (CKNGeometricAtom *pCompare1, CKNGeometricAtom *pCompare2, std::vector< CKNGeometricCoordination > *pNeighborRelation, int &nCheckFill) |
| Checking neighbor with rule. More... | |
| void | FinalSubElement () |
| Finalizing SubElement. More... | |
| bool | FindingNeighborInUnitcell (CKNGeometricUnitCell *pUnitcell, CKNGeometricAtom *pCompare1, CKNGeometricAtom::ATOM_TYPE type1, std::vector< CKNGeometricCoordination > *pNeighborRelation, int &nCheckFill) |
| Finding neighbor in same unit cell. More... | |
| void | SetPeriodicDirection (int periodicDirection) |
| Set periodic direction. More... | |
| void | AddPeridoicDirection (CKNGeometricAtom::PERIODIC_DIRECTION periodicDirection) |
| Adding periodic direction. More... | |
Private Attributes | |
| double | m_fAssignedIndex [3] |
| Assign index. More... | |
| std::vector < CKNGeometricUnitCell > * | m_vectUnitCellInShape |
| Unit cell list in shape. More... | |
| std::vector < CKNGeometricUnitCell > * | m_vectUnitCellInPrev |
| Front side unit cell list in shape. More... | |
| std::vector < CKNGeometricUnitCell > * | m_vectUnitCellInNext |
| Back side unit cell list in shape. More... | |
| CKNGeometricCoordination | m_coordination |
| Coordination of unit cell. More... | |
| std::vector< CKNGeometricAtom > | m_vectIntenalAtom |
| 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... | |
| CKNGeometricUnitCell::CKNGeometricUnitCell | ( | ) |
Definition at line 19 of file KNGeometricUnitCell.cpp.
References _X, _Y, _Z, m_bPeriodicElement, m_fAssignedIndex, and m_fUnitCellID.
| CKNGeometricUnitCell::~CKNGeometricUnitCell | ( | ) |
Definition at line 29 of file KNGeometricUnitCell.cpp.
References FinalSubElement().

|
private |
Adding periodic direction.
| periodicDirection | Periodic direction |
Definition at line 627 of file KNGeometricUnitCell.cpp.
References CKNGeometricAtomFactory::GetAtomCountInUnitcell(), and m_vectIntenalAtom.

| void CKNGeometricUnitCell::ArrangeAtom | ( | CKNCommandFileParser::LPINPUT_CMD_PARAM | lpParam | ) |
Set atoms information(coordination, type) in unit cell.
| lpParam | Input parameter parsing from command file |
Definition at line 70 of file KNGeometricUnitCell.cpp.
References CKNGeometricAtom::A, CKNGeometricAtom::C, CKNGeometricAtomFactory::GetMaterialNumber(), m_coordination, CKNGeometricAtomFactory::m_vectAtomList_1, CKNGeometricAtomFactory::m_vectAtomList_2, m_vectIntenalAtom, CKNGeometricAtom::SetCoordination(), CKNGeometricAtom::SetDomainMaterial(), CKNGeometricCoordination::SetOffset(), CKNGeometricAtom::SetType(), and CKNCommandFileParser::INPUT_CMD_PARAM::szDomainMat.
Referenced by CKNGeometricShape::ArrangeUnitCell().


| void CKNGeometricUnitCell::BuildNeighborInformation | ( | double * | pfAssignCount, |
| std::vector< CKNGeometricAtom * > * | 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 348 of file KNGeometricUnitCell.cpp.
References _X, _Y, _Z, CKNGeometricAtom::A, ATOM_DEFAULT_INDEX, FindingNeighborInUnitcell(), GetID(), CKNGeometricAtom::GetNeighborAtomID(), CKNGeometricAtom::GetNeighborCount(), CKNGeometricAtom::GetType(), IsMachedNeighborRule(), m_nFullFillIndex, m_vectIntenalAtom, m_vectNeighborCellID, CKNGeometricAtomFactory::m_vectNeighborRelation1To2, CKNGeometricAtomFactory::m_vectNeighborRelation2To1, m_vectUnitCellInNext, m_vectUnitCellInPrev, m_vectUnitCellInShape, and CKNGeometricAtom::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 306 of file KNGeometricUnitCell.cpp.
Referenced by CheckingNeighborCandiate(), and CKNGeometricShape::PeriodicUnitCellNumbering().

| void CKNGeometricUnitCell::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 221 of file KNGeometricUnitCell.cpp.
References _X, _Y, _Z, CalculatingIndex(), m_fAssignedIndex, and m_vectNeighborCellID.

| void CKNGeometricUnitCell::CopyInnerAtomIndex | ( | CKNGeometricUnitCell | srcUnitCell | ) |
Copy atom id from source. This functino for periodic atom setting.
| srcUnitCell | Source unit cell |
Definition at line 314 of file KNGeometricUnitCell.cpp.
References CKNGeometricAtom::GetID(), GetSubElementAt(), GetSubElementSize(), m_vectIntenalAtom, and SetID().

| void CKNGeometricUnitCell::Deserialize | ( | double * | pBuffer | ) |
Convert double buffer to unit cell data.
| pBuffer | Source data buffer for serialization |
Definition at line 557 of file KNGeometricUnitCell.cpp.
References CKNGeometricAtom::A, CKNGeometricAtom::C, CKNGeometricAtomFactory::GetAtomCountInUnitcell(), m_vectIntenalAtom, CKNGeometricAtom::SetCoordination(), CKNGeometricAtom::SetID(), CKNGeometricAtom::SetPeriodic(), CKNGeometricAtom::SetPeriodicDirection(), and CKNGeometricAtom::SetType().
Referenced by CKNGeometricShape::Deserialize().


|
private |
Finalizing SubElement.
Definition at line 294 of file KNGeometricUnitCell.cpp.
References m_vectIntenalAtom.
Referenced by ~CKNGeometricUnitCell().

|
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 505 of file KNGeometricUnitCell.cpp.
References GetSubElementAt(), GetSubElementSize(), CKNGeometricAtom::GetType(), IsMachedNeighborRule(), and CKNGeometricAtom::SetNeighbor().
Referenced by BuildNeighborInformation().


|
inline |
Definition at line 42 of file KNGeometricUnitCell.h.
References m_fAssignedIndex.
|
inline |
Definition at line 32 of file KNGeometricUnitCell.h.
References m_coordination.
|
inline |
Set unit cell ID.
Definition at line 37 of file KNGeometricUnitCell.h.
References m_fUnitCellID.
Referenced by BuildNeighborInformation(), and GetSubElementByID().

|
inlinestatic |
Definition at line 27 of file KNGeometricUnitCell.h.
References m_fLength.
Referenced by CKNGeometricShape::ArrangeUnitCell(), and CKNGeometricShape::CalculateUnitcellCount().

|
inline |
Definition at line 48 of file KNGeometricUnitCell.h.
References m_vectNeighborCellID.
| CKNGeometricAtom * CKNGeometricUnitCell::GetSubElementAt | ( | double | fIndex | ) |
Get atom count in unit cell.
Return atom in unitcell by sequence
| fIndex | Index of atom |
Definition at line 268 of file KNGeometricUnitCell.cpp.
References m_vectIntenalAtom.
Referenced by CopyInnerAtomIndex(), and FindingNeighborInUnitcell().

| CKNGeometricAtom * CKNGeometricUnitCell::GetSubElementByID | ( | double | fID | ) |
Return atom in unitcell by atom ID.
| fID | Index of atom |
Definition at line 280 of file KNGeometricUnitCell.cpp.
References GetID(), and m_vectIntenalAtom.

|
inlinestatic |
Reset SubElement ID to Zero.
Definition at line 29 of file KNGeometricUnitCell.h.
Referenced by CKNGeometricShape::ConstructMapInfo(), and CKNGeometricShape::ExchangeAtomInfoBetweenNode().

|
inline |
Definition at line 45 of file KNGeometricUnitCell.h.
References m_vectIntenalAtom.
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 474 of file KNGeometricUnitCell.cpp.
References ATOM_DEFAULT_INDEX, CKNGeometricAtom::GetCoordination(), CKNGeometricAtom::GetNeighborAtomID(), and CKNGeometricCoordination::SetOffset().
Referenced by BuildNeighborInformation(), and FindingNeighborInUnitcell().


|
inline |
Check this unit cell is periodic condition or not.
Definition at line 55 of file KNGeometricUnitCell.h.
References m_bPeriodicElement.
| unsigned int CKNGeometricUnitCell::NumberingSubElement | ( | CKNGeometricCoordination | 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 153 of file KNGeometricUnitCell.cpp.
References _X, _Y, _Z, BOX_SHAPE, CYLINDER_SHAPE, GENERAL_TOLERANCE, CKNGeometricCoordination::GetCoordination(), CKNGeometricAtomFactory::GetMaterialNumber(), m_SubElementID, and m_vectIntenalAtom.
Referenced by CKNGeometricShape::ArrangeUnitCell().


|
inlinestatic |
Get unit cell length.
Definition at line 28 of file KNGeometricUnitCell.h.
References m_SubElementID.
Referenced by CKNGeometricShape::ArrangeUnitCell().

| void CKNGeometricUnitCell::Serialize | ( | double * | pBuffer | ) |
Convert unit cell data to double buffer.
| [out] | pBuffer | Data buffer to save serialization result |
Definition at line 536 of file KNGeometricUnitCell.cpp.
References _X, _Y, _Z, and m_vectIntenalAtom.
| void CKNGeometricUnitCell::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 209 of file KNGeometricUnitCell.cpp.
References _X, _Y, _Z, and m_fAssignedIndex.
Referenced by CKNGeometricShape::ArrangeUnitCell().

| void CKNGeometricUnitCell::SetCoordination | ( | CKNGeometricCoordination | coordination | ) |
Get coordination of unit cell.
Set coordination of unit cell
| coordination | Coordination |
Definition at line 44 of file KNGeometricUnitCell.cpp.
References CKNGeometricCoordination::GetCoordinationAll(), m_coordination, and CKNGeometricCoordination::SetCoordination().
Referenced by CKNGeometricShape::ArrangeUnitCell().


| void CKNGeometricUnitCell::SetCoordination | ( | double * | pfCoordination | ) |
Set coordination of unit cell.
| pfCoordination | Coordination buffer |
Definition at line 52 of file KNGeometricUnitCell.cpp.
References m_coordination, and CKNGeometricCoordination::SetCoordination().

| void CKNGeometricUnitCell::SetCoordination | ( | double | fXCoordination, |
| double | fYCoordination, | ||
| double | fZCoordination | ||
| ) |
Set coordination of unit cell.
| fXCoordination | x Coordination |
| fYCoordination | y Coordination |
| fZCoordination | z Coordination |
Definition at line 62 of file KNGeometricUnitCell.cpp.
References m_coordination, and CKNGeometricCoordination::SetCoordination().

|
inlinestatic |
Changing Full fill neighbor index.
Definition at line 58 of file KNGeometricUnitCell.h.
References m_nFullFillIndex.
|
inline |
Definition at line 36 of file KNGeometricUnitCell.h.
References m_fUnitCellID.
Referenced by CKNGeometricShape::ArrangeUnitCell(), CopyInnerAtomIndex(), and CKNGeometricShape::Deserialize().

|
static |
Set unit cell length.
Definition at line 34 of file KNGeometricUnitCell.cpp.
References _X, _Y, _Z, and m_fLength.
Referenced by CKNGeometricShape::SetAtomAndNeighborInformation(), and CKNGeometricConstructionLaunch::SetUnitCellInformation().

| void CKNGeometricUnitCell::SetPeriodic | ( | bool | bPeriodic, |
| int | periodicDirection | ||
| ) |
To mark unit cell is periodic condition.
| bPeriodic | Periodic flag |
| periodicDirection | Periodic direction |
Definition at line 587 of file KNGeometricUnitCell.cpp.
References CKNGeometricAtomFactory::GetAtomCountInUnitcell(), m_bPeriodicElement, m_periodicDirection, and m_vectIntenalAtom.
Referenced by CKNGeometricShape::ArrangeUnitCell().


|
private |
Set periodic direction.
| periodicDirection | Periodic direction |
Definition at line 616 of file KNGeometricUnitCell.cpp.
References CKNGeometricAtomFactory::GetAtomCountInUnitcell(), and m_vectIntenalAtom.

| void CKNGeometricUnitCell::SetSubDomainMaterial | ( | CKNCommandFileParser::LPINPUT_CMD_PARAM | lpParam | ) |
Set atoms information(coordination, type) in unit cell.
| lpParam | Input parameter parsing from command file |
Definition at line 104 of file KNGeometricUnitCell.cpp.
References _X, _Y, _Z, BOX_SHAPE, CYLINDER_SHAPE, CKNCommandFileParser::INPUT_CMD_PARAM::fOrigin, CKNCommandFileParser::INPUT_CMD_PARAM::fShapeLength, CKNGeometricCoordination::GetCoordination(), CKNGeometricAtomFactory::GetMaterialNumber(), m_vectIntenalAtom, CKNCommandFileParser::INPUT_CMD_PARAM::nShape, CKNCommandFileParser::INPUT_CMD_PARAM::nSubDomainNumber, and CKNCommandFileParser::INPUT_CMD_PARAM::szDomainMat.
Referenced by CKNGeometricShape::ArrangeUnitCell().


| void CKNGeometricUnitCell::SetUnitcellList | ( | std::vector< CKNGeometricUnitCell > * | pVect, |
| std::vector< CKNGeometricUnitCell > * | pVectPrev, | ||
| std::vector< CKNGeometricUnitCell > * | 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 606 of file KNGeometricUnitCell.cpp.
References m_vectUnitCellInNext, m_vectUnitCellInPrev, and m_vectUnitCellInShape.
Referenced by CKNGeometricShape::ArrangeUnitCell().

| void CKNGeometricUnitCell::ShiftAtomID | ( | double | fShift | ) |
Get neighbor unit cell ID.
Shift atom ID by given fShift value
| fShift | Shift value |
Definition at line 324 of file KNGeometricUnitCell.cpp.
References m_vectIntenalAtom, and ShiftID().

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

|
private |
Periodic element flag.
Definition at line 77 of file KNGeometricUnitCell.h.
Referenced by CKNGeometricUnitCell(), IsPeriodicUnitCell(), and SetPeriodic().
|
private |
Coordination of unit cell.
Definition at line 73 of file KNGeometricUnitCell.h.
Referenced by ArrangeAtom(), GetCoordination(), and SetCoordination().
|
private |
Assign index.
Definition at line 69 of file KNGeometricUnitCell.h.
Referenced by CheckingNeighborCandiate(), CKNGeometricUnitCell(), GetAssignedIndex(), and SetAssignIndex().
|
staticprivate |
Unit cell length.
Definition at line 67 of file KNGeometricUnitCell.h.
Referenced by GetLength(), and SetLength().
|
private |
Unit cell ID.
Definition at line 76 of file KNGeometricUnitCell.h.
Referenced by CKNGeometricUnitCell(), 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 29 of file KNGeometricUnitCell.h.
Referenced by BuildNeighborInformation(), and SetFullFillIndex().
|
private |
Periodic direction information.
Definition at line 78 of file KNGeometricUnitCell.h.
Referenced by SetPeriodic().
|
staticprivate |
Maxium atom ID in shape.
Definition at line 68 of file KNGeometricUnitCell.h.
Referenced by NumberingSubElement(), and ResetSubElementID().
|
private |
Atom in unit cell.
Definition at line 74 of file KNGeometricUnitCell.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 75 of file KNGeometricUnitCell.h.
Referenced by BuildNeighborInformation(), CheckingNeighborCandiate(), GetNeighborCellID(), and ShiftID().
|
private |
Back side unit cell list in shape.
Definition at line 72 of file KNGeometricUnitCell.h.
Referenced by BuildNeighborInformation(), and SetUnitcellList().
|
private |
Front side unit cell list in shape.
Definition at line 71 of file KNGeometricUnitCell.h.
Referenced by BuildNeighborInformation(), and SetUnitcellList().
|
private |
Unit cell list in shape.
Definition at line 70 of file KNGeometricUnitCell.h.
Referenced by BuildNeighborInformation(), and SetUnitcellList().