CylBase Class Reference

#include <CylBase.h>

Inheritance diagram for CylBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CylBase (double x, double y, double z, double dia, double length, unsigned int numDivs)
 CylBase ()
void setX (double v)
double getX () const
void setY (double v)
double getY () const
void setZ (double v)
double getZ () const
void setDia (double v)
double getDia () const
void setLength (double v)
double getLength () const
void setNumDivs (unsigned int v)
unsigned int getNumDivs () const
void setIsCylinder (bool v)
bool getIsCylinder () const
double volume (const CylBase &parent) const
 Returns vol of current node. Usually needs to refer to parent.
double voxelVolume (const CylBase &parent, unsigned int fid) const
vector< double > getCoordinates (const CylBase &parent, unsigned int entry) const
double getDiffusionArea (const CylBase &parent, unsigned int index) const
double getMiddleArea (const CylBase &parent, unsigned int index) const
 Return cross-section area of middle of specified voxel.
double getVoxelLength () const
 Return length of voxel. All are equal.
double selectGridSize (double h, double dia1, double granularity) const
void matchCubeMeshEntries (const ChemCompt *other, const CylBase &parent, unsigned int startIndex, double granularity, vector< VoxelJunction > &ret, bool useCylinderCurve, bool useCylinderCap) const
double nearest (double x, double y, double z, const CylBase &parent, double &linePos, double &r) const
double nearest (double x, double y, double z, const CylBase &parent, unsigned int &index) const

Detailed Description

Base class for cylinder calculations.


Constructor & Destructor Documentation

CylBase::CylBase ( double  x,
double  y,
double  z,
double  dia,
double  length,
unsigned int  numDivs 
)
CylBase::CylBase (  ) 

Member Function Documentation

vector< double > CylBase::getCoordinates ( const CylBase parent,
unsigned int  fid 
) const

Returns a vector with the coordinates of the specified MeshEntry. The MeshEntry (entry argument) is a voxel within this CylBase, 'entry' is indexed from 0 to numDivs. The parent is the parent CylBase with its own set of coords. The function does interpolation from the ends of the Node. These are detailed coordinates representative of the shape of the MeshEntry. For cylinders it is x1y1z1 x2y2z2 r0 r1 phi0 phi1 For spheres it is xyzdia.

Virtual function to return coords of mesh Entry. For Cylindrical mesh, coords are x1y1z1 x2y2z2 r0 r1 phi0 phi1

Referenced by NeuroMesh::vGetVoxelMidpoint().

double CylBase::getDia (  )  const
double CylBase::getDiffusionArea ( const CylBase parent,
unsigned int  fid 
) const

Returns diffusion cross-section from specified index to next. For index 0, this is cross-section to parent. For index numDivs-1, it is the cross-section from the second-last to the last voxel in this CylBase. Thus there is no valid value for (index == numDivs - 1), it has to be computed external to the CylBase, typically by calling the getDiffusionArea for the child CylBase.

Returns diffusion cross-section from specified index to previous. For index 0, this is cross-section area of parent. For index numDivs-1, it is the cross-section from the second-last to the last voxel in this CylBase. For index numDivs it is the area of this CylBase. Thus there is no valid value for (index > numDivs), it has to be computed external to the CylBase, typically by calling the getDiffusionArea for the child CylBase.

References PI.

Referenced by NeuroMesh::getAdx().

bool CylBase::getIsCylinder (  )  const
double CylBase::getLength (  )  const
double CylBase::getMiddleArea ( const CylBase parent,
unsigned int  index 
) const

Return cross-section area of middle of specified voxel.

Return the cross section area of the middle of the specified voxel.

References PI.

Referenced by NeuroMesh::updateCoords().

unsigned int CylBase::getNumDivs (  )  const
double CylBase::getVoxelLength (  )  const

Return length of voxel. All are equal.

Referenced by NeuroMesh::updateCoords().

double CylBase::getX (  )  const
double CylBase::getY (  )  const
double CylBase::getZ (  )  const
void CylBase::matchCubeMeshEntries ( const ChemCompt other,
const CylBase parent,
unsigned int  startIndex,
double  granularity,
vector< VoxelJunction > &  ret,
bool  useCylinderCurve,
bool  useCylinderCap 
) const
double CylBase::nearest ( double  x,
double  y,
double  z,
const CylBase parent,
unsigned int &  index 
) const

References nearest().

Here is the call graph for this function:

double CylBase::nearest ( double  x,
double  y,
double  z,
const CylBase parent,
double &  linePos,
double &  r 
) const

References a, c, Vec::distance(), and Vec::pointOnLine().

Referenced by NeuroMesh::nearest(), nearest(), and NeuroMesh::updateShaftParents().

Here is the call graph for this function:

double CylBase::selectGridSize ( double  h,
double  dia1,
double  granularity 
) const

Utility commands for building interface to cube mesh

void CylBase::setDia ( double  v  ) 
void CylBase::setIsCylinder ( bool  v  ) 
void CylBase::setLength ( double  v  ) 
void CylBase::setNumDivs ( unsigned int  v  ) 
void CylBase::setX ( double  v  ) 
void CylBase::setY ( double  v  ) 
void CylBase::setZ ( double  v  ) 
double CylBase::volume ( const CylBase parent  )  const

Returns vol of current node. Usually needs to refer to parent.

The entire volume for a truncated cone is given by: V = 1/3 pi.length.(r0^2 + r0.r1 + r1^2) where the length is the length of the cone r0 is radius at base r1 is radius at top. Note that this converges to volume of a cone if r0 or r1 is zero, and to the volume of a cylinder if r0 == r1.

References PI.

Referenced by SpineEntry::setVolume(), SpineEntry::volume(), and NeuroMesh::vSetVolumeNotRates().

double CylBase::voxelVolume ( const CylBase parent,
unsigned int  fid 
) const

Returns volume of specified voxel (MeshEntry)

Returns volume of MeshEntry. This isn't the best subdivision of the cylinder from the viewpoint of keeping the length constants all the same for different volumes. Ideally the thinner segments should have a smaller length. But this is simple and so is the diffusion calculation, so leave it. Easy to fine-tune later by modifying how one computes frac0 and frac1.

References PI.

Referenced by NeuroMesh::updateCoords().


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

Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1