CompuCell3D::BoundaryStrategy Class Reference

#include <BoundaryStrategy.h>

Collaboration diagram for CompuCell3D::BoundaryStrategy:

Collaboration graph
[legend]

List of all members.

Public Member Functions

LatticeMultiplicativeFactors getLatticeMultiplicativeFactors ()
LatticeMultiplicativeFactors generateLatticeMultiplicativeFactors (LatticeType _latticeType, Dim3D _dim)
LatticeType getLatticeType ()
int getNumPixels (int x, int y, int z) const
bool isValid (const Point3D &pt) const
void setIrregular ()
void setDim (const Dim3D theDim)
void setCurrentStep (const int currentStep)
Point3D getNeighbor (const Point3D &pt, unsigned int &token, double &distance, bool checkBounds=true)
const std::vector< Point3D > & getOffsetVec () const
const std::vector< float > & getDistanceVec () const
const std::vector< Point3D > & getOffsetVec (Point3D &pt) const
const std::vector< unsigned int > & getNeighborOrderIndexVec () const
Neighbor getNeighborDirect (Point3D &pt, unsigned int idx, bool checkBounds=true, bool calculatePtTrans=false)
float getMaxDistance ()
unsigned int getMaxNeighborIndexFromDepth (float depth)
unsigned int getMaxNeighborOrder ()
unsigned int getMaxNeighborIndexFromNeighborOrder (unsigned int _neighborOrder)
 ~BoundaryStrategy ()
void prepareNeighborListsBasedOnNeighborOrder (unsigned int _neighborOrder)
void prepareNeighborLists (float _maxDistance=4.0)
void prepareNeighborListsSquare (float _maxDistance=4.0)
void prepareNeighborListsHex (float _maxDistance=4.0)
Coordinates3D< double > HexCoord (const Point3D &_pt)
Coordinates3D< double > calculatePointCoordinates (const Point3D &_pt)
bool precisionCompare (float _x, float _y, float _prec=1e-6)

Static Public Member Functions

static void instantiate (string boundary_x, string boundary_y, string boundary_z, string alg, int index, int size, string inputfile, LatticeType latticeType=SQUARE_LATTICE)
static BoundaryStrategygetInstance ()
static void destroy ()

Private Member Functions

 BoundaryStrategy ()
 BoundaryStrategy (string boundary_x, string boundary_y, string boundary_z, string alg, int index, int size, string inputfile, LatticeType latticeType=SQUARE_LATTICE)
bool isValid (const int coordinate, const int max_value)
bool checkIfOffsetAlreadyStacked (Point3D &, std::vector< Point3D > &)
bool checkEuclidianDistance (Coordinates3D< double > &, Coordinates3D< double > &, float)
double calculateDistance (Coordinates3D< double > &, Coordinates3D< double > &)
void initializeQuickCheckField (Dim3D)
void getOffsetsAndDistances (Point3D ctPt, float maxDistance, Field3DImpl< char > &tempField, std::vector< Point3D > &offsetVecTmp, std::vector< float > &distanceVecTmp, std::vector< unsigned int > &neighborOrderIndexVecTmp)

Private Attributes

LatticeMultiplicativeFactors lmf
Dim3D dim
int currentStep
bool regular
Boundarystrategy_x
Boundarystrategy_y
Boundarystrategy_z
Algorithmalgorithm
std::vector< Point3DoffsetVec
std::vector< float > distanceVec
std::vector< unsigned int > neighborOrderIndexVec
float maxDistance
bool neighborListsInitializedFlag
std::vector< std::vector
< Point3D > > 
hexOffsetArray
std::vector< std::vector< float > > hexDistanceArray
std::vector< std::vector
< unsigned int > > 
hexNeighborOrderIndexArray
LatticeType latticeType

Static Private Attributes

static BoundaryStrategysingleton


Detailed Description

Definition at line 67 of file BoundaryStrategy.h.


Constructor & Destructor Documentation

BoundaryStrategy::BoundaryStrategy (  )  [private]

BoundaryStrategy::BoundaryStrategy ( string  boundary_x,
string  boundary_y,
string  boundary_z,
string  alg,
int  index,
int  size,
string  inputfile,
LatticeType  latticeType = SQUARE_LATTICE 
) [private]

BoundaryStrategy::~BoundaryStrategy (  ) 

