CompuCell3D::CellBoundaryTrackerPlugin Class Reference

#include <CellBoundaryTrackerPlugin.h>

Inheritance diagram for CompuCell3D::CellBoundaryTrackerPlugin:

Inheritance graph
[legend]
Collaboration diagram for CompuCell3D::CellBoundaryTrackerPlugin:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CellBoundaryTrackerPlugin ()
virtual ~CellBoundaryTrackerPlugin ()
virtual void init (Simulator *simulator)
virtual void field3DChange (const Point3D &pt, CellG *newCell, CellG *oldCell)
virtual void readXML (XMLPullParser &in)
virtual void writeXML (XMLSerializer &out)
virtual void initializeBoundaries ()
BasicClassAccessor
< CellBoundaryTracker > * 
getCellBoundaryTrackerAccessorPtr ()

Protected Member Functions

double distance (double, double, double, double, double, double)
virtual void testLatticeSanity ()
virtual void testLatticeSanityFull ()
bool isBoundaryPixel (Point3D pt)
bool isTouchingLatticeBoundary (Point3D pt, Point3D ptAdj)

Protected Attributes

bool watchingAllowed
AdjacentNeighbor adjNeighbor
long maxIndex
long changeCounter

Private Attributes

Field3D< CellG * > * cellFieldG
Dim3D fieldDim
BasicClassAccessor
< CellBoundaryTracker
cellBoundaryTrackerAccessor
Simulatorsimulator
bool periodicX
bool periodicY
bool periodicZ


Detailed Description

Definition at line 42 of file CellBoundaryTrackerPlugin.h.


Constructor & Destructor Documentation

CellBoundaryTrackerPlugin::CellBoundaryTrackerPlugin (  ) 

Definition at line 40 of file CellBoundaryTrackerPlugin.cpp.

CellBoundaryTrackerPlugin::~CellBoundaryTrackerPlugin (  )  [virtual]

Definition at line 47 of file CellBoundaryTrackerPlugin.cpp.


Member Function Documentation

void CellBoundaryTrackerPlugin::init ( Simulator simulator  )  [virtual]

will register CellBoundaryTracker here

REMARK. HAVE TO USE THE SAME BASIC CLASS ACCESSOR INSTANCE THAT WAS USED TO REGISTER WITH FACTORY

************************************************************************************************

Definition at line 51 of file CellBoundaryTrackerPlugin.cpp.

References adjNeighbor, cellBoundaryTrackerAccessor, cellFieldG, fieldDim, CompuCell3D::Potts3D::getBoundaryXName(), CompuCell3D::Potts3D::getBoundaryYName(), CompuCell3D::Potts3D::getBoundaryZName(), CompuCell3D::Potts3D::getCellFactoryGroupPtr(), CompuCell3D::Potts3D::getCellFieldG(), CompuCell3D::AdjacentNeighbor::getField3DIndex(), CompuCell3D::Field3DIndex::getMaxIndex(), CompuCell3D::Simulator::getPotts(), maxIndex, periodicX, periodicY, periodicZ, CompuCell3D::Potts3D::registerCellGChangeWatcher(), BasicClassGroupFactory::registerClass(), CompuCell3D::AdjacentNeighbor::setPeriodicX(), CompuCell3D::AdjacentNeighbor::setPeriodicY(), CompuCell3D::AdjacentNeighbor::setPeriodicZ(), and simulator.

Here is the call graph for this function:

void CellBoundaryTrackerPlugin::field3DChange ( const Point3D pt,
CellG newCell,
CellG oldCell 
) [virtual]

position of the element after insertion

When there was a cell at this pixel we will have to update all its neighbours (update counters) and remove it from the boundary

RESTORE IT LATER! it is important

modifying boundary data for old cell

check if a neighbor belongs to boundary of old cell

if it does

if it does not belong to the boundary we will insert it to the boundary now as it has contact with foreign neighbor

newly inserted boundary point has 1 foreign neighbor

Now will adjust common surface area with cell neighbors

will decrement commSurfArea with all face 2 face neighbors

decrement commonSurfArea with adj cell

if commSurfArea reaches 0 I remove this entry from cell neighbor set

now process common area for adj cell provided it is not the oldCell

decrement common area

if commSurfArea reaches 0 I remove this entry from cell neighbor set

When there was a cell at this pixel we will have to update all its neighbours (update counters) and remove it from the boundary

RESTORE IT LATER _ IMPORTANT SANITY TEST

every new pixel in the cell must be added to the

boundary