Definition at line 111 of file BoundaryStrategy.cpp.

References singleton, strategy_x, strategy_y, and strategy_z.


Member Function Documentation

bool BoundaryStrategy::isValid ( const int  coordinate,
const int  max_value 
) [private]

Definition at line 184 of file BoundaryStrategy.cpp.

Referenced by getNeighbor(), and getNeighborDirect().

bool BoundaryStrategy::checkIfOffsetAlreadyStacked ( Point3D _ptToCheck,
std::vector< Point3D > &  _offsetVec 
) [private]

bool BoundaryStrategy::checkEuclidianDistance ( Coordinates3D< double > &  _pt1,
Coordinates3D< double > &  _pt2,
float  _distance 
) [private]

Definition at line 323 of file BoundaryStrategy.cpp.

References calculateDistance().

double BoundaryStrategy::calculateDistance ( Coordinates3D< double > &  _pt1,
Coordinates3D< double > &  _pt2 
) [private]

void CompuCell3D::BoundaryStrategy::initializeQuickCheckField ( Dim3D   )  [private]

void CompuCell3D::BoundaryStrategy::getOffsetsAndDistances ( Point3D  ctPt,
float  maxDistance,
Field3DImpl< char > &  tempField,
std::vector< Point3D > &  offsetVecTmp,
std::vector< float > &  distanceVecTmp,
std::vector< unsigned int > &  neighborOrderIndexVecTmp 
) [private]

LatticeMultiplicativeFactors CompuCell3D::BoundaryStrategy::getLatticeMultiplicativeFactors (  )  [inline]

Definition at line 117 of file BoundaryStrategy.h.

Referenced by CompuCell3D::SurfaceTrackerPlugin::update().

LatticeMultiplicativeFactors BoundaryStrategy::generateLatticeMultiplicativeFactors ( LatticeType  _latticeType,
Dim3D  _dim 
)

LatticeType CompuCell3D::BoundaryStrategy::getLatticeType (  )  [inline]

Definition at line 119 of file BoundaryStrategy.h.

Referenced by CompuCell3D::Potts3D::getLatticeType().

int BoundaryStrategy::getNumPixels ( int  x,
int  y,
int  z 
) const

Definition at line 302 of file BoundaryStrategy.cpp.

References algorithm, and CompuCell3D::Algorithm::getNumPixels().

bool BoundaryStrategy::isValid ( const Point3D pt  )  const

void BoundaryStrategy::setIrregular (  ) 

Definition at line 229 of file BoundaryStrategy.cpp.

References regular.

void BoundaryStrategy::setDim ( const Dim3D  theDim  ) 

void BoundaryStrategy::setCurrentStep ( const int  currentStep  ) 

Point3D BoundaryStrategy::getNeighbor ( const Point3D pt,
unsigned int &  token,
double &  distance,
bool  checkBounds = true 
)

const std::vector<Point3D>& CompuCell3D::BoundaryStrategy::getOffsetVec (  )  const [inline]

const std::vector<float>& CompuCell3D::BoundaryStrategy::getDistanceVec (  )  const [inline]

Definition at line 130 of file BoundaryStrategy.h.

const std::vector<Point3D>& CompuCell3D::BoundaryStrategy::getOffsetVec ( Point3D pt  )  const [inline]

const std::vector<unsigned int>& CompuCell3D::BoundaryStrategy::getNeighborOrderIndexVec (  )  const [inline]

Definition at line 139 of file BoundaryStrategy.h.

Neighbor BoundaryStrategy::getNeighborDirect ( Point3D pt,
unsigned int  idx,
bool  checkBounds = true,
bool  calculatePtTrans = false 
)

Definition at line 811 of file BoundaryStrategy.cpp.

References CompuCell3D::Boundary::applyCondition(), calculatePointCoordinates(), dim, CompuCell3D::Neighbor::distance, distanceVec, CompuCell3D::HEXAGONAL_LATTICE, HexCoord(), hexDistanceArray, hexOffsetArray, isValid(), latticeType, CompuCell3D::LatticeMultiplicativeFactors::lengthMF, lmf, offsetVec, CompuCell3D::Neighbor::pt, CompuCell3D::Neighbor::ptTrans, regular, strategy_x, strategy_y, strategy_z, CompuCell3D::Point3D::x, CompuCell3D::Point3D::y, and CompuCell3D::Point3D::z.

Referenced by CompuCell3D::StretchnessPlugin::changeEnergy(), CompuCell3D::RearrangementPlugin::changeEnergy(), CompuCell3D::OrientedContactPlugin::changeEnergy(), CompuCell3D::ContactMultiCadPlugin::changeEnergy(), CompuCell3D::ContactLocalProductPlugin::changeEnergy(), CompuCell3D::ContactLocalFlexPlugin::changeEnergy(), CompuCell3D::ContactPlugin::changeEnergy(), CompuCell3D::ConnectivityLocalFlexPlugin::changeEnergy(), CompuCell3D::ConnectivityPlugin::changeEnergy(), CompuCell3D::CompartmentPlugin::changeEnergy(), CompuCell3D::MitosisPlugin::doMitosis(), CompuCell3D::SurfaceTrackerPlugin::field3DChange(), CompuCell3D::BoundaryPixelTrackerPlugin::field3DChange(), CompuCell3D::NeighborTrackerPlugin::field3DChange(), CompuCell3D::GlobalBoundaryPixelTrackerPlugin::field3DChange(), CompuCell3D::SurfacePlugin::getNewOldSurfaceDiffs(), CompuCell3D::KernelDiffusionSolver::init(), CompuCell3D::KernelDiffusionSolver::initializeKernel(), CompuCell3D::PlasticityTrackerPlugin::initializePlasticityNeighborList(), CompuCell3D::RealPlasticityTrackerPlugin::initializeRealPlasticityNeighborList(), CompuCell3D::Potts3D::metropolisBoundaryWalker(), CompuCell3D::Potts3D::metropolisFast(), CompuCell3D::ConnectivityLocalFlexPlugin::orderNeighborsClockwise(), CompuCell3D::ConnectivityPlugin::orderNeighborsClockwise(), prepareNeighborListsHex(), CompuCell3D::KernelDiffusionSolver::secreteOnContactSingleField(), CompuCell3D::FlexibleDiffusionSolverFE::secreteOnContactSingleField(), CompuCell3D::FastDiffusionSolver2DFE::secreteOnContactSingleField(), and CompuCell3D::NeighborTrackerPlugin::testLatticeSanityFull().

float CompuCell3D::BoundaryStrategy::getMaxDistance (  )  [inline]

Definition at line 141 of file BoundaryStrategy.h.

Referenced by CompuCell3D::Potts3D::setDepth().

unsigned int BoundaryStrategy::getMaxNeighborIndexFromDepth ( float  depth  ) 

unsigned int BoundaryStrategy::getMaxNeighborOrder (  ) 

unsigned int BoundaryStrategy::getMaxNeighborIndexFromNeighborOrder ( unsigned int  _neighborOrder  ) 

static void CompuCell3D::BoundaryStrategy::instantiate ( string  boundary_x,
string  boundary_y,
string  boundary_z,
string  alg,
int  index,
int  size,
string  inputfile,
LatticeType  latticeType = SQUARE_LATTICE 
) [inline, static]

Definition at line 158 of file BoundaryStrategy.h.

Referenced by CompuCell3D::Simulator::initializePottsCC3D().

void BoundaryStrategy::prepareNeighborListsBasedOnNeighborOrder ( unsigned int  _neighborOrder  ) 

void BoundaryStrategy::prepareNeighborLists ( float  _maxDistance = 4.0  ) 

void BoundaryStrategy::prepareNeighborListsSquare ( float  _maxDistance = 4.0  ) 

void BoundaryStrategy::prepareNeighborListsHex ( float  _maxDistance = 4.0  ) 

Coordinates3D< double > BoundaryStrategy::HexCoord ( const Point3D _pt  ) 

Coordinates3D< double > BoundaryStrategy::calculatePointCoordinates ( const Point3D _pt  ) 

bool BoundaryStrategy::precisionCompare ( float  _x,
float  _y,
float  _prec = 1e-6 
)

Definition at line 333 of file BoundaryStrategy.cpp.

static BoundaryStrategy* CompuCell3D::BoundaryStrategy::getInstance (  )  [inline, static]

Definition at line 187 of file BoundaryStrategy.h.

References ASSERT_OR_THROW.