have to add special case when there are periodic boundary conditions set on - then simple test cellFieldG->isValid(ptAdj may be misleading: i.e. cellFieldG->isValid(ptAdj can be false but a point still may not be at the boundary

Now will adjust common surface area with cell neighbors

if adjCellPtr denotes foreign cell we increase common area and insert set entry if necessary

OK to insert even if

duplicate, in such a case an iterator to existing NeighborSurfaceData(adjCellPtr) obj is returned

increment commonSurfArea with adj cell

now process common area for adj cell

increment commonSurfArea of adj cell with current cell

this special case is required in updating common Surface Area with medium in this case we update surface of adjCell only (we do not update medium's neighbors list or its contact surfaces)

Now will adjust common surface area with cell neighbors

will decrement commSurfArea with all face 2 face neighbors

now process common area for adj cell provided it is not the oldCell

decrement common area

if commSurfArea reaches 0 I remove this entry from cell neighbor set

this special case is required in updating common Surface Area with medium in this case we update surface of adjCell only (we do not update medium's neighbors list or its contact surfaces)

if adjCellPtr denotes foreign cell we increase common area and insert set entry if necessary

now process common area of adj cell with medium in this case

increment commonSurfArea of adj cell with current cell

temporarily for testing purposes I set

Definition at line 97 of file CellBoundaryTrackerPlugin.cpp.

References adjNeighbor, cellBoundaryTrackerAccessor, cellFieldG, changeCounter, distance(), CompuCell3D::CellG::extraAttribPtr, CompuCell3D::AdjacentNeighbor::getAdjFace2FaceNeighborOffsetVec(), CompuCell3D::AdjacentNeighbor::getField3DIndex(), CompuCell3D::Field3DIndex::index(), and testLatticeSanityFull().

Here is the call graph for this function:

void CellBoundaryTrackerPlugin::readXML ( XMLPullParser xmlIn  )  [virtual]

Deserialize this serializable.

Parameters:
xmlIn The pull parser.

Implements XMLSerializable.

Definition at line 889 of file CellBoundaryTrackerPlugin.cpp.

void CellBoundaryTrackerPlugin::writeXML ( XMLSerializer xmlOut  )  [virtual]

Serialize this serializable.

Parameters:
xmlOut The serializer.

Implements XMLSerializable.

Definition at line 893 of file CellBoundaryTrackerPlugin.cpp.

void CellBoundaryTrackerPlugin::initializeBoundaries (  )  [virtual]

Definition at line 505 of file CellBoundaryTrackerPlugin.cpp.

BasicClassAccessor<CellBoundaryTracker>* CompuCell3D::CellBoundaryTrackerPlugin::getCellBoundaryTrackerAccessorPtr (  )  [inline]

Definition at line 70 of file CellBoundaryTrackerPlugin.h.

References cellBoundaryTrackerAccessor.

double CompuCell3D::CellBoundaryTrackerPlugin::distance ( double  ,
double  ,
double  ,
double  ,
double  ,
double   
) [protected]

Referenced by field3DChange().

void CellBoundaryTrackerPlugin::testLatticeSanity (  )  [protected, virtual]

This function checks if boundaries are OK

Now will have to get access to the pointers stored in cellFieldG from Potts3D

OK I have a reference to the boundary set

reset local variables

counting foreign neighbors of current pixel

isInBoundary flag is set;

reseting local variables

cell has been already checked

loop over cell boundary points

CAUTION: you have to get a reference to adjFace2FaceNeighborOffsetsVec based on ptBoundary not based on pt!

loop over current pixel's face2face neighbors

cerr<<"Checking cell:" << currentCellPtr <<endl;

cerr<<"neighbor:"<<sitr->neighborAddress<<" commonSurfaceArea:"<<sitr->commonSurfaceArea<<endl;

Got everything I need to know about this pixel Now do sanity check

Definition at line 657 of file CellBoundaryTrackerPlugin.cpp.

References adjNeighbor, cellBoundaryTrackerAccessor, cellFieldG, CompuCell3D::CellG::extraAttribPtr, fieldDim, CompuCell3D::AdjacentNeighbor::getAdjFace2FaceNeighborOffsetVec(), CompuCell3D::AdjacentNeighbor::getField3DIndex(), CompuCell3D::Field3DIndex::index(), CompuCell3D::Field3DIndex::index2Point(), CompuCell3D::Point3D::x, CompuCell3D::Point3D::y, and CompuCell3D::Point3D::z.

Here is the call graph for this function:

void CellBoundaryTrackerPlugin::testLatticeSanityFull (  )  [protected, virtual]

Now will have to get access to the pointers stored in cellFieldG from Potts3D

check boundaries of each cell - will loop over each lattice point and check if point belongs to boundary

OK I have a reference to the boundary set

reset local variables

counting foreign neighbors of current pixel

isInBoundary flag is set;

isInBoundary flag is set;

reseting local variables

cell has been already checked

loop over cell boundary points

CAUTION: you have to get a reference to adjFace2FaceNeighborOffsetsVec based on ptBoundary not based on pt!

loop over current pixel's face2face neighbors

cerr<<"Checking cell:" << currentCellPtr <<endl;

cerr<<"neighbor:"<<sitr->neighborAddress<<" commonSurfaceArea:"<<sitr->commonSurfaceArea<<endl;

Got everything I need to know about this pixel Now do sanity check

Definition at line 900 of file CellBoundaryTrackerPlugin.cpp.

References adjNeighbor, cellBoundaryTrackerAccessor, cellFieldG, CompuCell3D::CellG::extraAttribPtr, fieldDim, CompuCell3D::AdjacentNeighbor::getAdjFace2FaceNeighborOffsetVec(), CompuCell3D::AdjacentNeighbor::getField3DIndex(), CompuCell3D::Field3DIndex::index(), CompuCell3D::Field3DIndex::index2Point(), isBoundaryPixel(), CompuCell3D::Point3D::x, CompuCell3D::Point3D::y, and CompuCell3D::Point3D::z.

Referenced by field3DChange().

Here is the call graph for this function:

bool CellBoundaryTrackerPlugin::isBoundaryPixel ( Point3D  pt  )  [protected]

Definition at line 1199 of file CellBoundaryTrackerPlugin.cpp.

References adjNeighbor, cellFieldG, CompuCell3D::AdjacentNeighbor::getAdjFace2FaceNeighborOffsetVec(), and isTouchingLatticeBoundary().

Referenced by testLatticeSanityFull().

Here is the call graph for this function:

bool CellBoundaryTrackerPlugin::isTouchingLatticeBoundary ( Point3D  pt,
Point3D  ptAdj 
) [protected]

temporary solution only - will write general version later

Definition at line 1236 of file CellBoundaryTrackerPlugin.cpp.

References periodicX, periodicY, periodicZ, CompuCell3D::Point3D::x, CompuCell3D::Point3D::y, and CompuCell3D::Point3D::z.

Referenced by isBoundaryPixel().


Member Data Documentation

Field3D<CellG *>* CompuCell3D::CellBoundaryTrackerPlugin::cellFieldG [private]

Definition at line 46 of file CellBoundaryTrackerPlugin.h.

Referenced by field3DChange(), init(), isBoundaryPixel(), testLatticeSanity(), and testLatticeSanityFull().

Dim3D CompuCell3D::CellBoundaryTrackerPlugin::fieldDim [private]

Definition at line 47 of file CellBoundaryTrackerPlugin.h.

Referenced by init(), testLatticeSanity(), and testLatticeSanityFull().

BasicClassAccessor<CellBoundaryTracker> CompuCell3D::CellBoundaryTrackerPlugin::cellBoundaryTrackerAccessor [private]

Definition at line 49 of file CellBoundaryTrackerPlugin.h.

Referenced by field3DChange(), getCellBoundaryTrackerAccessorPtr(), init(), testLatticeSanity(), and testLatticeSanityFull().

Simulator* CompuCell3D::CellBoundaryTrackerPlugin::simulator [private]

Reimplemented from CompuCell3D::SimObject.

Definition at line 50 of file CellBoundaryTrackerPlugin.h.

Referenced by init().

bool CompuCell3D::CellBoundaryTrackerPlugin::periodicX [private]

Definition at line 51 of file CellBoundaryTrackerPlugin.h.

Referenced by init(), and isTouchingLatticeBoundary().

bool CompuCell3D::CellBoundaryTrackerPlugin::periodicY [private]

Definition at line 51 of file CellBoundaryTrackerPlugin.h.

Referenced by init(), and isTouchingLatticeBoundary().

bool CompuCell3D::CellBoundaryTrackerPlugin::periodicZ [private]

Definition at line 51 of file CellBoundaryTrackerPlugin.h.

Referenced by init(), and isTouchingLatticeBoundary().

bool CompuCell3D::CellBoundaryTrackerPlugin::watchingAllowed [protected]

Definition at line 80 of file CellBoundaryTrackerPlugin.h.

AdjacentNeighbor CompuCell3D::CellBoundaryTrackerPlugin::adjNeighbor [protected]

Definition at line 81 of file CellBoundaryTrackerPlugin.h.

Referenced by field3DChange(), init(), isBoundaryPixel(), testLatticeSanity(), and testLatticeSanityFull().

long CompuCell3D::CellBoundaryTrackerPlugin::maxIndex [protected]

Definition at line 82 of file CellBoundaryTrackerPlugin.h.

Referenced by init().

long CompuCell3D::CellBoundaryTrackerPlugin::changeCounter [protected]

Definition at line 83 of file CellBoundaryTrackerPlugin.h.

Referenced by field3DChange().


The documentation for this class was generated from the following files:
Generated on Thu Feb 21 14:39:54 2008 for CompuCell3D by  doxygen 1.5.3