Referenced by CompuCell3D::DiffusableVector2D< float >::allocateDiffusableFieldVector(), CompuCell3D::DiffusableVector< float >::allocateDiffusableFieldVector(), CompuCell3D::RealPlasticityPlugin::extraInit(), CompuCell3D::PlasticityPlugin::extraInit(), CompuCell3D::Potts3D::getLatticeType(), CompuCell3D::Field3D< precision >::getNeighbor(), CompuCell3D::KernelDiffusionSolver::init(), CompuCell3D::SurfaceTrackerPlugin::init(), CompuCell3D::StretchnessPlugin::init(), CompuCell3D::RearrangementPlugin::init(), CompuCell3D::RealPlasticityTrackerPlugin::init(), CompuCell3D::PlasticityTrackerPlugin::init(), CompuCell3D::NeighborTrackerPlugin::init(), CompuCell3D::MitosisSimplePlugin::init(), CompuCell3D::MitosisPlugin::init(), CompuCell3D::CenterOfMassPlugin::init(), CompuCell3D::KernelDiffusionSolver::initializeKernel(), CompuCell3D::ConnectivityLocalFlexPlugin::initializeNeighborsOffsets(), CompuCell3D::ConnectivityPlugin::initializeNeighborsOffsets(), CompuCell3D::Simulator::initializePottsCC3D(), CompuCell3D::UniformFieldInitializer::layOutCells(), CompuCell3D::BlobFieldInitializer::layOutCells(), CompuCell3D::Potts3D::metropolisBoundaryWalker(), CompuCell3D::Potts3D::metropolisFast(), CompuCell3D::Potts3D::metropolisList(), CompuCell3D::Potts3D::setDepth(), CompuCell3D::Field3DImpl< precision >::setDim(), CompuCell3D::Potts3D::setNeighborOrder(), CompuCell3D::SurfacePlugin::update(), CompuCell3D::BoundaryPixelTrackerPlugin::update(), CompuCell3D::OrientedContactPlugin::update(), CompuCell3D::GlobalBoundaryPixelTrackerPlugin::update(), CompuCell3D::ContactMultiCadPlugin::update(), CompuCell3D::ContactLocalProductPlugin::update(), CompuCell3D::ContactLocalFlexPlugin::update(), CompuCell3D::ContactPlugin::update(), and CompuCell3D::CompartmentPlugin::update().

static void CompuCell3D::BoundaryStrategy::destroy (  )  [inline, static]

Definition at line 204 of file BoundaryStrategy.h.

Referenced by CompuCell3D::Simulator::initializePottsCC3D().


Member Data Documentation

Definition at line 69 of file BoundaryStrategy.h.

Referenced by ~BoundaryStrategy().

Definition at line 74 of file BoundaryStrategy.h.

Referenced by setCurrentStep().

Definition at line 75 of file BoundaryStrategy.h.

Referenced by BoundaryStrategy(), getNeighbor(), getNeighborDirect(), and setIrregular().

Definition at line 80 of file BoundaryStrategy.h.

Referenced by BoundaryStrategy(), getNumPixels(), isValid(), setCurrentStep(), and setDim().

Definition at line 90 of file BoundaryStrategy.h.

Referenced by getNeighborDirect(), and prepareNeighborListsSquare().

std::vector<float> CompuCell3D::BoundaryStrategy::distanceVec [private]

std::vector<unsigned int> CompuCell3D::BoundaryStrategy::neighborOrderIndexVec [private]

Definition at line 92 of file BoundaryStrategy.h.

Referenced by prepareNeighborListsSquare().

Definition at line 97 of file BoundaryStrategy.h.

Definition at line 98 of file BoundaryStrategy.h.

Referenced by BoundaryStrategy(), and setDim().

std::vector<std::vector<Point3D> > CompuCell3D::BoundaryStrategy::hexOffsetArray [private]

Definition at line 110 of file BoundaryStrategy.h.

Referenced by getNeighborDirect(), and prepareNeighborListsHex().

std::vector<std::vector<float> > CompuCell3D::BoundaryStrategy::hexDistanceArray [private]

std::vector<std::vector<unsigned int> > CompuCell3D::BoundaryStrategy::hexNeighborOrderIndexArray [private]

Definition at line 113 of file BoundaryStrategy.h.

Referenced by prepareNeighborListsHex().


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

Generated on Thu Dec 4 11:41:53 2008 for CompuCell3D by  doxygen 1.5.6